EcoHackNYC– Cool projects, fun new ideas, human waste, CartoDB and other flotsam.

I took a bus to New York City this weekend to enjoy the company of fellow hackers at EcoHackNYC, organized by Javier Torre and Andrew Hill of Vizzuality and Robin Kraft of REDD Metrics.  Due to delays in Pittsburg, I missed the ignite talks on Friday, arriving on NYU’s campus on Saturday morning. Several groups formed around topics and we started hacking. I worked on … Continue reading EcoHackNYC– Cool projects, fun new ideas, human waste, CartoDB and other flotsam.

PostGIS 2.0SVN and Raster

Got PostGIS 2.0 installed on a Debian machine, with Raster enabled, and put my first image in thanks to the directions in PostGIS In Action. Here’s the auto-generated SQL in pgAdmin: CREATE TABLE ldi_10ft ( rid serial NOT NULL, rast raster, CONSTRAINT ldi_10ft_pkey PRIMARY KEY ( rid ), CONSTRAINT enforce_srid_rast CHECK (st_srid( rast ) = 3734) ) WITH ( OIDS=FALSE ); CREATE INDEX ldi_10ft_rast_gis_idx ON … Continue reading PostGIS 2.0SVN and Raster

PostgreSQL dump for PostGIS upgrade

I’m working through the Hard Upgrade instructions for PostGIS 2.0SVN install instructions. No great surprises, but a succinct set of steps for trying out PostGIS 2.0 early. In our case, we needed to exclude larger (30GB) tables from the dump needed to do an upgrade– we’ll build those into the new database selectively. Looking to the pg_dump instructions, the dash “T” (-T) flag is what … Continue reading PostgreSQL dump for PostGIS upgrade

Postgis for breakfast: ST_Donut — Revision

A commenter on my last ST_Donut post pointed out that we were essentially using not one but two buffers and and ST_Intersection to test where a point lay.  Bad Spatial SQL. Very bad Spatial SQL. Actually, at Paul Ramsey’s PostGIS for Power Users presentation at FOSS4G this year, I think he mentioned not doing that very thing, and I chuckled to myself, “Well, even I … Continue reading Postgis for breakfast: ST_Donut — Revision

What is the center line of a complex polygon? (cont. 3)

Just a quick post on this one, this time. I haven’t implemented an approximation of Bálint Miklós‘ Scale Axis Transform in PostGIS yet, and I don’t think I’ll dare try in GeoTools for GeoServer just yet, but I thought I’d give a preview of the sensitivity of the medial axis calculations in “bumpy” streams with the following image: As you can see, the problem isn’t … Continue reading What is the center line of a complex polygon? (cont. 3)

What is the center line of a complex polygon? (cont. 2)

I glossed over the difficulties of finding the centerline of a complex polygon in the last couple of posts, and didn’t realize the disservice until we got to the nitty-gritty of finding the centerline of “bumpy” streams, for which our solution, which is arguably a discretized version of the traditional medial axis, is quite sensitive to noise and “bumpiness”. With a little more googling, my … Continue reading What is the center line of a complex polygon? (cont. 2)

Postgis for breakfast: ST_Donut

This post typed into my iPod as an homage. Assisted today by my collegue, J. Stein. Moderate obfuscation of locations is an important technique for the protection of data, say something sensitive like the nesting locations of the very rare and strange fuzzy-bellied gnat catcher. We still want to display the data, but want to make it slightly wrong. A naive approach would place it … Continue reading Postgis for breakfast: ST_Donut

OGC Web Services and Security

I’ve been starting to inform myself on authentication/authorization schemes for OGC Web Services (OWS). This is because, while I’m pretty pleased with most of the functionality basic mapping of our internal GeoExt/GeoServer/PostGIS stack, user editing is the next natural step. As it is now, users can access a variety of really detailed useful layers, print to PDF, and for the most part the interface is … Continue reading OGC Web Services and Security

What is the center line of a complex polygon? (cont.)

If we try to extract the centerline of a polygon using Voronoi polygons, like in my previous post, it works pretty well for hydrologic cases, like extracting a stream centerline from stream banks, e.g.: We’ll use this to extract flow lines, in order to build out a better hydrologic network, but also use it to update property boundaries based on deed descriptions which may alternately … Continue reading What is the center line of a complex polygon? (cont.)