Shapefile Conversion to GML

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val

id

EPSG coordinate system?

Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

rinfo -al -so NGA_adm1.shp

INFO: Open of `NGA_adm1.shp’

using driver `ESRI Shapefile’ successful.

Layer name: NGA_adm1

Geometry: Polygon

Feature Count: 38

Extent: (2.668431, 4.270418) - (14.680070, 13.892010)

Layer SRS WKT:

(unknown)

ID_0: Integer (9.0)

ISO: String (3.0)

NAME_0: String (75.0)

ID_1: Integer (9.0)

NAME_1: String (75.0)

VARNAME_1: String (150.0)

NL_NAME_1: String (50.0)

HASC_1: String (15.0)

CC_1: String (15.0)

TYPE_1: String (50.0)

ENGTYPE_1: String (50.0)

VALIDFR_1: String (25.0)

VALIDTO_1: String (25.0)

REMARKS_1: String (125.0)

Shape_Leng: Real (19.11)

Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 1: Error in fread() reading object of size 101852 from .shp file

ERROR 1: Error in fread() reading object of size 4872 from .shp file

ERROR 1: Error in fread() reading object of size 7032 from .shp file

ERROR 1: Error in fread() reading object of size 917484 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

ERROR 1: Error in fread() reading object of size 21800 from .shp file

ERROR 1: Error in fread() reading object of size 41080 from .shp file

ERROR 1: Error in fread() reading object of size 719100 from .shp file

ERROR 1: Error in fread() reading object of size 5048 from .shp file

ERROR 1: Error in fread() reading object of size 10424 from .shp file

ERROR 1: Error in fread() reading object of size 4152 from .shp file

ERROR 1: Error in fread() reading object of size 5352 from .shp file

ERROR 1: Error in fread() reading object of size 4520 from .shp file

ERROR 1: Error in fread() reading object of size 2728 from .shp file

ERROR 1: Error in fread() reading object of size 2968 from .shp file

ERROR 1: Error in fread() reading object of size 9160 from .shp file

ERROR 1: Error in fread() reading object of size 11704 from .shp file

ERROR 1: Error in fread() reading object of size 7112 from .shp file

ERROR 1: Error in fread() reading object of size 13656 from .shp file

ERROR 1: Error in fread() reading object of size 11976 from .shp file

ERROR 1: Error in fread() reading object of size 12568 from .shp file

ERROR 1: Error in fread() reading object of size 19960 from .shp file

ERROR 1: Error in fread() reading object of size 44344 from .shp file

ERROR 1: Error in fread() reading object of size 11288 from .shp file

ERROR 1: Error in fread() reading object of size 18648 from .shp file

ERROR 1: Error in fread() reading object of size 21624 from .shp file

ERROR 1: Error in fread() reading object of size 62728 from .shp file

ERROR 1: Error in fread() reading object of size 5256 from .shp file

ERROR 1: Error in fread() reading object of size 11880 from .shp file

ERROR 1: Error in fread() reading object of size 5864 from .shp file

ERROR 1: Error in fread() reading object of size 965796 from .shp file

ERROR 1: Error in fread() reading object of size 9544 from .shp file

ERROR 1: Error in fread() reading object of size 19160 from .shp file

ERROR 1: Error in fread() reading object of size 7384 from .shp file

ERROR 1: Error in fread() reading object of size 8968 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

Can’t transform coordinates, source layer has no

coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com
Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

Well, it seems pretty clear from the logs.

Failed to process SRS definition: EPSG:14684

Try looking here http://www.epsg-registry.org/

and this is not a valid projection.

However, looking from the bounding box, it looks like it may be 4326 to begin with.

Why do you think you need to use EPSG:14684 as the source projection?

Regards,

Jason

···

On Tue, Apr 1, 2014 at 12:47 PM, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val

id

EPSG coordinate system?

Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

rinfo -al -so NGA_adm1.shp

INFO: Open of `NGA_adm1.shp’

using driver `ESRI Shapefile’ successful.

Layer name: NGA_adm1

Geometry: Polygon

Feature Count: 38

Extent: (2.668431, 4.270418) - (14.680070, 13.892010)

Layer SRS WKT:

(unknown)

ID_0: Integer (9.0)

ISO: String (3.0)

NAME_0: String (75.0)

ID_1: Integer (9.0)

NAME_1: String (75.0)

VARNAME_1: String (150.0)

NL_NAME_1: String (50.0)

HASC_1: String (15.0)

CC_1: String (15.0)

TYPE_1: String (50.0)

ENGTYPE_1: String (50.0)

VALIDFR_1: String (25.0)

VALIDTO_1: String (25.0)

REMARKS_1: String (125.0)

Shape_Leng: Real (19.11)

Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 1: Error in fread() reading object of size 101852 from .shp file

ERROR 1: Error in fread() reading object of size 4872 from .shp file

ERROR 1: Error in fread() reading object of size 7032 from .shp file

ERROR 1: Error in fread() reading object of size 917484 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

ERROR 1: Error in fread() reading object of size 21800 from .shp file

ERROR 1: Error in fread() reading object of size 41080 from .shp file

ERROR 1: Error in fread() reading object of size 719100 from .shp file

ERROR 1: Error in fread() reading object of size 5048 from .shp file

ERROR 1: Error in fread() reading object of size 10424 from .shp file

ERROR 1: Error in fread() reading object of size 4152 from .shp file

ERROR 1: Error in fread() reading object of size 5352 from .shp file

ERROR 1: Error in fread() reading object of size 4520 from .shp file

ERROR 1: Error in fread() reading object of size 2728 from .shp file

ERROR 1: Error in fread() reading object of size 2968 from .shp file

ERROR 1: Error in fread() reading object of size 9160 from .shp file

