← Back to team overview

dhis2-users team mailing list archive

Re: GIS shapefiles integration / info about names of feature members

 

Sorry Knut,

I think you’ve lost me a bit here.

I did end up importing the co-ordinates into an offline copy of the DB just to see how its working (seems like the files etc are OK at least). Is either method preferable over the other?

Also, on the offline copy of the DB I upgraded to stable 2.16 to see how things would work. When I run the facility layer in the GIS, I no longer get the symbol images I had selected for the org unit group, just broken image files like so:

[cid:image001.png@01CFE57C.13E7AF90]

When I check the org unit group, they are still assigned to the correct symbol. Any ideas?
[cid:image002.png@01CFE57C.42A29390]



From: Knut Staring [mailto:knutst@xxxxxxxxx]
Sent: 10 October 2014 02:21
To: DUTTA, Shurajit Nicky (SLB)
Cc: dhis2-users@xxxxxxxxxxxxxxxxxxx; kaderb777@xxxxxxxxx
Subject: RE: [Dhis2-users] GIS shapefiles integration / info about names of feature members


There is an xslt file which sets the number to 4. You could edit that inside the .war file. Alternatively, we could come up with a regex SQL query which you could apply after import
On Oct 10, 2014 5:10 AM, <duttas@xxxxxxxxxxxx<mailto:duttas@xxxxxxxxxxxx>> wrote:
Hi everyone,

Sorry for reviving an old thread. I was trying to look back through the list as well as online for a little help but couldn’t come up with anything.

I am not sure if this is the right place to ask, but I was looking for a simplified method to perform this step on a set of polygons as outlined in the user guide:
Coordinates: The number of significant decimal digits (e.g. 23.02937874993774) should be shortened to fewer digits (e.g. 23.03). Although this will result in some inaccuracies on the map, given the usual scale at which maps in DHIS2 are produced (> 1:50,000), the loss of precision should not be noticeable. Normally, no more than four significant digits after the decimal point should be necessary

I went ahead and tried an import preview after following the rest of the steps in the guide and things seemed OK as no new org units were being added, but as speed is a real issue here I wanted to shorten the significant digits down to 2 decimal places as suggested before actually importing. Is there any additional resources I could have a look at or is this perhaps more complicated than I am thinking?

Thanks,
Nick

From: Dhis2-users [mailto:dhis2-users-bounces+duttas<mailto:dhis2-users-bounces%2Bduttas>=wpro.who.int@xxxxxxxxxxxxxxxxxxx<mailto:wpro.who.int@xxxxxxxxxxxxxxxxxxx>] On Behalf Of Knut Staring
Sent: 27 September 2014 06:12
To: Kader Irchad Barry
Cc: dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Dhis2-users] GIS shapefiles integration / info about names of feature members

Google yields this:
https://geonet.esri.com/thread/36491

On Sat, Sep 27, 2014 at 8:05 AM, Kader Irchad Barry <kaderb777@xxxxxxxxx<mailto:kaderb777@xxxxxxxxx>> wrote:
Hi.

Jason took a look on my files and it appears actually that some .dbf files were corrupted. This could happen as he says when opening a .dbf file with Excel than saving it again with this software.

I've been able to correctly run ogr2ogr command with new .dbf files taken from the source and generate the appropriate .gml files. It might be interesting for this task to get tools for checking integrity of shapefiles, any idea ?

Thank you for your help.

Best regards,
Kader

2014-09-26 21:31 GMT+03:00 Knut Staring <knutst@xxxxxxxxx<mailto:knutst@xxxxxxxxx>>:
You have to run the FWTools shell, not your ordinary command window.

Once you have opened that, just go to c:\Simplification:

> cd
> cd Simplification

Rremove the previously generated file:

>rm Communes.gml

Now try again:

> ogr2ogr -f GML Communes.gml Communes.shp




