[postgis-users] XMap and GoogleMap

Barend Köbben kobben at itc.nl
Fri Nov 11 00:56:27 PST 2005


This depends on the software(s) you're using. I found that some software does uphold the  norm' (I do not think it is officially a standard anywhere) of having points in outside rings in Clockwise (CW) order and those of holes counterclockwise (CCW).  The OGC Simple Features document does not specify it a a standard though and I found many softwares don't enforce the rule, eg. ArcGIS shapefiles exported to GML using the Safe Software FME translator or to PostGIS using their shp2pgsql utility have mixed CW/CCW holes. 

I found that for transforming SFS/GML to SVG in my RIMapper project (http://kartoweb.itc.nl/RIMapper) I had to normalise them to enforce the CW-CCW rule as SVG uses it to corretly render fills  (I used the Normalize() function in Java Topology Tools).

yours,

____________________________

Barend Köbben
International Institute for Geo-information 
Sciences and Earth Observation (ITC) 
PO Box 6, 7500AA Enschede (The Netherlands)
ph: +31 (0)53 4874253; fax: +31 (0)53 4874335


 

> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net 
> [mailto:postgis-users-bounces at postgis.refractions.net] On 
> Behalf Of Jürgen Mischker
> Sent: 11 November 2005 08:04
> To: postgis-users at postgis.refractions.net
> Subject: [postgis-users] XMap and GoogleMap
> 
> I think I got it, the problem are the polygons with holes, 
> does XMap can#t rendering them?
> 
> On Thu, Nov 10, 2005 at 09:24:44AM +0100, Jürgen Mischker wrote:
> > I am doing some work in php to read geodata from a PostGIS 
> database, modify them to create an overly for the 
> GoogleMap[1] API by using XMap [2].
> > 
> > I started with a MULTIPOLYGON layer and it seems that the 
> order of the points, describing the polygons, is not unimportant.
> > My dataset: I got a shapefile (some soil data from lovely 
> NewZealand), shp2psql to chuck them into the database. So I 
> think the order of the points in the shapefile must be ok, 
> otherwise ArcGIS would not render te map correctly. 
> > Does somebody has an idea what the shp2psql does with the 
> order of the points?
> 
> It doesn't change them, but uses them to determine which rings
> are shells and which one are holes (as for shapefile format spec).
> Why are you asking ? Are you having problems rendering them ?
> 
> --strk;
> 
> _______________________________________________
> 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