← Back to team overview

dhis2-devs team mailing list archive

Re: Possible issue with GML import

 

Hi

Another change that would be advantageous would also be to drop the
requirement that the datum have to be WGS-84 standard - some countries are
using other datum standards and might prefer to have all their data in that
datum.

Note though, that this is less important in practice than the ability to
import shapefiles directly.

Regards
Calle

On 25 March 2015 at 12:11, Calle Hedberg <calle.hedberg@xxxxxxxxx> wrote:

> Hi
>
> HISP-SA would strongly support dropping the GML step - or at least to
> short-cut it with an option to import shapefiles directly. GML adds nothing
> to the mix, it just makes the process more cumbersome and "techie".
>
> Regards
> Calle
>
> On 24 March 2015 at 18:57, Knut Staring <knutst@xxxxxxxxx> wrote:
>
>> Hi Jason (and Halvdan),
>>
>> Not directly related, but since GML is coming up again, it could perhaps
>> be good to revisit Sushil's app, which is meant to bypass GML and import
>> shapefiles directly.
>>
>> If you (and others on the list) have some time, it would be good to get
>> more feedback on it.
>>
>> Knut
>>
>> On Tue, Mar 24, 2015 at 4:05 PM, Halvdan Grelland <halvdanhg@xxxxxxxxx>
>> wrote:
>>
>>> Yeah as discussed just now we should support output from qgis and gdal
>>> at least. Currently working on that.
>>>
>>> 2015-03-24 16:03 GMT+01:00 Jason Pickering <jason.p.pickering@xxxxxxxxx>
>>> :
>>>
>>>> I just exported this from QGIS.  Would seem strange if we could not
>>>> support this,as it was just an export from a shape file.
>>>>
>>>> Regards
>>>> Jason
>>>> On Mar 24, 2015 9:30 AM, "Halvdan Grelland" <halvdanhg@xxxxxxxxx>
>>>> wrote:
>>>>
>>>>> Actually, small error in my example: pos elements should have lat and
>>>>> long separated by whitespace:
>>>>>
>>>>> <gml:pos>-45.046450667490049 30.904516454945856</gml:pos
>>>>>
>>>>> 2015-03-24 14:05 GMT+01:00 Halvdan Grelland <halvdanhg@xxxxxxxxx>:
>>>>>
>>>>>> By the way, here is the relevant quote from the GML Point Profile:
>>>>>>
>>>>>> "A Point is defined by a single coordinate tuple, with the coordinate
>>>>>> values being specified by the gml:pos property. Data instances compliant
>>>>>> with this profile shall use only the gml:pos property."
>>>>>>
>>>>>> 2015-03-24 13:57 GMT+01:00 Halvdan Grelland <halvdanhg@xxxxxxxxx>:
>>>>>>
>>>>>>> The gml:Point element only supports gml:pos coordinate tuples (a
>>>>>>> single one, of course). The gml:coordinates element is expected to have
>>>>>>> multiple points, which is why it is parsed in that particular way.
>>>>>>>
>>>>>>> The only real bug on our part here is that we for some reason allow
>>>>>>> gml:Point to contain a gml:coordinates element with a single contained
>>>>>>> coordinate, thus being incorrectly output as seen in Jasons example. I
>>>>>>> realize we might have allowed this for a while, though, as the logics of
>>>>>>> this has remained unchanged by the recent GML importer rewrite.
>>>>>>>
>>>>>>> My suggestion is that we follow the standard GML point profile and
>>>>>>> remove support for gml:coordinates within gml:Point entirely. Jason, could
>>>>>>> you try with the following XML, please:
>>>>>>>
>>>>>>>  <gml:featureMember>
>>>>>>>     <ogr:OpenDemolandHealthFacilities
>>>>>>> fid="OpenDemolandHealthFacilities.4">
>>>>>>>       <ogr:geometryProperty><gml:Point
>>>>>>> srsName="EPSG:4326"><gml:pos>-45.046450667490049,30.904516454945856</gml:pos></gml:Point></ogr:geometryProperty>
>>>>>>>       <ogr:Name>Crow Site</ogr:Name>
>>>>>>>       <ogr:NAME_1>Bird</ogr:NAME_1>
>>>>>>>       <ogr:Region>Animal</ogr:Region>
>>>>>>>       <ogr:Country>Demoland</ogr:Country>
>>>>>>>     </ogr:OpenDemolandHealthFacilities>
>>>>>>>   </gml:featureMember>
>>>>>>>
>>>>>>> Of course, If you feel otherwise let me know.
>>>>>>>
>>>>>>> Halvdan
>>>>>>>
>>>>>>> 2015-03-24 13:09 GMT+01:00 Jan Henrik Øverland <
>>>>>>> janhenrik.overland@xxxxxxxxx>:
>>>>>>>
>>>>>>>> Halvdan, quick fix. Points should never have more than one set of
>>>>>>>> brackets.
>>>>>>>>
>>>>>>>> On Tue, Mar 24, 2015 at 12:01 PM, Jason Pickering <
>>>>>>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>>>>>>
>>>>>>>>> Hi there.
>>>>>>>>>
>>>>>>>>> I am using the GML importer to import coordinates.
>>>>>>>>>
>>>>>>>>> Here is a snippet of the GML I am importing
>>>>>>>>>
>>>>>>>>>  <gml:featureMember>
>>>>>>>>>     <ogr:OpenDemolandHealthFacilities
>>>>>>>>> fid="OpenDemolandHealthFacilities.4">
>>>>>>>>>       <ogr:geometryProperty><gml:Point
>>>>>>>>> srsName="EPSG:4326"><gml:coordinates>-45.046450667490049,30.904516454945856</gml:coordinates></gml:Point></ogr:geometryProperty>
>>>>>>>>>       <ogr:Name>Crow Site</ogr:Name>
>>>>>>>>>       <ogr:NAME_1>Bird</ogr:NAME_1>
>>>>>>>>>       <ogr:Region>Animal</ogr:Region>
>>>>>>>>>       <ogr:Country>Demoland</ogr:Country>
>>>>>>>>>     </ogr:OpenDemolandHealthFacilities>
>>>>>>>>>   </gml:featureMember>
>>>>>>>>>
>>>>>>>>> This seems to import fine, but on the database side, I see this
>>>>>>>>>
>>>>>>>>>  Crow Site               | [[-45.0465,30.9045]]
>>>>>>>>>
>>>>>>>>> Note, the double square brackets. The GIS says there are no valid
>>>>>>>>> coordinates.
>>>>>>>>>
>>>>>>>>> When I replace these double brackets with single ones
>>>>>>>>>
>>>>>>>>> Crow Site               | [-45.0465,30.9045]
>>>>>>>>>
>>>>>>>>> Things work OK. This is a 2.19 snapshot version, unsure of the
>>>>>>>>> revision.
>>>>>>>>>
>>>>>>>>> Is this an issue possibly with rev 18488?
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Jason
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Jason P. Pickering
>>>>>>>>> email: jason.p.pickering@xxxxxxxxx
>>>>>>>>> tel:+46764147049
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Mailing list: https://launchpad.net/~dhis2-devs
>>>>>>>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>>>>>>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>>>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~dhis2-devs
>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~dhis2-devs
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
>
> --
>
> *******************************************
>
> Calle Hedberg
>
> 46D Alma Road, 7700 Rosebank, SOUTH AFRICA
>
> Tel/fax (home): +27-21-685-6472
>
> Cell: +27-82-853-5352
>
> Iridium SatPhone: +8816-315-19274
>
> Email: calle.hedberg@xxxxxxxxx
>
> Skype: calle_hedberg
>
> *******************************************
>
>


-- 

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

Email: calle.hedberg@xxxxxxxxx

Skype: calle_hedberg

*******************************************

Follow ups

References