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)

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.)

What is the center line of a complex polygon?

Sat in on a great presentation yesterday by Tim Schaub and Justin Deoliveira on GeoScript. Definitely check out their tutorials. To practice what I learned, I thought I’d apply it to the problem of how to find the centerline of a polygon. What do I mean by the centerline of a polygon? Well in the case of a stream that is drawn with both it’s … Continue reading What is the center line of a complex polygon?

Debian Configuration– Tomcat on Boot, revision

I revised my startup script for Tomcat to use a non-privileged user for security reasons. I used the following page as my resource: http://linux-sxs.org/internet_serving/c140.html #!/bin/sh # /etc/init.d/tomcat6: start Tomcat6 server. test -f /opt/apache-tomcat-6.0.32/bin/startup.sh || exit 0 PATH=$PATH:/opt/apache-tomcat-6.0.32/bin/ case “$1” in start) export JAVA_HOME=/opt/jre1.6.0_26/ logger -t Tomcat6 “Starting Tomcat 6…” exec su – tomcat -c /opt/apache-tomcat-6.0.32/bin/startup.sh | logger -t Tomcat6 ;; stop) export JAVA_HOME=/opt/jre1.6.0_26/ logger -t … Continue reading Debian Configuration– Tomcat on Boot, revision

Really loooong WMS requests

We have a GeoExt/Mapfish/GeoServer/PostGIS stack in house that allows us to print nice maps through a web interface. There has been a ceiling, however, as far as size– 140dpi and 22×34 has been the largest we’ve been able to render maps, and even then, sometimes the layers are too complicated. For a long time I was under the naïve impression that it was a memory … Continue reading Really loooong WMS requests

GDAL, MrSid, and nearblack

Translating MrSid lossy compressed files into uncompressed imagery has its drawbacks, including licensing and artifacts. Old versions of fwtools, which includes the GDAL utilities (and more), were compiled with a license that allowed for the translation of MrSid into e.g. Erdas Imagine images or GeoTiff. The licensing changed on that library, so FWTools and MS4W don’t do this anymore. If you have a compiled version … Continue reading GDAL, MrSid, and nearblack

HTML Tags for code pre & code tags

I’ve spent little time looking at the formatting on my blog.  As the code has gotten longer, it’s gotten unacceptable that tabs and other formatting don’t show up correctly.  A little google-fu and thanks to this blog post: http://www.sohtanaka.com/web-design/styling-pre-tags-with-css-code-block/ I’ve reformated 25+ of my posts with more readable code with tabs and the whole bit.  I could go through and reformat everything, but I probably … Continue reading HTML Tags for code pre & code tags

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