ST_Buffer on Geography — Iteration

In my previous post, Imagico said: This is nice but still fails in one important aspect – it will create significant inaccuracies once your buffering distance reaches values where buffering in a single local coordinate system is getting problematic which, depending on your precision requirements, will likely happen at distances of a few degrees. A solution to this would require either an iterative split and … Continue reading ST_Buffer on Geography — Iteration

Final?: ST_Buffer on Geography, or My love for @NullIsland

Thanks to Paul Norman’s reminder in a previous post, we now have all the pieces we need to complete an ST_Buffer function that exposes all the wonderful goodness of buffer style parameters to geography users and also chooses the best local coordinate system automatically. We use _ST_BestSRID to choose our local coordinate system. Remember my previous three disadvantages: It didn’t do this at a low … Continue reading Final?: ST_Buffer on Geography, or My love for @NullIsland

ST_Buffer diving under the covers part 1

This will be a quick post. I just looked at how ST_Buffer is written in the PostGIS codebase, and I thought this was interesting. When you use ST_Buffer and specify geometry, buffer distance, and an integer value, this gets converted in the overloaded function into a quad_segs version. P.S. I would have written more, but Sherlock just started. Continue reading ST_Buffer diving under the covers part 1

ST_Buffer for those who want really want all buffer features in geography

My previous post on improving buffering geography in PostGIS has three disadvantages: It doesn’t do this at a low enough level to automatically use the best available local coordinate system. This leaves it to the user to choose the best available local coordinate system. I should fix this (but I probably won’t just now…). It uses a different function name than you otherwise use for buffering. … Continue reading ST_Buffer for those who want really want all buffer features in geography

ST_Buffer for those who want really round geographic circles

A little functionality request from @antoniolocandro on twitter: ST_buffer for geography has no option for quad_segs, alternative so buffer looks nice not jagged? cc @smathermather — Antonio Locandro (@antoniolocandro) January 8, 2016 Ask and ye might receive. Let’s build a function that will take your input geography, how far you want to buffer (in local coordinates) number of segments you want in a quarter, and … Continue reading ST_Buffer for those who want really round geographic circles

ST_ApproximateMedialAxis(geom)

Trying out PostGIS 2.2’s ST_ApproximateMedialAxis capabilities today. I’m going to use it to label parcels. So here is my parcel fabric: And here’s what the skeleton of that fabric looks like: It get’s pretty interesting where the parcels are more complicated: more: Oh, the code you say? Well, it couldn’t be much easier: SELECT gid, ST_ApproximateMedialAxis(geom) AS geom FROM cuy_parcel_2015; Or the full version for … Continue reading ST_ApproximateMedialAxis(geom)

Normalizing tables in PostgreSQL: experiments with Fulcrum

Fulcrum by Spatial Networks is an interesting and very useful hosted service for collecting geo data in the field with whatever smartphone or tablet you already own.  It works well, so long as you just want to collect points, and the field building capabilities are quite extraordinary. Also, for many applications, it’s cheaper than custom solutions, so it hits that sweet spot well. If you’ve … Continue reading Normalizing tables in PostgreSQL: experiments with Fulcrum

Airspace — A deep rabbit hole

In previous maps we looked at Class B, C, and D airspace. Let’s add in Class E0 and E5… (not yet in 3D): (Map tiles by Stamen Design, under CC BY 3.0. Data by OpenStreetMap, under ODbL) Previous posts: https://smathermather.wordpress.com/2014/10/25/airspace-is-complicated-and-so-i-abuse-postgis-once-again/ and https://smathermather.wordpress.com/2014/10/25/airspace-is-complicated-and-so-i-abuse-postgis-once-again-reprise/ Continue reading Airspace — A deep rabbit hole

Airspace is complicated — and so I abuse PostGIS once again — Reprise…

In the previous post: https://smathermather.wordpress.com/2014/10/25/airspace-is-complicated-and-so-i-abuse-postgis-once-again/ we explore the 3D shape and complexity of controlled airspace. Now here’s the rest of the code. We’ll add our affine transformation ala Seth Fitsimmons: And integrate that into our original function: And voila! Let’s take a look at Washington, DC and surrounds, another nice complicated example: And again with map tiles by Stamen Design, under CC BY 3.0. Data … Continue reading Airspace is complicated — and so I abuse PostGIS once again — Reprise…

Airspace is complicated — and so I abuse PostGIS once again

Let’s ignore for a moment the drone hobbiest / enthusiast. What is the shape of airspace for airplanes and commercial and government unmanned aircraft flying under Certificates of Authorization, and how can we visualize it? Thanks to Anita in the last post, we have the Class B,C,D,E Airspace Shape Files which helps us define the overall shape of controlled airspace. But, these are 3D things. … Continue reading Airspace is complicated — and so I abuse PostGIS once again