ERROR 1: Error in fread() reading object of size 11704 from .shp file

ERROR 1: Error in fread() reading object of size 7112 from .shp file

ERROR 1: Error in fread() reading object of size 13656 from .shp file

ERROR 1: Error in fread() reading object of size 11976 from .shp file

ERROR 1: Error in fread() reading object of size 12568 from .shp file

ERROR 1: Error in fread() reading object of size 19960 from .shp file

ERROR 1: Error in fread() reading object of size 44344 from .shp file

ERROR 1: Error in fread() reading object of size 11288 from .shp file

ERROR 1: Error in fread() reading object of size 18648 from .shp file

ERROR 1: Error in fread() reading object of size 21624 from .shp file

ERROR 1: Error in fread() reading object of size 62728 from .shp file

ERROR 1: Error in fread() reading object of size 5256 from .shp file

ERROR 1: Error in fread() reading object of size 11880 from .shp file

ERROR 1: Error in fread() reading object of size 5864 from .shp file

ERROR 1: Error in fread() reading object of size 965796 from .shp file

ERROR 1: Error in fread() reading object of size 9544 from .shp file

ERROR 1: Error in fread() reading object of size 19160 from .shp file

ERROR 1: Error in fread() reading object of size 7384 from .shp file

ERROR 1: Error in fread() reading object of size 8968 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

Can’t transform coordinates, source layer has no

coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Thanks a lot Jason. I also tried converting without first trying to convert to 4326 knowing that it may already be in that projection. I noticed later on that This conversion worked if i didn’t use the original dbf file that I downloaded with it. I mean it converted when I used the dbf file generated after working on it at mapshaper.org.

As soon as I changed the dbf file to the one downloaded from the shapefile site, it produced the error.

The dbf file might be bad though. I have downloaded another from a new site and hopefully it will work.

Regards,

Adedayo

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com
Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

Well, it seems pretty clear from the logs.

Failed to process SRS definition: EPSG:14684

Try looking here http://www.epsg-registry.org/

and this is not a valid projection.

However, looking from the bounding box, it looks like it may be 4326 to begin with.

Why do you think you need to use EPSG:14684 as the source projection?

Regards,

Jason

···

On Tuesday, April 1, 2014 3:19 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

On Tue, Apr 1, 2014 at 12:47 PM, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val

id

EPSG coordinate system?

Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

rinfo -al -so NGA_adm1.shp

INFO: Open of `NGA_adm1.shp’

using driver `ESRI Shapefile’ successful.

Layer name: NGA_adm1

Geometry: Polygon

Feature Count: 38

Extent: (2.668431, 4.270418) - (14.680070, 13.892010)

Layer SRS WKT:

(unknown)

ID_0: Integer (9.0)

ISO: String (3.0)

NAME_0: String (75.0)

ID_1: Integer (9.0)

NAME_1: String (75.0)

VARNAME_1: String (150.0)

NL_NAME_1: String (50.0)

HASC_1: String (15.0)

CC_1: String (15.0)

TYPE_1: String (50.0)

ENGTYPE_1: String (50.0)

VALIDFR_1: String (25.0)

VALIDTO_1: String (25.0)

REMARKS_1: String
(125.0)

Shape_Leng: Real (19.11)

Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 1: Error in fread() reading object of size 101852 from .shp file

ERROR 1: Error in fread() reading object of size 4872 from .shp file

ERROR 1: Error in fread() reading object of size 7032 from .shp file

ERROR 1: Error in fread() reading object of size 917484 from .shp file

ERROR 1:
Error in fread() reading object of size 7592 from .shp file

ERROR 1: Error in fread() reading object of size 21800 from .shp file

ERROR 1: Error in fread() reading object of size 41080 from .shp file

ERROR 1: Error in fread() reading object of size 719100 from .shp file

ERROR 1: Error in fread() reading object of size 5048 from .shp file

ERROR 1: Error in fread() reading object of size 10424 from .shp file

ERROR 1: Error in fread() reading object of size 4152 from .shp file

ERROR 1: Error in fread() reading object of size 5352 from .shp file

ERROR 1: Error in fread()
reading object of size 4520 from .shp file

ERROR 1: Error in fread() reading object of size 2728 from .shp file

ERROR 1: Error in fread() reading object of size 2968 from .shp file

ERROR 1: Error in fread() reading object of size 9160 from .shp file

ERROR 1: Error in fread() reading object of size 11704 from .shp file

ERROR 1: Error in fread() reading object of size 7112 from .shp file

ERROR 1: Error in fread() reading object of size 13656 from .shp file

ERROR 1: Error in fread() reading object of size 11976 from .shp file

ERROR 1: Error in fread() reading object of
size 12568 from .shp file

ERROR 1: Error in fread() reading object of size 19960 from .shp file

ERROR 1: Error in fread() reading object of size 44344 from .shp file

ERROR 1: Error in fread() reading object of size 11288 from .shp file

ERROR 1: Error in fread() reading object of size 18648 from .shp file

ERROR 1: Error in fread() reading object of size 21624 from .shp file

ERROR 1: Error in fread() reading object of size 62728 from .shp file

ERROR 1: Error in fread() reading object of size 5256 from .shp file

ERROR 1: Error in fread() reading object of size 11880 from
.shp file

ERROR 1: Error in fread() reading object of size 5864 from .shp file

ERROR 1: Error in fread() reading object of size 965796 from .shp file

ERROR 1: Error in fread() reading object of size 9544 from .shp file

ERROR 1: Error in fread() reading object of size 19160 from .shp file

ERROR 1: Error in fread() reading object of size 7384 from .shp file

ERROR 1: Error in fread() reading object of size 8968 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

Can’t transform coordinates, source layer has no

coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Adedayo,

