3

I have a .csv file with coordinates which should be converted into .shp file. The CSV file is built by analysing simple .tif raster without metadata.

As far as no CRS is saved in .csv file, the shapefile's location doesn't coincide with the .tif raster location with metadata (with CRS).

Using Python, how can I reproject my shapefile such that points are in the same place where raster is?

1 Answer 1

4

You need to define the projection system in the shapefile.

To do it with Python, you can use geopandas library in Python.

To obtain a shapefile (with CRS) from CSV, the following tasks need to be performed:

  1. Read the CSV file as a geodataframe in geopandas.
  2. Assign desired CRS to the geodataframe.
  3. Convert the geodataframe to shapefile.

For further information on how to read CSV file in geopandas and to convert it to shapefile, refer to link1 , link2 and geopandas documentation

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.