[postgis-users] GML > PostGIS
p.brewer at cornell.edu
Wed Jan 7 13:17:13 PST 2009
I don't have any GML documents to hand, but the tutorial I linked to
earlier includes one:
The schema I posted isn't GIS-centric, it's for transferring scientific
(dendrochronological) data. The geography data within it are mostly
point locations of trees and polygons of archaeological sites and are as
such 'attributes' of the main dendrochronological data. We have the
webservice handling the main data happily, the GML is one of the last
few sticking points. I didn't want to have to resort to plain old lat
and longs as the GML means we can have data in different coordinate
systems. The schema is an emerging global standard so we need to
accommodate the needs of users around the world - including allowing
the use of national coordinates.
Many thanks for your input.
Martin Davis wrote:
> Glad you found a solution, Peter. Just out of interest, do you have
> any sample *GML documents* you can post?
> I have to say, that schema looks pretty complicated. Are you hoping
> to load the attribute values as well? No doubt ogr can handle this -
> but I wouldn't call it a "simple exercise" to code that up!
> Peter Brewer wrote:
>> Thanks for the prompt reply.
>> The schema is being developed and is open to suggestions. At the
>> moment we are keeping it ultra simple and just specifying the
>> following element in the relevant locations:
>> <xs:element name="locationGeometry">
>> <xs:element ref="gml:Point"/>
>> <xs:element ref="gml:Polygon"/>
>> The full schema is at: http://tridas.org/1.0/tridas.xsd
>> I know it would be pretty simple to parse gml:Point and gml:Polygon
>> myself, but I'd rather not reinvent the wheel. Besides, I imagine
>> that in the future we'll extend the schema to support full SF-GML so
>> I was hoping someone would have already written a SF-GML>PostGIS
>> Best wishes
>> Martin Davis wrote:
>>> Do you have a fixed schema? Can you post an example GML document?
>>> Peter Brewer wrote:
>>>> Hi All,
>>>> I'm writing a webservice that reads and writes (amongst other things)
>>>> location data to/from a Postgres/PostGIS database.
>>>> Outputting the data as GML from the database is easy using the asGML()
>>>> PostGIS function. What I'm pondering over is how to write data to the
>>>> database when sent by the user in GML format.
>>>> GDAL/OGR doesn't seem to allow GML > PostGIS conversion. Any ideas
>>>> I can do this? I'm restricting users to the 'Simple Features'
>>>> subset of
>>>> GML so I only need to be able to write points, lines and polygons
>>>> to the
>>>> database. Am I really stuck with parsing the GML myself and writing
>>>> PostGIS SQL statements? It doesn't seem enormously difficult so I'm
>>>> wondering why there isn't a library to do this already.
>>>> Any help or pointers much appreciated
>>>> postgis-users mailing list
>>>> postgis-users at postgis.refractions.net
>> postgis-users mailing list
>> postgis-users at postgis.refractions.net
More information about the postgis-users