If you need to modify attributes in the dbf file, you should only do this in a GIS software such as www.qgis.org - never modify the dbf on its own (eg in Excel) as this will result in a corrupt shapefile. It’s also much easier to define the projection or to convert to a different projection in QGIS, and once you have your shapefile ready you can simply save it as a gml file.

bram

···

On 1 April 2014 17:47, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Thanks a lot Jason. I also tried converting without first trying to convert to 4326 knowing that it may already be in that projection. I noticed later on that This conversion worked if i didn’t use the original dbf file that I downloaded with it. I mean it converted when I used the dbf file generated after working on it at mapshaper.org.

As soon as I changed the dbf file to the one downloaded from the shapefile site, it produced the error.

The dbf file might be bad though. I have downloaded another from a new site and hopefully it will work.

Regards,

Adedayo

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

On Tuesday, April 1, 2014 3:19 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Well, it seems pretty clear from the logs.

Failed to process SRS definition: EPSG:14684

Try looking here http://www.epsg-registry.org/

and this is not a valid projection.

However, looking from the bounding box, it looks like it may be 4326 to begin with.

Why do you think you need to use EPSG:14684 as the source projection?

Regards,

Jason

On Tue, Apr 1, 2014 at 12:47 PM, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val

id

EPSG coordinate system?

Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

rinfo -al -so NGA_adm1.shp

INFO: Open of `NGA_adm1.shp’

using driver `ESRI Shapefile’ successful.

Layer name: NGA_adm1

Geometry: Polygon

Feature Count: 38

Extent: (2.668431, 4.270418) - (14.680070, 13.892010)

Layer SRS WKT:

(unknown)

ID_0: Integer (9.0)

ISO: String (3.0)

NAME_0: String (75.0)

ID_1: Integer (9.0)

NAME_1: String (75.0)

VARNAME_1: String (150.0)

NL_NAME_1: String (50.0)

HASC_1: String (15.0)

CC_1: String (15.0)

TYPE_1: String (50.0)

ENGTYPE_1: String (50.0)

VALIDFR_1: String (25.0)

VALIDTO_1: String (25.0)

REMARKS_1: String (125.0)

Shape_Leng: Real (19.11)

Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 1: Error in fread() reading object of size 101852 from .shp file

ERROR 1: Error in fread() reading object of size 4872 from .shp file

ERROR 1: Error in fread() reading object of size 7032 from .shp file

ERROR 1: Error in fread() reading object of size 917484 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

ERROR 1: Error in fread() reading object of size 21800 from .shp file

ERROR 1: Error in fread() reading object of size 41080 from .shp file

ERROR 1: Error in fread() reading object of size 719100 from .shp file

ERROR 1: Error in fread() reading object of size 5048 from .shp file

ERROR 1: Error in fread() reading object of size 10424 from .shp file

ERROR 1: Error in fread() reading object of size 4152 from .shp file

ERROR 1: Error in fread() reading object of size 5352 from .shp file

ERROR 1: Error in fread() reading object of size 4520 from .shp file

ERROR 1: Error in fread() reading object of size 2728 from .shp file

ERROR 1: Error in fread() reading object of size 2968 from .shp file

ERROR 1: Error in fread() reading object of size 9160 from .shp file

ERROR 1: Error in fread() reading object of size 11704 from .shp file

ERROR 1: Error in fread() reading object of size 7112 from .shp file

ERROR 1: Error in fread() reading object of size 13656 from .shp file

ERROR 1: Error in fread() reading object of size 11976 from .shp file

ERROR 1: Error in fread() reading object of size 12568 from .shp file

ERROR 1: Error in fread() reading object of size 19960 from .shp file

ERROR 1: Error in fread() reading object of size 44344 from .shp file

ERROR 1: Error in fread() reading object of size 11288 from .shp file

ERROR 1: Error in fread() reading object of size 18648 from .shp file

ERROR 1: Error in fread() reading object of size 21624 from .shp file

ERROR 1: Error in fread() reading object of size 62728 from .shp file

ERROR 1: Error in fread() reading object of size 5256 from .shp file

ERROR 1: Error in fread() reading object of size 11880 from .shp file

ERROR 1: Error in fread() reading object of size 5864 from .shp file

ERROR 1: Error in fread() reading object of size 965796 from .shp file

ERROR 1: Error in fread() reading object of size 9544 from .shp file

ERROR 1: Error in fread() reading object of size 19160 from .shp file

ERROR 1: Error in fread() reading object of size 7384 from .shp file

ERROR 1: Error in fread() reading object of size 8968 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

Can’t transform coordinates, source layer has no

coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463

emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

To add to Brams mail, I have had issues with MapShaper and the DBF’s it produces. Normally, I just trash these, and use the original DBF from the unmodified shapefile.

I am still not convinced it is a problem with the DBF though, as clearly the projection which you provided in the first conversion was not correct.

Regards,

Jason

···

On Tue, Apr 1, 2014 at 5:00 PM, Bram Piot bram.piot@gmail.com wrote:

Hi Adedayo,

If you need to modify attributes in the dbf file, you should only do this in a GIS software such as www.qgis.org - never modify the dbf on its own (eg in Excel) as this will result in a corrupt shapefile. It’s also much easier to define the projection or to convert to a different projection in QGIS, and once you have your shapefile ready you can simply save it as a gml file.

bram


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On 1 April 2014 17:47, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Thanks a lot Jason. I also tried converting without first trying to convert to 4326 knowing that it may already be in that projection. I noticed later on that This conversion worked if i didn’t use the original dbf file that I downloaded with it. I mean it converted when I used the dbf file generated after working on it at mapshaper.org.

As soon as I changed the dbf file to the one downloaded from the shapefile site, it produced the error.

