Kicking the tires of PostGIS 2.0 — Testing ST_MakeValid

The feature in PostGIS 2.0 that excited me most was not topology support, raster support, or 3D functions.  Ok, raster was near the top of my list.  But what I was really excited by was the ST_MakeValid function.  Sad, isn’t it?  Lack of vision probably– excited to try to solve recurring technical snafus in a computationally inexpensive way, rather than being more excited by the … Continue reading Kicking the tires of PostGIS 2.0 — Testing ST_MakeValid

Cartography and USGS — Fake Building Footprints in PostGIS now with distance operator

Quick and fun post tonight.  Remember in USGS quads all the little building footprints that represented civilization?  We (me and my colleague John Stein) were contemplating how to pull off something similar with address points.  Here was our first attempt: It looks ok, but may be a little crude to be considered cartography (click on it to see it bigger– you’ll see those buildings don’t … Continue reading Cartography and USGS — Fake Building Footprints in PostGIS now with distance operator

Playing with new tools and old standards: GeoJSON, Leaflet, CartoDB across platforms

Leaflet, CartoDB, GeoJSON, and cross platform web map deployment. First some introductions: “Leaflet is a modern, lightweight open-source JavaScript library for interactive maps for desktop and mobile web browsers, developed by CloudMade to form the core of its next generation JavaScript API. Weighting just about 21kb of gzipped JS code, it still has all the features you will ever need for you web mapping needs … Continue reading Playing with new tools and old standards: GeoJSON, Leaflet, CartoDB across platforms

PostGIS Cartographic Effects– Cartoonify Nearly Coincident Lines

In my previous post, a long 24-hours ago, I proposed some automatic modification of line for cartographic reasons. I had some flaws in my code. The points were over-rotated by 45 degrees. Can you spot why? Tip: it’s a basic trigonometric mistake. Here’s the corrected code (though there may be a better way): An alternate approach is to only move those points that are too … Continue reading PostGIS Cartographic Effects– Cartoonify Nearly Coincident Lines

PostGIS Cartographic Effects– Cartoonify Nearly Coincident Lines

I’m still working on this query, but I thought I’d post what I’ve done so far. My intent is to produce scale-dependent exaggeration of the distances between quasi-parallel lines. The reason for this is so that lines such as street lines which are nearly coincident at a particular viewing scale can be spread from each other, much in the same way great cartography lies a … Continue reading PostGIS Cartographic Effects– Cartoonify Nearly Coincident Lines

CartoDB, Leaflet, and a little anti-generalization

CartoDB is one of two hosted (read: cloud) PostGIS database implementations.  It has a maps API, an SQL API, and is some fun to use.  The other hosted PostGIS implementation is SpacialDB which has a Restful API, but can also take SQL.  I just got my key for the free version of that, so hopefully I will be reviewing use of that in the future … Continue reading CartoDB, Leaflet, and a little anti-generalization

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