Proper (ab)use of a database, contour interpolation using #postgresql #postgis #arcgis

Anyone who has been following along at home knows I don’t think much like a DBA.  Sometimes that’s good; mostly it’s probably bad.  In this post, I hope it will be interesting. The problem of the day is how to take engineering contours derived from breaklines, a lidar point cloud, and all the lot, and do a good job interpolating that to a DEM.  This … Continue reading Proper (ab)use of a database, contour interpolation using #postgresql #postgis #arcgis

Contours– Symbolized from a single table

In a previous post, I restructured the contour data for display in GeoServer, e.g.: UPDATE base.contours_2 SET div_10 = CAST( contours_2.elevation % 10 AS BOOLEAN ), div_20 = CAST( contours_2.elevation % 20 AS BOOLEAN ), div_50 = CAST( contours_2.elevation % 50 AS BOOLEAN ), div_100 = CAST( contours_2.elevation % 100 AS BOOLEAN ), div_250 = CAST( contours_2.elevation % 250 AS BOOLEAN ); The SLD styling … Continue reading Contours– Symbolized from a single table

Contours– Structuring PostGIS data for viewing with GeoServer

Naively structured data is my bane– the desire (and need) to get stuff done so often overtakes the time needed to do things the better way. So, we bootstrap. A long time ago, we managed to load in a few tens of gigs of contour data into PostGIS, partitioned it into 2ft, 10ft, 20ft, 50ft, 100ft and 250ft tables using select queries with a modulus … Continue reading Contours– Structuring PostGIS data for viewing with GeoServer

SLD for contour data

See other post for explanation: <?xml version=”1.0″ encoding=”ISO-8859-1″?> <StyledLayerDescriptor version=”1.0.0″ xmlns=”http://www.opengis.net/sld&#8221; xmlns:ogc=”http://www.opengis.net/ogc&#8221; xmlns:xlink=”http://www.w3.org/1999/xlink&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; xsi:schemaLocation=”http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd”&gt; <NamedLayer> <Name>contours</Name> <UserStyle> <Title>contours</Title> <Abstract>Contour lines with index</Abstract> <FeatureTypeStyle> <Rule> <Name>rule01</Name> <Title>2 ft contours</Title> <Abstract>Abstract</Abstract> <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:PropertyName>div_10</ogc:PropertyName> <ogc:Literal>1</ogc:Literal> </ogc:PropertyIsEqualTo> </ogc:Filter> <MinScaleDenominator>1</MinScaleDenominator> <MaxScaleDenominator>4799</MaxScaleDenominator> <LineSymbolizer> <Stroke> <CssParameter name=”stroke”> <ogc:Literal>#ffd700</ogc:Literal> </CssParameter> <CssParameter name=”stroke-linecap”> <ogc:Literal>butt</ogc:Literal> </CssParameter> <CssParameter name=”stroke-linejoin”> <ogc:Literal>miter</ogc:Literal> </CssParameter> <CssParameter name=”stroke-width”> <ogc:Literal>1</ogc:Literal> </CssParameter> </Stroke> </LineSymbolizer> </Rule> <Rule> <Name>rule02</Name> <Title>10 ft contours … Continue reading SLD for contour data

Geometry Collections and Small Headaches

The disk that held the personal geodatabases of our contour datasets died a while back, but not before I loaded the contours into PostGIS and started serving them up. Our new intern is working on putting together some shapefiles layer groups in ArcGIS for map production, and asked for a missing one… . I don’t have it, but in principle can always extract it from … Continue reading Geometry Collections and Small Headaches

Optimizing PostGIS Geometry Functions– Mmm. Donut.

Well, how can I PostGIS without referring back to BostonGIS.  One day I’ll know… .  But first, the Simpsons:  “Mmm… … Donut.” A while back I read Regina Obe’s BostonGIS post on “Map Dicing,” essentially using a grid to dice up an existing dataset to a small granularity in order to take full advantage of spatial indexing, etc..  The post really intrigued me, and is … Continue reading Optimizing PostGIS Geometry Functions– Mmm. Donut.

Contour data and table management in PostGIS

My contour dataset is almost ready to go live.  Just a few more tweaks.  I was manipulating it in the public schema.  I really want it in my base map schema “base”. Want to change schemas on a table in Postgre? No problem: ALTER TABLE public.cuy_contours_2_clip SET SCHEMA base; Rename a table? No problem: ALTER TABLE base.cuy_contours_2_clip RENAME TO base.cuy_contours_2; Save space by not storing … Continue reading Contour data and table management in PostGIS

Mapping places unknown– free global datasets and FOSS GIS are a great combo

I wanted to put together a quick and dirty map of a biological reserve in Ecuador, sort of a laptop exploration of a place quite distant.  At first, I thought I’d use Shuttle Radar Topography Misssion data to get the elevation information.  Then I discovered the ASTER Global DEM which is 30m resolution for the whole world.  Wow.  Cool cool data. (I used the Japanese … Continue reading Mapping places unknown– free global datasets and FOSS GIS are a great combo