The dbf file might be bad though. I have downloaded another from a new site and hopefully it will work.

Regards,

Adedayo

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

On Tuesday, April 1, 2014 3:19 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Well, it seems pretty clear from the logs.

Failed to process SRS definition: EPSG:14684

Try looking here http://www.epsg-registry.org/

and this is not a valid projection.

However, looking from the bounding box, it looks like it may be 4326 to begin with.

Why do you think you need to use EPSG:14684 as the source projection?

Regards,

Jason

On Tue, Apr 1, 2014 at 12:47 PM, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val

id

EPSG coordinate system?

Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

rinfo -al -so NGA_adm1.shp

INFO: Open of `NGA_adm1.shp’

using driver `ESRI Shapefile’ successful.

Layer name: NGA_adm1

Geometry: Polygon

Feature Count: 38

Extent: (2.668431, 4.270418) - (14.680070, 13.892010)

Layer SRS WKT:

(unknown)

ID_0: Integer (9.0)

ISO: String (3.0)

NAME_0: String (75.0)

ID_1: Integer (9.0)

NAME_1: String (75.0)

VARNAME_1: String (150.0)

NL_NAME_1: String (50.0)

HASC_1: String (15.0)

CC_1: String (15.0)

TYPE_1: String (50.0)

ENGTYPE_1: String (50.0)

VALIDFR_1: String (25.0)

VALIDTO_1: String (25.0)

REMARKS_1: String (125.0)

Shape_Leng: Real (19.11)

Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 1: Error in fread() reading object of size 101852 from .shp file

ERROR 1: Error in fread() reading object of size 4872 from .shp file

ERROR 1: Error in fread() reading object of size 7032 from .shp file

ERROR 1: Error in fread() reading object of size 917484 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

ERROR 1: Error in fread() reading object of size 21800 from .shp file

ERROR 1: Error in fread() reading object of size 41080 from .shp file

ERROR 1: Error in fread() reading object of size 719100 from .shp file

ERROR 1: Error in fread() reading object of size 5048 from .shp file

ERROR 1: Error in fread() reading object of size 10424 from .shp file

ERROR 1: Error in fread() reading object of size 4152 from .shp file

ERROR 1: Error in fread() reading object of size 5352 from .shp file

ERROR 1: Error in fread() reading object of size 4520 from .shp file

ERROR 1: Error in fread() reading object of size 2728 from .shp file

ERROR 1: Error in fread() reading object of size 2968 from .shp file

ERROR 1: Error in fread() reading object of size 9160 from .shp file

ERROR 1: Error in fread() reading object of size 11704 from .shp file

ERROR 1: Error in fread() reading object of size 7112 from .shp file

ERROR 1: Error in fread() reading object of size 13656 from .shp file

ERROR 1: Error in fread() reading object of size 11976 from .shp file

ERROR 1: Error in fread() reading object of size 12568 from .shp file

ERROR 1: Error in fread() reading object of size 19960 from .shp file

ERROR 1: Error in fread() reading object of size 44344 from .shp file

ERROR 1: Error in fread() reading object of size 11288 from .shp file

ERROR 1: Error in fread() reading object of size 18648 from .shp file

ERROR 1: Error in fread() reading object of size 21624 from .shp file

ERROR 1: Error in fread() reading object of size 62728 from .shp file

ERROR 1: Error in fread() reading object of size 5256 from .shp file

ERROR 1: Error in fread() reading object of size 11880 from .shp file

ERROR 1: Error in fread() reading object of size 5864 from .shp file

ERROR 1: Error in fread() reading object of size 965796 from .shp file

ERROR 1: Error in fread() reading object of size 9544 from .shp file

ERROR 1: Error in fread() reading object of size 19160 from .shp file

ERROR 1: Error in fread() reading object of size 7384 from .shp file

ERROR 1: Error in fread() reading object of size 8968 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

Can’t transform coordinates, source layer has no

coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463

emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Yes, just use the shp and shx files from Mapshaper, not DBF. Just make a copy of your original DBF and rename it to the same as the output from Mapshaper.

···

On Tue, Apr 1, 2014 at 9:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

To add to Brams mail, I have had issues with MapShaper and the DBF’s it produces. Normally, I just trash these, and use the original DBF from the unmodified shapefile.

I am still not convinced it is a problem with the DBF though, as clearly the projection which you provided in the first conversion was not correct.

Regards,

Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

On Tue, Apr 1, 2014 at 5:00 PM, Bram Piot bram.piot@gmail.com wrote:

Hi Adedayo,

If you need to modify attributes in the dbf file, you should only do this in a GIS software such as www.qgis.org - never modify the dbf on its own (eg in Excel) as this will result in a corrupt shapefile. It’s also much easier to define the projection or to convert to a different projection in QGIS, and once you have your shapefile ready you can simply save it as a gml file.

bram


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On 1 April 2014 17:47, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Thanks a lot Jason. I also tried converting without first trying to convert to 4326 knowing that it may already be in that projection. I noticed later on that This conversion worked if i didn’t use the original dbf file that I downloaded with it. I mean it converted when I used the dbf file generated after working on it at mapshaper.org.

As soon as I changed the dbf file to the one downloaded from the shapefile site, it produced the error.

The dbf file might be bad though. I have downloaded another from a new site and hopefully it will work.

Regards,

Adedayo

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

On Tuesday, April 1, 2014 3:19 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Well, it seems pretty clear from the logs.

Failed to process SRS definition: EPSG:14684

Try looking here http://www.epsg-registry.org/

and this is not a valid projection.

However, looking from the bounding box, it looks like it may be 4326 to begin with.

Why do you think you need to use EPSG:14684 as the source projection?

Regards,

Jason

On Tue, Apr 1, 2014 at 12:47 PM, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val

id

