← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] Betr: Import of coordinates fails in v2.27(DHIS2)

 

Hello all.

I have yet to submit an issue regarding this. In my case it was impossible
to upload coordinates in CSV for event data. I tried with header, without
header, using square brackets for the coordinates, using quotation marks,
etc.

If you have a comma without quotation marks the parser will think the
second value belongs to the next column. If you have quotation marks it
will not interpret the value as type coordinate and the import will fail.

The only way I got around the problem was to import the data using XML.

It would be nice to know if you can't make it work. That way I'd have more
confidence submitting a ticket on JIRA.



On Thu, Aug 17, 2017 at 6:32 AM Gijsbert OOMS <gijsbert.ooms@xxxxxxxxxx>
wrote:

> Hi Kristiyan,
>
>
> Would it be possible that you have one extra column somewhere (maybe a
> double comma) ?
>
> The way I understood csv-imports, DHIS2 doesn't read the column names in
> your csv but just counts the colums (see list of colums here
> <https://docs.dhis2.org/2.26/en/developer/html/webapi_csv_metadata_import.html>,
> Table 1.17). Coordinates should be in column nr 12, url should be in nr 13.
> From the log, it seems that DHIS2 thinks that you try to import a url. This
> probably means that your coordinates are in column nr 13 or "M", while they
> should be in column nr 12 or "N".
>
>
> *GIJSBERT OOMS*
> EXPERT D4D - Digitalisation for Development
>
> BELGIAN DEVELOPMENT AGENCY
> RUE HAUTE 147
> 1000 BRUSSELS
> T +32 (0)2 505 18 44
> F +32 (0)2 502 98 62
> M +32 (0)477 300 770
> WWW.BTCCTB.ORG <http://www.btcctb.org/>
>
> *Save paper! Think before you print*
>
>
>
> Van:        Kristiyan Panayotov <Kristiyan@xxxxxxxxxxxxxxxxxxx>
> Aan:        "dhis2-devs@xxxxxxxxxxxxxxxxxxx" <
> dhis2-devs@xxxxxxxxxxxxxxxxxxx>, "dhis2-users@xxxxxxxxxxxxxxxxxxx" <
> dhis2-users@xxxxxxxxxxxxxxxxxxx>
> Cc:        Solomon Kununga <Solomon@xxxxxxxxxxxxxxxxxxx>
> Datum:        16/08/2017 10:23
> Onderwerp:        [Dhis2-users] Import of coordinates fails in
> v2.27(DHIS2)
> Verzonden door:        "Dhis2-users" <dhis2-users-bounces+gijsbert.ooms=
> btcctb.org@xxxxxxxxxxxxxxxxxxx>
> ------------------------------
>
>
>
>
> Dear all,
>
> My case is regarding the following: *DHIS->Import->CSV->Organizational
> Units->Coordinates.* I am not sure whether this is a bug or not well
> described in the documentation but import of coordinates does not work
> properly DHIS2 v.2.27.
>
> I have tried numerous combinations of arranging the latitude and longitude
> in my .CSV file and none of that worked when import in DHIS2. My feature
> type is “POINT”. This is the "Conflict" I get:
>
> ~
> Main Type           Error Type           Description
> OrganisationUnit              String    Property `url` requires a valid
> URL, was given `[36.035858,31.871833]`.
> ~
> Combinations were made with: dots, commas, space, most type of brackets,
> rotating latitude and longitude, etc.
>
>
> When I entered coordinates manually in DHIS2 for a single OrgUnit and I
> could successfully view that POINT on a map. This is what I get from a XML
> export of Organization Units regarding manually input of coordinates:
>
> <featureType>POINT</featureType>
> <coordinates>[36.035858,31.871833]</coordinates>
>
> Your help will be very appreciated as I need to enter approximately 2000
> Point coordinates for Organizational Units.
>
> Kind Regards,
> Kristiyan Panayotov
>
>
>
>
>
> Kristiyan Panayotov | Data analyst, *http://www.logicaloutcomes.net/*
> <http://www.logicaloutcomes.net/>
> *kristiyan@xxxxxxxxxxxxxxxxxxx* <http://kristiyan@xxxxxxxxxxxxxxxxxxx%20>
> | Sofia +359 889 318 878 | Skype ID: kr.panayotov
>  _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>

GIF image


References