3

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.

  • 1
    The right projection is ED50 / UTM zone 30N. WKT for this projection format can be found at spatialreference.org/ref/epsg/23030. Since I'm new here, I can't answer my own question yet. – calvillo Jul 4 '13 at 17:53
  • Welcome to gis.SE. When you can answer the question, can you remember to explain how you resolved this? Sometimes the process is important, so other people can do "almost" the same thing. – BradHards Jul 4 '13 at 21:04
  • Hi calvillo! Are you sure is ED50? This could be ETRS89 too. – cag Jul 4 '13 at 21:31
  • Hello cag. I'm pretty sure it is. I imported the converted shapefiles to QGIS together with others from Natural Earth and they match perfectly. I'll give more details when I'm able to answer my own question. – calvillo Jul 4 '13 at 21:41
2

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"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.