EPSG coordinate system?

Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

rinfo -al -so NGA_adm1.shp

INFO: Open of `NGA_adm1.shp’

using driver `ESRI Shapefile’ successful.

Layer name: NGA_adm1

Geometry: Polygon

Feature Count: 38

Extent: (2.668431, 4.270418) - (14.680070, 13.892010)

Layer SRS WKT:

(unknown)

ID_0: Integer (9.0)

ISO: String (3.0)

NAME_0: String (75.0)

ID_1: Integer (9.0)

NAME_1: String (75.0)

VARNAME_1: String (150.0)

NL_NAME_1: String (50.0)

HASC_1: String (15.0)

CC_1: String (15.0)

TYPE_1: String (50.0)

ENGTYPE_1: String (50.0)

VALIDFR_1: String (25.0)

VALIDTO_1: String (25.0)

REMARKS_1: String (125.0)

Shape_Leng: Real (19.11)

Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 1: Error in fread() reading object of size 101852 from .shp file

ERROR 1: Error in fread() reading object of size 4872 from .shp file

ERROR 1: Error in fread() reading object of size 7032 from .shp file

ERROR 1: Error in fread() reading object of size 917484 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

ERROR 1: Error in fread() reading object of size 21800 from .shp file

ERROR 1: Error in fread() reading object of size 41080 from .shp file

ERROR 1: Error in fread() reading object of size 719100 from .shp file

ERROR 1: Error in fread() reading object of size 5048 from .shp file

ERROR 1: Error in fread() reading object of size 10424 from .shp file

ERROR 1: Error in fread() reading object of size 4152 from .shp file

ERROR 1: Error in fread() reading object of size 5352 from .shp file

ERROR 1: Error in fread() reading object of size 4520 from .shp file

ERROR 1: Error in fread() reading object of size 2728 from .shp file

ERROR 1: Error in fread() reading object of size 2968 from .shp file

ERROR 1: Error in fread() reading object of size 9160 from .shp file

ERROR 1: Error in fread() reading object of size 11704 from .shp file

ERROR 1: Error in fread() reading object of size 7112 from .shp file

ERROR 1: Error in fread() reading object of size 13656 from .shp file

ERROR 1: Error in fread() reading object of size 11976 from .shp file

ERROR 1: Error in fread() reading object of size 12568 from .shp file

ERROR 1: Error in fread() reading object of size 19960 from .shp file

ERROR 1: Error in fread() reading object of size 44344 from .shp file

ERROR 1: Error in fread() reading object of size 11288 from .shp file

ERROR 1: Error in fread() reading object of size 18648 from .shp file

ERROR 1: Error in fread() reading object of size 21624 from .shp file

ERROR 1: Error in fread() reading object of size 62728 from .shp file

ERROR 1: Error in fread() reading object of size 5256 from .shp file

ERROR 1: Error in fread() reading object of size 11880 from .shp file

ERROR 1: Error in fread() reading object of size 5864 from .shp file

ERROR 1: Error in fread() reading object of size 965796 from .shp file

ERROR 1: Error in fread() reading object of size 9544 from .shp file

ERROR 1: Error in fread() reading object of size 19160 from .shp file

ERROR 1: Error in fread() reading object of size 7384 from .shp file

ERROR 1: Error in fread() reading object of size 8968 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

Can’t transform coordinates, source layer has no

coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463

emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp

Oh thanks Bram and Jason.

I actually used the original DBF from the unmodified Shaprefile and even without trying to use any projection but doing a direct conversion into GML, it still have the same issues.

What if I just use the original shapefile, dbf and shx instead of trying to work it down at mapshaper.org.

Does this have a an effect on the database and GIS?

Thanks a lot

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com
Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

To add to Brams mail, I have had issues with MapShaper and the DBF’s it produces. Normally, I just trash these, and use the original DBF from the unmodified shapefile.

I am still not convinced it is a problem with the DBF though, as clearly the projection which you provided in the first conversion was not correct.

Regards,

Jason

···

On Tuesday, April 1, 2014 4:05 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

On Tue, Apr 1, 2014 at 5:00 PM, Bram Piot bram.piot@gmail.com wrote:

Hi Adedayo,

If you need to modify attributes in the dbf file, you should only do this in a GIS software such as www.qgis.org - never modify the dbf on its own (eg in Excel) as this will result in a corrupt shapefile. It’s also much easier to define the projection or to convert to a different projection in QGIS, and once you have your shapefile ready you can simply save it as a gml file.

bram

On 1 April 2014 17:47, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Thanks a lot Jason. I also tried converting without first trying to convert to 4326 knowing that it may already be in that projection. I noticed later on that This conversion worked if i didn’t use the original dbf file that I downloaded with it. I mean it converted when I used the dbf file generated after working on it at mapshaper.org.

As soon as I changed the
dbf file to the one downloaded from the shapefile site, it produced the error.

The dbf file might be bad though. I have downloaded another from a new site and hopefully it will work.

Regards,

Adedayo

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

On Tuesday, April 1, 2014 3:19 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Well, it seems pretty clear from the logs.

Failed to process SRS definition: EPSG:14684

Try looking here http://www.epsg-registry.org/

and this is not a valid projection.

However, looking from the bounding box, it looks like it may be 4326 to begin with.

Why do you think you need to use EPSG:14684 as the source projection?

Regards,

Jason

On Tue, Apr 1, 2014 at 12:47 PM, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val

id

EPSG coordinate system?

Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

rinfo -al -so NGA_adm1.shp

INFO: Open of `NGA_adm1.shp’

using driver `ESRI Shapefile’ successful.

Layer name: NGA_adm1

Geometry: Polygon

Feature Count: 38

Extent: (2.668431, 4.270418) - (14.680070, 13.892010)

