← Back to team overview

dhis2-devs team mailing list archive

Re: Debugging some JSON in the GIS module

 

We decided back in the day that we only wanted to deal with points and
multipolygons, so the GML importer accepts both polygon and MP coordinates
but converts polygon coordinates to MP coordinates before inserting it in
the db. The GIS app is relying on this and supports points and MP
coordinates only (though both "Polygon" and "MultiPolygon" as featuretype).
Which admittedly is not very alternative-importation friendly.




On Tue, Jun 10, 2014 at 5:49 PM, Jason Pickering <
jason.p.pickering@xxxxxxxxx> wrote:

> Yeah, well, I did not use the GML importer, because my geodata has
> non-unique names, and there is currently no way (which I know of) to get
> around this. So, I created SQL and imported this directly into the system.
> Postgresql claims the FeatureType is already "Polygon", so it seems a bit
> strange that I would need to coerce the Polygons to MultiPolygons to get it
> to work?
>
> Regards,
> Jason
>
>
>
> On Tue, Jun 10, 2014 at 5:46 PM, Jan Henrik Øverland <
> janhenrik.overland@xxxxxxxxx> wrote:
>
>> The GML importer inserts "Polygon" into the "featuretype" field though,
>> so it is not obvious. Should ideally be changed. The GIS app accepts both
>> "Polygon" and "MultiPolygon".
>>
>>
>> On Tue, Jun 10, 2014 at 5:39 PM, Jason Pickering <
>> jason.p.pickering@xxxxxxxxx> wrote:
>>
>>> Thanks Jan. That worked perfectly. I should have remembered this from
>>> before, as I think you have answered the same question before. :)
>>>
>>> Regards,
>>> Jason
>>>
>>>
>>>
>>> On Tue, Jun 10, 2014 at 5:20 PM, Jan Henrik Øverland <
>>> janhenrik.overland@xxxxxxxxx> wrote:
>>>
>>>> These are polygons. Just add another "[" and "]" to the coordinates to
>>>> make them multi-polygons and it will work.
>>>>
>>>>
>>>> On Tue, Jun 10, 2014 at 5:11 PM, Jason Pickering <
>>>> jason.p.pickering@xxxxxxxxx> wrote:
>>>>
>>>>> We have for various reasons, needed to import coordinate data directly
>>>>> into the database, but are having some issues displaying it in the GIS
>>>>> client.
>>>>>
>>>>> Here is the response, which is giving issues. See below.
>>>>>
>>>>> Here is the response.
>>>>>
>>>>> http://pastebin.com/03qxrTEs
>>>>>
>>>>> Any help would be appreciated.
>>>>>
>>>>> Best regards,
>>>>> Jason
>>>>>
>>>>>
>>>>>
>>>>>    1. Uncaught TypeError: Cannot read property 'length' of null
>>>>>    core.js:2271
>>>>>       1. util.map.getTransformedFeatureArraycore.js:2271
>>>>>       2. Ext.data.JsonP.request.successcore.js:1458
>>>>>       3. Ext.apply.callbackext-all.js:15
>>>>>       4. Ext.define.handleResponseext-all.js:15
>>>>>       5. (anonymous function)ext-all.js:15
>>>>>       6. (anonymous function)
>>>>>       getGeoJson.action?ids=LEVEL-4&ids=AWn3s2RqgAN&callback=Ext.data.JsonP.callback3:1
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>>
>>>>
>>>
>>
>

References