1

I am having some shapefiles without a defined projection (.prj files)

I used shp_doctor available at https://www.gaia-gis.it/fossil/spatialite-tools/index to identify the files. The extents provided to me by the program are as follows:

  • 488340.166723, 552417.623699
  • 330265.123073, 433755.593428
  • 517634.601459, 504177.307156

I am also aware of the corresponding lat/lon which are (nearby):

  • 22.189171,69.9567533
  • 22.8049742,70.8217758
  • 23.4302321,72.6454342

I have read several blogs about northing and easting but I was not able to find any specific information regarding the co-ordinates (x,y) to be (6 digits, 6 digits) (Easting, Northing). I only found information regarding (x,y) to be (6,7 digits) (Easting, Northing).

6
  • 1
    Sorry, but I do not understand what you mean with (6,6) vs (6,7).
    – user30184
    Jan 30, 2017 at 15:07
  • The location can be represented by UTM. It has been explained at maptools.com/tutorials/utm/quick_guide
    – Candorz
    Jan 30, 2017 at 15:15
  • Should these shapes be in Western India? The projected coordinates don't have to be UTM, there are many other coordinate systems in the world. If the data crosses the extent of an UTM grid border, the data provider might have chosen a different projection.
    – AndreJ
    Jan 30, 2017 at 15:44
  • Hm, surely this is not a new question and already well answered? Not sure if questions about specific datasets are good, GISSA is not for your "homework". Jan 30, 2017 at 15:51
  • 1
    @user30184 (6,6) and (6,7) refer to the number of digits left of the decimal. UTM is almost always (6,7) but other ProjCRS can be (6,6), (7,6), (7,7) etc. OP, if the data is in western India, I was also not able to find any appropriate ProjCRS that matches your values. Where did you find the shapefiles?
    – mkennedy
    Jan 30, 2017 at 17:48

2 Answers 2

3

First you have to find out the CRS of your shapefile. For that I recommend using http://projfinder.com/

Enter X and Y for a location you can the corresponding place on a world map for, target the crosshair on that location and hit "Find My Projection". This will give you a list of probable EPSG codes.

For your example this does not succeed though. Either the coordinates in your shapefile are not in any official system or truncated.

Next tool was https://tools.retorte.ch/map/ which displays UTM coordinates for selected locations. For your first latlon pair I got 598633, 2454084 in 42Q.

If I add a 2 to the y coordinate, EPSG:32642 is "just" 150km off. Are you sure the coordinates and latlons you listed do correspond? This is close enough that I think they might be mixed up.

Once you found the correct CRS, open the shapefile in QGIS. Set the layer's CRS to it (in its properties), then save the file in whatever CRS you like.

1
  • I am having hundreds of such files with (6,6) as their extents. I want to represent them with OL3 so clusters can be identified having the most number of files. OL3 can readily display Boxes using extent values in form of lat/lon values. Thus such a requirement arise. It is not possible to check each and every file manually.
    – Candorz
    Jan 30, 2017 at 19:09
1

The sample file you provided does not have UTM coordinates, but coordinates of a transverse mercator projection centered on 22.5°E 71.5°N and false Easting and Northing of 400000m on that point.

If all your local data uses the same projection, you can use this custom CRS

+proj=tmerc +lat_0=22.5 +lon_0=71.5 +k=0.999738 +x_0=400000 +y_0=400000 +datum=WGS84 +units=m +no_defs

for OpenLayers or any other software that uses GDAL/PROJ.4 in the background.

If the data from other towns use different CRS, you have to exchange the parameters given above. If you want the coordinates to be in degrees, you have to use Save As ... on the layer inside QGIS or ogr2ogr on the command line to reproject your data from the custom CRS to WGS84 EPSG:4326.

2
  • I have a database which have been created by utilizing thousands of shapefiles and shp_doctor as shown in: ![Table Image]<img src="i.imgur.com/QLJTFQv.png">. It is not possible to go through files one by one. shp_doctor has extracted extents for some files in the form of lat/lon but others with northing/easting. None of the shapefiles are having .prj files.
    – Candorz
    Jan 31, 2017 at 7:54
  • If you are not able to contact the data provider about the projections used, you can still guess that all projected data share the same CRS you mentioned above. If it does not fit, you are out of luck, and can use only the unprojected datasets in degrees.
    – AndreJ
    Jan 31, 2017 at 10:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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