Layer SRS WKT:

(unknown)

ID_0: Integer (9.0)

ISO: String (3.0)

NAME_0: String (75.0)

ID_1: Integer (9.0)

NAME_1: String (75.0)

VARNAME_1: String (150.0)

NL_NAME_1: String (50.0)

HASC_1: String (15.0)

CC_1: String (15.0)

TYPE_1: String (50.0)

ENGTYPE_1: String (50.0)

VALIDFR_1: String (25.0)

VALIDTO_1: String (25.0)

REMARKS_1: String
(125.0)

Shape_Leng: Real (19.11)

Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 1: Error in fread() reading object of size 101852 from .shp file

ERROR 1: Error in fread() reading object of size 4872 from .shp file

ERROR 1: Error in fread() reading object of size 7032 from .shp file

ERROR 1: Error in fread() reading object of size 917484 from .shp file

ERROR 1:
Error in fread() reading object of size 7592 from .shp file

ERROR 1: Error in fread() reading object of size 21800 from .shp file

ERROR 1: Error in fread() reading object of size 41080 from .shp file

ERROR 1: Error in fread() reading object of size 719100 from .shp file

ERROR 1: Error in fread() reading object of size 5048 from .shp file

ERROR 1: Error in fread() reading object of size 10424 from .shp file

ERROR 1: Error in fread() reading object of size 4152 from .shp file

ERROR 1: Error in fread() reading object of size 5352 from .shp file

ERROR 1: Error in fread()
reading object of size 4520 from .shp file

ERROR 1: Error in fread() reading object of size 2728 from .shp file

ERROR 1: Error in fread() reading object of size 2968 from .shp file

ERROR 1: Error in fread() reading object of size 9160 from .shp file

ERROR 1: Error in fread() reading object of size 11704 from .shp file

ERROR 1: Error in fread() reading object of size 7112 from .shp file

ERROR 1: Error in fread() reading object of size 13656 from .shp file

ERROR 1: Error in fread() reading object of size 11976 from .shp file

ERROR 1: Error in fread() reading object of
size 12568 from .shp file

ERROR 1: Error in fread() reading object of size 19960 from .shp file

ERROR 1: Error in fread() reading object of size 44344 from .shp file

ERROR 1: Error in fread() reading object of size 11288 from .shp file

ERROR 1: Error in fread() reading object of size 18648 from .shp file

ERROR 1: Error in fread() reading object of size 21624 from .shp file

ERROR 1: Error in fread() reading object of size 62728 from .shp file

ERROR 1: Error in fread() reading object of size 5256 from .shp file

ERROR 1: Error in fread() reading object of size 11880 from
.shp file

ERROR 1: Error in fread() reading object of size 5864 from .shp file

ERROR 1: Error in fread() reading object of size 965796 from .shp file

ERROR 1: Error in fread() reading object of size 9544 from .shp file

ERROR 1: Error in fread() reading object of size 19160 from .shp file

ERROR 1: Error in fread() reading object of size 7384 from .shp file

ERROR 1: Error in fread() reading object of size 8968 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

Can’t transform coordinates, source layer has no

coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463

emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Knust,

That is exactly what I did. Same thing I did for the Level 2 of this shape file and it worked.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com
Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

Yes, just use the shp and shx files from Mapshaper, not DBF. Just make a copy of your original DBF and rename it to the same as the output from Mapshaper.

···

On Tuesday, April 1, 2014 4:16 PM, Knut Staring knutst@gmail.com wrote:

On Tue, Apr 1, 2014 at 9:35 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

To add to Brams mail, I have had issues with MapShaper and the DBF’s it produces. Normally, I just trash these, and use the original DBF from the unmodified shapefile.

I am still not convinced it is a problem with the DBF though, as clearly the projection which you provided in the first conversion was not correct.

Regards,

Jason

On Tue, Apr 1, 2014 at 5:00 PM, Bram Piot bram.piot@gmail.com wrote:

Hi Adedayo,

If you need to modify attributes in the dbf file, you should only do this in a GIS software such as www.qgis.org - never modify the dbf on its own (eg in Excel) as this will result in a corrupt shapefile. It’s also much easier to define the projection or to convert to a different projection in QGIS, and once you have your shapefile ready you can simply save it as a gml file.

bram

On 1 April 2014 17:47, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Thanks a lot Jason. I also tried converting without first trying to convert to 4326 knowing that it may already be in that projection. I noticed later on that This conversion worked if i didn’t use the original dbf file that I downloaded with it. I mean it converted when I used the dbf file generated after working on it at mapshaper.org.

As soon as I changed the
dbf file to the one downloaded from the shapefile site, it produced the error.

The dbf file might be bad though. I have downloaded another from a new site and hopefully it will work.

Regards,

Adedayo

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

On Tuesday, April 1, 2014 3:19 PM, Jason Pickering jason.p.pickering@gmail.com wrote:

Well, it seems pretty clear from the logs.

Failed to process SRS definition: EPSG:14684

Try looking here http://www.epsg-registry.org/

and this is not a valid projection.

However, looking from the bounding box, it looks like it may be 4326 to begin with.

Why do you think you need to use EPSG:14684 as the source projection?

Regards,

Jason

On Tue, Apr 1, 2014 at 12:47 PM, Dayo Adeyomoye deemoyes@yahoo.com wrote:

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val

id

EPSG coordinate system?

Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

rinfo -al -so NGA_adm1.shp

INFO: Open of `NGA_adm1.shp’

using driver `ESRI Shapefile’ successful.

Layer name: NGA_adm1

Geometry: Polygon

Feature Count: 38

Extent: (2.668431, 4.270418) - (14.680070, 13.892010)

Layer SRS WKT:

(unknown)

ID_0: Integer (9.0)

