← Back to team overview

dhis2-users team mailing list archive

Re: Problem with gml import

 

That is good to hear Ese.  Though now you need to figure out how you ended
up with the invalid gml in the first place.  I think the ogr tool is
usually fairly reliable but perhaps Jan or Knut might have better insights
than I on this. OTOH you might no longer care now you have imported your
shapefiles :-)

On 6 July 2012 19:07, Ese Egerega <ese@xxxxxxxxxx> wrote:

> Dear All,
>
> Am glad to inform you that my gml file is now working[?] The email from
> Bob made all the difference. I corrected the line (43) that had error. I
> also removed the Name tag from Nigeria. See sample below:
>
> <gml:featureMember>
>     <ogr:NGA_adm1 fid="F29">
>       <ogr:ID_0>164</ogr:ID_0>
>       <ogr:ISO>NGA</ogr:ISO>
>       <ogr:NAME_0>Nigeria</ogr:NAME_0>
>       <ogr:ID_1>2045</ogr:ID_1>
>       <ogr:Name>Osun</ogr:Name>
>       <ogr:HASC_1>NG.OS</ogr:HASC_1>
>       <ogr:TYPE_1>State</ogr:TYPE_1>
>       <ogr:ENGTYPE_1>State</ogr:ENGTYPE_1>
>       <ogr:VALIDFR_1>1991</ogr:VALIDFR_1>
>       <ogr:VALIDTO_1>Present</ogr:VALIDTO_1>
>       <ogr:Shape_Leng>4.37967928308</ogr:Shape_Leng>
>       <ogr:Shape_Area>0.75293417293</ogr:Shape_Area>
>     </ogr:NGA_adm1>
>   </gml:featureMember>
>
>
> Ese
>
>
> On Fri, Jul 6, 2012 at 1:01 PM, Ese Egerega <ese@xxxxxxxxxx> wrote:
>
>> Hi Bob,
>>
>> I think there was a mix up. I have attached the right log.
>>
>> Thanks,
>> Ese
>>
>>
>> On Fri, Jul 6, 2012 at 11:35 AM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>wrote:
>>
>>> Hi Ese
>>>
>>> There are a few things wrong with this file
>>> (i)  on line 43 you have:
>>> <ogr:Shape_Leng>10.94<ogr:Shape_Leng>
>>>
>>> which should be
>>> <ogr:Shape_Leng>10.94</ogr:Shape_Leng>
>>>
>>> (ii) then in each of the featuremembers you have the Name element
>>> apearing twice, eg
>>> <ogr:ID_0>164</ogr:ID_0>
>>>       <ogr:ISO>NGA</ogr:ISO>
>>>       <ogr:Name>Nigeria</ogr:Name>
>>>       <ogr:ID_1>2017</ogr:ID_1>
>>>       <ogr:Name>Adamawa</ogr:Name>
>>>
>>> Its hard for me to understand how these strange errors have come
>>> about, but dhis2 cannot import this.  (it gets a duplicate Name
>>> constraint violation as Nigeria is everywhere).
>>>
>>> Having said that, these are not at all the same errors I saw from your
>>> attached log file.  So I am not convinced that the gml file you sent
>>> me is actually the one you were trying to import.  Is there some
>>> chance of a mixup here?
>>>
>>> Bob
>>>
>>> On 6 July 2012 10:24, Ese Egerega <ese@xxxxxxxxxx> wrote:
>>> > Sorry for the delay in responding Bob. I have attached a copy of the
>>> > generated gml file as well as the log
>>> >
>>> >
>>> > On Thu, Jul 5, 2012 at 4:43 PM, Bob Jolliffe <bobjolliffe@xxxxxxxxx>
>>> wrote:
>>> >>
>>> >> I have asked Ese (off list) to send me a copy of the generated gml
>>> >> file to check.
>>> >>
>>> >> Bob
>>> >> (Posting this in a new thread)
>>> >>
>>> >> On 5 July 2012 16:22, Jan Henrik Øverland <
>>> janhenrik.overland@xxxxxxxxx>
>>> >> wrote:
>>> >> > Hi Ese,
>>> >> >
>>> >> > there are a couple of other possible error causes in the gml as
>>> well,
>>> >> > like
>>> >> > orgunit duplicates and names that are too long for the shortname
>>> column
>>> >> > in
>>> >> > the database. The server log will probably give you a hint, so
>>> please
>>> >> > have a
>>> >> > look if you have access to it.
>>> >> >
>>> >> > On Thu, Jul 5, 2012 at 4:42 PM, Ese Egerega <ese@xxxxxxxxxx> wrote:
>>> >> >>
>>> >> >> I am wondering if anyone can be of help...I am having issues with
>>> the
>>> >> >> GIS
>>> >> >> module.
>>> >> >>
>>> >> >> I downloaded a shape file for my country and converted one of the
>>> >> >> extracted files (NGA_adm2.shp) to GML using ogr2gui.
>>> >> >>
>>> >> >> I further changed the "NAME_2" tag as directed. Finally, I made
>>> sure
>>> >> >> that
>>> >> >> the names in my gml file have exactly the same names as the org
>>> unit
>>> >> >> names
>>> >> >> in DHIS.
>>> >> >>
>>> >> >> The problem is that nothing happens when I import the GML file to
>>> DHIS.
>>> >> >> All the elements show "none"
>>> >> >>
>>> >> >> On Fri, Jun 29, 2012 at 12:20 AM, Ese Egerega <ese@xxxxxxxxxx>
>>> wrote:
>>> >> >>>
>>> >> >>> Hi Bob,
>>> >> >>>
>>> >> >>> Thanks a lot. I was having a similar problem with datamart but it
>>> was
>>> >> >>> fixed once I generated tables.
>>> >> >>>
>>> >> >>> Ese
>>> >> >>>
>>> >> >>>
>>> >> >>> On Wed, Jun 27, 2012 at 4:04 PM, Bob Jolliffe <
>>> bobjolliffe@xxxxxxxxx>
>>> >> >>> wrote:
>>> >> >>>>
>>> >> >>>> Hi Kabango
>>> >> >>>>
>>> >> >>>> This is an odd error but I believe it is probably caused because
>>> you
>>> >> >>>> are missing resource tables on the dhis server side.  On dhis
>>> server
>>> >> >>>> go to:
>>> >> >>>>
>>> >> >>>> data administration -> resource tables -> select all -> generate
>>> >> >>>> tables
>>> >> >>>>
>>> >> >>>> and try again.
>>> >> >>>>
>>> >> >>>> Regards
>>> >> >>>> Bob
>>> >> >>>>
>>> >> >>>> On 27 June 2012 15:32, Kabango Malewezi <kmalewezi@xxxxxxxxxxx>
>>> >> >>>> wrote:
>>> >> >>>> > Dear Users
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> > I'm new to DHIS and I have a problem.
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> > After I run datamart, login, and download Metadata I cannot
>>> update
>>> >> >>>> > Aggregate data. Enclosed is the log file.
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> >
>>> >> >>>> > Kabango Malewezi | Database Specialist
>>> >> >>>> >
>>> >> >>>> > SSDI Services
>>> >> >>>> >
>>> >> >>>> > 2nd Floor, Pamodzi House, City Center, P.O Box 1091, Lilongwe,
>>> >> >>>> > Malawi
>>> >> >>>> > Tel: +265 (01) 776 412/3/4 | fax: +265 (01) 776 410 | Mobile:
>>> +265
>>> >> >>>> > (0)
>>> >> >>>> > 88 4 245 431
>>> >> >>>> >
>>> >> >>>> > kmalewezi@xxxxxxxxxxx <mailto:kmalewezi@xxxxxxxxxxx > |
>>> >> >>>> >  www.jhpiego.org<http://www.jhpiego.org/>
>>> >> >>>> >
>>> >> >>>> > Skype: kabango.malewezi | Twitter: kabangoM
>>> >> >>>> >
>>> >> >>>> > _______________________________________________
>>> >> >>>> > 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
>>> >> >>>
>>> >> >>>
>>> >> >>
>>> >> >>
>>> >> >> _______________________________________________
>>> >> >> 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
>>> >> >>
>>> >> >
>>> >
>>> >
>>>
>>
>>
>

References