On Fri, Sep 26, 2014 at 6:41 PM, Kader Irchad Barry <kaderb777@xxxxxxxxx<mailto:kaderb777@xxxxxxxxx>> wrote:
Yes Knut,

They are the same. Attached screenshot of directory and QGIS attribute table.

Is it because I'm running the FWTool ogr2ogr from the FWTool directory whereas the shapefiles are in a different dir (see 3rd screenshot) ?

2014-09-26 19:24 GMT+03:00 Knut Staring <knutst@xxxxxxxxx<mailto:knutst@xxxxxxxxx>>:
Are you sure the name of the .shp and .dbf files are exactly the same?

On Fri, Sep 26, 2014 at 10:35 AM, Kader Irchad Barry <kaderb777@xxxxxxxxx<mailto:kaderb777@xxxxxxxxx>> wrote:
Hello,

I am following the 'Setting up GIS' chapter in order to add our country boundaries to DHIS2, but I am not getting in the converted GML files the names of the feature members as described in the manual.

These info being stored in the .dbf files of the shapefiles structure, isn't there another step in order to merge them with the .shp files in order to have them described into the .gml files when using the conversion tool ?

Below an excerpt of one gml file:

 <gml:featureMember>
    <ogr:communes fid="0">
      <ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>44.520928,-12.21365 44.516667,-12.213444 44.515377,-12.217299 44.508177,-12.219482 44.48914,-12.219355 44.483688,-12.215721 44.474738,-12.211509 44.474765,-12.207788 44.486503,-12.198935 44.488153,-12.194262 44.492306,-12.191121 44.492686,-12.188164 44.490472,-12.187333 44.484528,-12.18125 44.47715,-12.175736 44.473761,-12.172392 44.469769,-12.165611 44.466832,-12.161886 44.497145,-12.154971 44.500402,-12.153843 44.503083,-12.159002 44.503082,-12.162418 44.507053,-12.171983 44.511,-12.176615 44.513624,-12.178458 44.515082,-12.184026 44.517226,-12.187109 44.519828,-12.192961 44.517851,-12.194513 44.520828,-12.197976 44.520943,-12.201551 44.519115,-12.204698 44.519313,-12.209046 44.520928,-12.21365</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
    </ogr:communes>
  </gml:featureMember>

which shows no property holding the name of the feature members.

What could be missing ?

Thanking you in advance.

Best regards,
Kader

_______________________________________________
Mailing list: https://launchpad.net/~dhis2-users
Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx<mailto:dhis2-users@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~dhis2-users
More help   : https://help.launchpad.net/ListHelp



--
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522<tel:%2B4791880522>
Skype: knutstar
http://dhis2.org




--
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522<tel:%2B4791880522>
Skype: knutstar
http://dhis2.org




--
Knut Staring
Dept. of Informatics, University of Oslo
+4791880522<tel:%2B4791880522>
Skype: knutstar
http://dhis2.org





________________________________
This message was scanned for viruses with Trend Micro ScanMail, GFI MailSecurity and GFI MailEssentials by the World Health Organization Regional Office for the Western Pacific. However, the recipient is advised to scan this e-mail and any attached files for viruses.

Disclaimer:

This e-mail, together with any attachments, is intended for the named recipients only and is confidential. It may also be privileged or otherwise protected by law.

If you have received it in error, please notify the sender immediately by reply e-mail and delete it and any attachments from your system. You may not copy or disclose its contents to anyone.




====================================================
This message was scanned for viruses with Trend Micro ScanMail, GFI MailSecurity and  GFI MailEssentials by the World Health Organization Regional Office for the Western Pacific.  However, the recipient is advised to scan this e-mail and any attached files for viruses.

Disclaimer:

This e-mail, together with any attachments, is intended for the named recipients only and is confidential. It may also be privileged or otherwise protected by law.

If you have received it in error, please notify the sender immediately by reply e-mail and delete it and any attachments from your system. You may not copy or disclose its contents to anyone.

PNG image

PNG image


Follow ups

References