ISO: String (3.0)

NAME_0: String (75.0)

ID_1: Integer (9.0)

NAME_1: String (75.0)

VARNAME_1: String (150.0)

NL_NAME_1: String (50.0)

HASC_1: String (15.0)

CC_1: String (15.0)

TYPE_1: String (50.0)

ENGTYPE_1: String (50.0)

VALIDFR_1: String (25.0)

VALIDTO_1: String (25.0)

REMARKS_1: String
(125.0)

Shape_Leng: Real (19.11)

Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -f GML NGA_adm1.gml NGA_adm1.shp

ERROR 1: Error in fread() reading object of size 101852 from .shp file

ERROR 1: Error in fread() reading object of size 4872 from .shp file

ERROR 1: Error in fread() reading object of size 7032 from .shp file

ERROR 1: Error in fread() reading object of size 917484 from .shp file

ERROR 1:
Error in fread() reading object of size 7592 from .shp file

ERROR 1: Error in fread() reading object of size 21800 from .shp file

ERROR 1: Error in fread() reading object of size 41080 from .shp file

ERROR 1: Error in fread() reading object of size 719100 from .shp file

ERROR 1: Error in fread() reading object of size 5048 from .shp file

ERROR 1: Error in fread() reading object of size 10424 from .shp file

ERROR 1: Error in fread() reading object of size 4152 from .shp file

ERROR 1: Error in fread() reading object of size 5352 from .shp file

ERROR 1: Error in fread()
reading object of size 4520 from .shp file

ERROR 1: Error in fread() reading object of size 2728 from .shp file

ERROR 1: Error in fread() reading object of size 2968 from .shp file

ERROR 1: Error in fread() reading object of size 9160 from .shp file

ERROR 1: Error in fread() reading object of size 11704 from .shp file

ERROR 1: Error in fread() reading object of size 7112 from .shp file

ERROR 1: Error in fread() reading object of size 13656 from .shp file

ERROR 1: Error in fread() reading object of size 11976 from .shp file

ERROR 1: Error in fread() reading object of
size 12568 from .shp file

ERROR 1: Error in fread() reading object of size 19960 from .shp file

ERROR 1: Error in fread() reading object of size 44344 from .shp file

ERROR 1: Error in fread() reading object of size 11288 from .shp file

ERROR 1: Error in fread() reading object of size 18648 from .shp file

ERROR 1: Error in fread() reading object of size 21624 from .shp file

ERROR 1: Error in fread() reading object of size 62728 from .shp file

ERROR 1: Error in fread() reading object of size 5256 from .shp file

ERROR 1: Error in fread() reading object of size 11880 from
.shp file

ERROR 1: Error in fread() reading object of size 5864 from .shp file

ERROR 1: Error in fread() reading object of size 965796 from .shp file

ERROR 1: Error in fread() reading object of size 9544 from .shp file

ERROR 1: Error in fread() reading object of size 19160 from .shp file

ERROR 1: Error in fread() reading object of size 7384 from .shp file

ERROR 1: Error in fread() reading object of size 8968 from .shp file

ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og

r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp

Can’t transform coordinates, source layer has no

coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463

emails: deemoyes@yahoo.com, addyraph@yahoo.com

Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-users

Post to : dhis2-users@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-users

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp


Knut Staring

Dept. of Informatics, University of Oslo

+4791880522

http://dhis2.org

Please I have attached the shapefiles and its company that I have been trying to use as downloaded form the site mentioned in the DHIS2 Documentation. I will appreciate if anyone is able to help me convert this into a GML.

Many thanks

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com
Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

Hi Knust,

That is exactly what I did. Same thing I did for the Level 2 of this shape file and it worked.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com
Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

Yes, just use the shp and shx files from Mapshaper, not DBF. Just make a copy of your original DBF and rename it to the same as the output from Mapshaper.

To add to Brams mail, I have had issues with MapShaper and the DBF's it produces. Normally, I just trash these, and use the original DBF from the unmodified shapefile.

I am still not convinced it is a problem with the DBF though, as clearly the projection which you provided in the first conversion was not correct.

Regards,
Jason

Hi Adedayo,

If you need to modify attributes in the dbf file, you should only do this in a GIS software such as www.qgis.org - never modify the dbf on its own (eg in Excel) as this will result in a corrupt shapefile. It's also much easier to define the projection or to convert to a different projection in QGIS, and once you have your shapefile ready you can simply save it as a gml file.

bram

Thanks a lot Jason. I also tried converting without first trying to convert to 4326 knowing that it may already be in that projection. I noticed later on that This conversion worked if i didn't use the original dbf file that I downloaded with it. I mean it converted when I used the dbf file generated after working on it at mapshaper.org.

As soon as I changed the dbf file to the one downloaded from the shapefile site, it produced the error.

The dbf file might be bad though. I have downloaded another from a new site and hopefully it will work.

Regards,

Adedayo

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com
Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell

Well, it seems pretty clear from the logs.

Failed to process SRS definition: EPSG:14684

Try looking here http://www.epsg-registry.org/

and this is not a valid projection.

However, looking from the bounding box, it looks like it may be 4326 to begin with.

Why do you think you need to use EPSG:14684 as the source projection?

Regards,
Jason

Dear All,

I have been trying to convert my shapefile for Nigeria Admin0 and Admin1 levels into GML but its not working. I was able to convert the Admin2 at but I am wondering, what could be the problem here.

I also tried converting without copying the dbf file from the Admin file downloaded and it converted without errors but as soon as I tried to use it with the dbf file that i copied from the download admin file for Nigeria, I am unable to convert it.

Below is the response while trying to do that.

Regards,

