Click here to get back home

GML: valid polygons

 HomeNewsGroups | Search | About
 comp.infosystems.gis    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
GML: valid polygons Ronald Müller 06-17-2005
Posted by Ronald Müller on June 17, 2005, 12:26 pm
Please log in for more thread options
Hallo group,

what says the GML specification about conformance (validity) of
geometries described in a document ?

example :

i've got a GML-file, which describes boundaries of various countries
with polygons and multipolygons. The XML-schema validates correct. But
some of this polygons contains self-intersections. Is the GML-file valid
from specifications point of view ? There is public available spec for
GIS-DBs "OpenGIS Simple Features Specification for SQL", which definitly
says NO to such geometries, but is it the same for GML? IMHO GML is not
just a language for describing geometries, but even for valid content !?

thank you so far

Ronald


Posted by Paul Cooper on June 17, 2005, 4:58 pm
Please log in for more thread options
On Fri, 17 Jun 2005 12:26:23 +0200, Ronald Müller

>Hallo group,
>
>what says the GML specification about conformance (validity) of
>geometries described in a document ?
>
>example :
>
>i've got a GML-file, which describes boundaries of various countries
>with polygons and multipolygons. The XML-schema validates correct. But
>some of this polygons contains self-intersections. Is the GML-file valid
>from specifications point of view ? There is public available spec for
>GIS-DBs "OpenGIS Simple Features Specification for SQL", which definitly
>says NO to such geometries, but is it the same for GML? IMHO GML is not
>just a language for describing geometries, but even for valid content !?
>
>thank you so far
>
>Ronald


GML is a transfer mechanism, so validation of geometry isn't its job -
it is the job of the software that creates it and receives it. The
latest version (3.1.?) of GML does include mechanisms for expressing
topology that might help, but basically validation at that level is
not possible wiithin the XML validations that can be applied. We can
only check that the XML is valid and conforms to the schema that
defines XML. As the coordinate information may well be held (for
example) as strings of coordinates, then it is below the level of
granularity of that XML "sees" and can validate.

And I wouldn't be so sure that a self-intersection is automatically an
error. Yes, it is in most instances, but (for example) it used to be
perfectly possible to create a polygon in a shapefile that
self-intersected. And, of course, a polygon that is the two
dimensional projection of a figure in 3 dimensions could very well
self-intersect! GML is intended for all manner of spatial information,
not just geographic information, and in an engineering context it
could be perfectly correct.

Paul


Posted by Ronald Müller on June 20, 2005, 10:27 am
Please log in for more thread options
Paul Cooper wrote:
> On Fri, 17 Jun 2005 12:26:23 +0200, Ronald Müller
>
> [...]
>
>
> GML is a transfer mechanism, so validation of geometry isn't its job -
> it is the job of the software that creates it and receives it. The
> latest version (3.1.?) of GML does include mechanisms for expressing
> topology that might help, but basically validation at that level is
> not possible wiithin the XML validations that can be applied. We can
> only check that the XML is valid and conforms to the schema that
> defines XML. As the coordinate information may well be held (for
> example) as strings of coordinates, then it is below the level of
> granularity of that XML "sees" and can validate.
>
> And I wouldn't be so sure that a self-intersection is automatically an
> error. Yes, it is in most instances, but (for example) it used to be
> perfectly possible to create a polygon in a shapefile that
> self-intersected. And, of course, a polygon that is the two
> dimensional projection of a figure in 3 dimensions could very well
> self-intersect! GML is intended for all manner of spatial information,
> not just geographic information, and in an engineering context it
> could be perfectly correct.
>
> Paul

Hallo Paul,

thanks for your comprehensive answer. Let me do some additional notes to
this topic.

I found out that GML 2 (and 3 too) are definitly based on the Simple
Feature Specification from OGC, for that reason selfintersecting
polygons are NOT valid at all.

Ronald


Posted by Paul Cooper on June 20, 2005, 5:43 pm
Please log in for more thread options

>Hallo Paul,
>
>thanks for your comprehensive answer. Let me do some additional notes to
>this topic.
>
>I found out that GML 2 (and 3 too) are definitly based on the Simple
>Feature Specification from OGC, for that reason selfintersecting
>polygons are NOT valid at all.
>
>Ronald

GML 3.1.1 (I think - the version number changes!) extends well beyond
the simple feature specification - to incorporate topology it has to.
It is also in the last stages of becoming an ISO standard, the plan
being that it will be jointly issued by both ISO and OGC. AFAIR it
implements the full ISO feature specification.

However, the point is simply that there is no way that schema based
validation can check for intersections, as a) XML validation doesn't
have the capability and b) coordinate strings are held as elements,
and are thus below the granularity of XML validation. So, something
may be perfectly valid GML (in terms of XML validation against the
schemas) and yet contain errors. All the schema validation can do is
check that you have the right kinds of elements in the right
structural relationship to each other. It can't check the contents of
elements except in a few simple cases (e.g. integer, real, URL so on).

Paul


Posted by Thomas Lee on July 10, 2005, 12:50 am
Please log in for more thread options
Hi,

Totally agree with Peter because GML as a kind of XML which is a textual
description of information, GML is simply a textual description of
geographical information that does not check (check is a process, it is not a
process) 2D or 3D intersection.

However if someone translate SFS to GML then there should not have
intersection. But we need to ask if the GML data is really converted from
SFS. If metadata of GML has this description, source data of the GML, it
could maintain this spatial integrity of topology.

Thomas Lee
www.starvision.com.hk

Paul Cooper wrote:

> >Hallo Paul,
> >
> >thanks for your comprehensive answer. Let me do some additional notes to
> >this topic.
> >
> >I found out that GML 2 (and 3 too) are definitly based on the Simple
> >Feature Specification from OGC, for that reason selfintersecting
> >polygons are NOT valid at all.
> >
> >Ronald
>
> GML 3.1.1 (I think - the version number changes!) extends well beyond
> the simple feature specification - to incorporate topology it has to.
> It is also in the last stages of becoming an ISO standard, the plan
> being that it will be jointly issued by both ISO and OGC. AFAIR it
> implements the full ISO feature specification.
>
> However, the point is simply that there is no way that schema based
> validation can check for intersections, as a) XML validation doesn't
> have the capability and b) coordinate strings are held as elements,
> and are thus below the granularity of XML validation. So, something
> may be perfectly valid GML (in terms of XML validation against the
> schemas) and yet contain errors. All the schema validation can do is
> check that you have the right kinds of elements in the right
> structural relationship to each other. It can't check the contents of
> elements except in a few simple cases (e.g. integer, real, URL so on).
>
> Paul



Similar ThreadsPosted
How to select polygons in a shape layer by polygons of a second shape layer? May 19, 2008, 3:24 pm
Which GIS application can group lines into polygons? January 4, 2007, 4:39 pm
How to use data points for shading polygons in ArcMap? May 3, 2006, 9:35 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap