[mapserver-users] Impact of InValid Geometry on PostGIS queries [SEC=UNCLASSIFIED]

Roppola, Antti - BRS Antti.Roppola at brs.gov.au
Thu Dec 18 16:41:07 EST 2008


Hi Ben,

Option "d" does exist. Proper GIS do not tolerate invalid geometries.

You could import it into Arc/INFO and use "clean" and "build" for some
heavy handed (but automatic) resolution of issues.

You may come a cropper if you (or someone) makes the right (wrong) kind
of
query against dirty geometries. Say there's a self intersection in an
arc that describes the boundary between "Black" and "White", the loop is
there being defined as Black *and* White. Not particularly good if your
code is expecting an un-ambiguous response.

(Arc/INFO would split the arcs at the loop intersect and create a new,
unlabeled
 polygon that says "Don't Know")

Unfortunately desktop GIS has also promoted the generation of dirty
data.

Antti 

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org
[mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Ben Madin
Sent: Thursday, 18 December 2008 6:08 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] Impact of InValid Geometry on PostGIS queries

G'day all,

I have a roads shapefile which I imported in PostGIS, planning to merge
several different countries data eventually. It is producing a layer on
the map, and labels etc.

However, the data isn't all good - in fact, about 10% is bad :

es=# select IsValid(the_geom), count(gid) from gis_roads group by
IsValid(the_geom);

  isvalid | count
----------+-------
               |  4128
       t       | 39670
(2 rows)

My question then is :

should I ?

a) leave it - it won't do any harm, but probably won't be rendered,
b) remove it - it may be incorrectly rendered, or waste processor time
on data that is unuseable,
c) fix it by hand (lazy git!)
d) fix it automatically, using super program I wasn't aware of.  
(called?)

actually, I don't have the time or budget for option c, and I suspect
option d does not exist!

cheers

Ben


------
IMPORTANT - This message has been issued by The Department of Agriculture, Fisheries and Forestry (DAFF). The information transmitted is for the use of the intended recipient only and may contain sensitive and/or legally privileged material. It is your responsibility to check any attachments for viruses and defects before opening or sending them on. 

Any reproduction, publication, communication, re-transmission, disclosure, dissemination or other use of the information contained in this e-mail by persons or entities other than the intended recipient is prohibited. The taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this e-mail in error please notify the sender and delete all copies of this transmission together with any attachments. If you have received this e-mail as part of a valid mailing list and no longer want to receive a message such as this one advise the sender by return e-mail accordingly. Only e-mail correspondence which includes this footer, has been authorised by DAFF 

------



More information about the mapserver-users mailing list