Re: GML or WKT in GeoSPARQL

Hello John,

Thanks for your response, it is good to know the viewpoint and plans of 
the Ordnance Survey. It made me give GML a little more credit.

I have just discovered that PostGIS does allow me to handle the 
precision problem gracefully: Apparently PostGIS retains the precision 
of the coordinates when a geometry is created. So in case one has 
control over the creation of the data set in PostGIS, it is a matter of 
getting the coordinates to have the right precision before loading them 
in PostGIS.

To my knowledge, GeoJSON is not allowed by GeoSPARQL, just WKT or GML. 
Of course, publishing both GML and WKT could also be an option. That 
would leave it up to the data consumer to pick a favourite. A drawback 
in that scenario would be that the response from directly dereferencing 
the URI of a spatial object would be considerably bloated.

As for the PostGIS problem you describe, I think it should be possible 
to first select the multipolygons that are in fact a single polygon with 
the function ST_NumGeometries() and then transform the multipolygons to 
polygons using the function ST_GeometryN().

Regards,
Frans

On 11-4-2013 11:23, John Goodwin wrote:
>
> Hi Frans,
>
> The Ordnance Survey linked data (which doesn't currently use 
> GeoSPARQL, but uses a very similar ontology made in house -- we will 
> migrate over time) opted for GML. Our decision was largely because it 
> is the 'format of choice' for many of our main products and also 
> favoured by INSPIRE.
>
> Interesting I had an issue with ogr2ogr when converting a shape file 
> to GML that I couldn't control the decimal places and there were all 
> sort of strange round errors occurring (in EPSG:27700).
>
> With POSTGIS I had trouble loading a shape file that contained mixed 
> geometry types. Either post gis loaded everything as multisurface or 
> threw an error if I tried to load the simple geometries. I opted for 
> FME follow by some XSL in the end.
>
> Another option -- and I **think** it's allowed by GeoSPARQL is GeoJSON.
>
> John
>
> *Dr John Goodwin*
>
> *Principal Scientist*
>
> *Research, Ordnance Survey *
>
> *Adanac Drive, SOUTHAMPTON, United Kingdom, SO16 0AS *
>
> *Phone: +44 (0) 23 8005 5761 *
>
> *www.ordnancesurvey.co.uk <http://www.ordnancesurvey.co.uk/> | 
> john.goodwin@ordnancesurvey.co.uk 
> <mailto:john.goodwin@ordnancesurvey.co.uk> *
>
> *Please consider your environmental responsibility before printing 
> this email.*
>
> *From:*Frans Knibbe | Geodan [mailto:frans.knibbe@geodan.nl]
> *Sent:* 11 April 2013 10:07
> *To:* public-locadd@w3.org
> *Subject:* GML or WKT in GeoSPARQL
>
> Hello,
>
> The GeoSPARQL standard allows for two ways of representing geometry: 
> GML or WKT. I have always thought WKT to be the preferred format, 
> because of its greater simplicity and its wider software support. But 
> now I have discovered a drawback of WKT: It does not seem possible to 
> control coordinate precision when transforming geometry to WKT in 
> PostGIS. Unlike the function ST_AsGML(), the PostGIS function 
> ST_AsText() does not have a parameter /maxdecimaldigits/. This can 
> cause data to be bloated as well as erroneous.
>
> What do you think?
> Would it make sense to investigate the pros and cons of WKT and GML 
> for serialisation of geometry in this group?
>
> Regards,
> Frans
>
> -- 
> --------------------------------------
> *Geodan*
> President Kennedylaan 1
> 1079 MB Amsterdam (NL)
>
> T +31 (0)20 - 5711 347
> E frans.knibbe@geodan.nl <mailto:frans.knibbe@geodan.nl>
> www.geodan.nl <http://www.geodan.nl> | disclaimer 
> <http://www.geodan.nl/disclaimer>
> --------------------------------------
>
> This email is only intended for the person to whom it is addressed and may contain confidential information. If you have received this email in error, please notify the sender and delete this email which must not be copied, distributed or disclosed to any other person.
>
> Unless stated otherwise, the contents of this email are personal to the writer and do not represent the official view of Ordnance Survey. Nor can any contract be formed on Ordnance Survey's behalf via email. We reserve the right to monitor emails and attachments without prior notice.
>
> Thank you for your cooperation.
>
> Ordnance Survey
> Adanac Drive
> Southampton SO16 0AS
> Tel: 08456 050505
> http://www.ordnancesurvey.co.uk
>
>
>
>


-- 
--------------------------------------
*Geodan*
President Kennedylaan 1
1079 MB Amsterdam (NL)

T +31 (0)20 - 5711 347
E frans.knibbe@geodan.nl
www.geodan.nl <http://www.geodan.nl> | disclaimer 
<http://www.geodan.nl/disclaimer>
--------------------------------------

Received on Thursday, 11 April 2013 10:55:46 UTC