Adedayo

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og
r2ogr -s_srs EPSG:14684 -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp
ERROR 6: EPSG PCS/GCS code 14684 not found in EPSG support files. Is this a val
id
EPSG coordinate system?
Failed to process SRS definition: EPSG:14684

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og
rinfo -al -so NGA_adm1.shp
INFO: Open of `NGA_adm1.shp'
using driver `ESRI Shapefile' successful.

Layer name: NGA_adm1
Geometry: Polygon
Feature Count: 38
Extent: (2.668431, 4.270418) - (14.680070, 13.892010)
Layer SRS WKT:
(unknown)
ID_0: Integer (9.0)
ISO: String (3.0)
NAME_0: String (75.0)
ID_1: Integer (9.0)
NAME_1: String (75.0)
VARNAME_1: String (150.0)
NL_NAME_1: String (50.0)
HASC_1: String (15.0)
CC_1: String (15.0)
TYPE_1: String (50.0)
ENGTYPE_1: String (50.0)
VALIDFR_1: String (25.0)
VALIDTO_1: String (25.0)
REMARKS_1: String (125.0)
Shape_Leng: Real (19.11)
Shape_Area: Real (19.11)

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og
r2ogr -f GML NGA_adm1.gml NGA_adm1.shp
ERROR 1: Error in fread() reading object of size 101852 from .shp file
ERROR 1: Error in fread() reading object of size 4872 from .shp file
ERROR 1: Error in fread() reading object of size 7032 from .shp file
ERROR 1: Error in fread() reading object of size 917484 from .shp file
ERROR 1: Error in fread() reading object of size 7592 from .shp file
ERROR 1: Error in fread() reading object of size 21800 from .shp file
ERROR 1: Error in fread() reading object of size 41080 from .shp file
ERROR 1: Error in fread() reading object of size 719100 from .shp file
ERROR 1: Error in fread() reading object of size 5048 from .shp file
ERROR 1: Error in fread() reading object of size 10424 from .shp file
ERROR 1: Error in fread() reading object of size 4152 from .shp file
ERROR 1: Error in fread() reading object of size 5352 from .shp file
ERROR 1: Error in fread() reading object of size 4520 from .shp file
ERROR 1: Error in fread() reading object of size 2728 from .shp file
ERROR 1: Error in fread() reading object of size 2968 from .shp file
ERROR 1: Error in fread() reading object of size 9160 from .shp file
ERROR 1: Error in fread() reading object of size 11704 from .shp file
ERROR 1: Error in fread() reading object of size 7112 from .shp file
ERROR 1: Error in fread() reading object of size 13656 from .shp file
ERROR 1: Error in fread() reading object of size 11976 from .shp file
ERROR 1: Error in fread() reading object of size 12568 from .shp file
ERROR 1: Error in fread() reading object of size 19960 from .shp file
ERROR 1: Error in fread() reading object of size 44344 from .shp file
ERROR 1: Error in fread() reading object of size 11288 from .shp file
ERROR 1: Error in fread() reading object of size 18648 from .shp file
ERROR 1: Error in fread() reading object of size 21624 from .shp file
ERROR 1: Error in fread() reading object of size 62728 from .shp file
ERROR 1: Error in fread() reading object of size 5256 from .shp file
ERROR 1: Error in fread() reading object of size 11880 from .shp file
ERROR 1: Error in fread() reading object of size 5864 from .shp file
ERROR 1: Error in fread() reading object of size 965796 from .shp file
ERROR 1: Error in fread() reading object of size 9544 from .shp file
ERROR 1: Error in fread() reading object of size 19160 from .shp file
ERROR 1: Error in fread() reading object of size 7384 from .shp file
ERROR 1: Error in fread() reading object of size 8968 from .shp file
ERROR 1: Error in fread() reading object of size 7592 from .shp file

C:\Users\aadeyomoye\Desktop\Mine\DHIS2 Academy\NGA Admin1 Optimized Shapefile>og
r2ogr -t_srs EPSG:4326 -f GML NGA_adm1.gml NGA_adm1.shp
Can't transform coordinates, source layer has no
coordinate system. Use -s_srs to set one.

BlackBerry: 3114F90C
Phone: 08028851441, 08035560463
emails: deemoyes@yahoo.com, addyraph@yahoo.com
Yahoo IM: deemoyes
Facebook: pharael
twitter:pharaell
_______________________________________________
Mailing list: DHIS 2 developers in Launchpad
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : DHIS 2 developers in Launchpad
More help : ListHelp - Launchpad Help

_______________________________________________
Mailing list: DHIS 2 Users in Launchpad
Post to : dhis2-users@lists.launchpad.net
Unsubscribe : DHIS 2 Users in Launchpad
More help : ListHelp - Launchpad Help

_______________________________________________
Mailing list: DHIS 2 developers in Launchpad
Post to : dhis2-devs@lists.launchpad.net
Unsubscribe : DHIS 2 developers in Launchpad
More help : ListHelp - Launchpad Help

________

[truncated for moderation]

···

On Tuesday, April 1, 2014 4:27 PM, Dayo Adeyomoye <deemoyes@yahoo.com> wrote:
On Tuesday, April 1, 2014 4:16 PM, Knut Staring <knutst@gmail.com> wrote:
On Tue, Apr 1, 2014 at 9:35 PM, Jason Pickering <jason.p.pickering@gmail.com> wrote:

On Tue, Apr 1, 2014 at 5:00 PM, Bram Piot <bram.piot@gmail.com> wrote:

On 1 April 2014 17:47, Dayo Adeyomoye <deemoyes@yahoo.com> wrote:

On Tuesday, April 1, 2014 3:19 PM, Jason Pickering <jason.p.pickering@gmail.com> wrote:
On Tue, Apr 1, 2014 at 12:47 PM, Dayo Adeyomoye <deemoyes@yahoo.com> wrote: