Friday, 1 September 2017

coordinate system - Projection of Shapefiles for Spain (INE)



I downloaded the official shapefiles for the municipalities of Spain from INE here.


It has a lot of shapefiles, but I found out that the right one for what I need is esp_muni_0109.shp. I would like to convert these shapefiles to WGS84 with ogr2ogr. The problem is that these shapefiles have no .PRJ files, so I don't know from what projection system to convert them from.


Does anyone know the right projection system for these shapefiles?
If so, can anyone tell me what parameters to use with ogr2ogr? (I'm pretty new in all of this).


Thank you.



Answer



According to this discussion, I found out that the right projection system is ED50 / UTM zone 30N. Then, for the conversion, I created a .PRJ file with the information I found here:


PROJCS["ED50 / UTM zone 30N",
GEOGCS["ED50",
DATUM["European_Datum_1950",

SPHEROID["International 1924",6378388,297,
AUTHORITY["EPSG","7022"]],
AUTHORITY["EPSG","6230"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4230"]],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],

PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-3],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
AUTHORITY["EPSG","23030"],
AXIS["Easting",EAST],
AXIS["Northing",NORTH]]


Finally, I used ogr2ogr with these parameters:


ogr2ogr destination.shp source.shp -t_srs "+proj=longlat +ellps=WGS84 +no_defs +towgs84=0,0,0"

No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...