[postgis-users] pgsql2shp, simplify and shape

Tore Halset halset at pvv.ntnu.no
Tue Dec 20 03:44:29 PST 2005


Hello.

Soory, my mistake. An old OpenMap index file was laying around. Blush!

  - Tore.

On Dec 20, 2005, at 12:31, Tore Halset wrote:

> Hello.
>
> I have imported inwatera from vmap0 into postgis. Looks ok. Export  
> using pgsql2shp and visualizing in OpenMap works also.
>
> I want to create a simplifyed shape-file as well. Tried with this:
>
> pgsql2shp -f inwatera-thin vmap0-convert "select simplify(the_geom,  
> 0.1) from inwatera where area(the_geom) > 0.1"
>
> OpenMap does not like the produced shape file and are reporting:
>
> java.io.IOException: Invalid polygon record. Expected shape type 5  
> or type 3, but found 1073741824
> 	at com.bbn.openmap.layer.shape.ESRIPolygonRecord.<init> 
> (ESRIPolygonRecord.java:77)
> 	at com.bbn.openmap.layer.shape.SpatialIndex.makeESRIRecord 
> (SpatialIndex.java:234)
> 	at com.bbn.openmap.layer.shape.SpatialIndex.locateRecords 
> (SpatialIndex.java:359)
> 	at com.bbn.openmap.layer.shape.ShapeLayer.prepare(ShapeLayer.java: 
> 433)
> 	at com.bbn.openmap.layer.policy.StandardRenderPolicy.prepare 
> (StandardRenderPolicy.java:67)
>
> Is this a OpenMap error or am I creating the shape-file incorrect?  
> I guess the later as OpenMap are able to display the exported shape- 
> file if I do not use simplify().
>
> I am using PostgreSQL 8.1.1 with PostGIS 1.0.6 on a amd64 FreeBSD box:
> POSTGIS="1.0.6" GEOS="2.2.1" PROJ="Rel. 4.4.9, 29 Oct 2004"  
> USE_STATS DBPROC="0.3.0" RELPROC="0.3.0"
>
> Regards,
>  - Tore.
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users




More information about the postgis-users mailing list