2

I'm running Photo2Shape to create a shapefile that I then process through Points2One in order to create a line to make a buffer layer. When I run Photo2Shape it outputs a shapefile in wgs84 which makes every layer after that the same CRS. My project default set to EPSG:102003.

Is there a way to set the default to another system so I can use meters to create a buffer layer later on? Neither Points2One nor Photo2Shape have the option. I know you can use 'save as' to save the shapefile in another coordinate system but this isn't efficient when I need to do this several hundred times.

1
  • Your camera is capturing GPS co-ordinates, so it will be in WGS84 already, you will have to re-project at some stage.
    – HeikkiVesanto
    Commented Nov 9, 2016 at 10:52

1 Answer 1

1

You can edit the source code for the plugin and change the CRS so that all outputs have the same CRS you defined.

The file you need to edit is the photoimporter.py file and can be found in your .qgis2 directory. For example, for me it is located in:

C:/Users/Me/.qgis2/python/plugins/photo2shape/photoimporter.py

Look for the def _newShapefile(self) function and you will see the line which contains setting the CRS for all outputs. Change the initial value of 4326 to 102003:

photoimporter.py

Save the edit then either reload the plugin or restart QGIS.

8
  • 1
    I think you would also have to re-project the co-ordinates before writing them to the shapefile.
    – HeikkiVesanto
    Commented Nov 9, 2016 at 11:11
  • @Vesanto - I haven't really used this plugin so can't confirm if the coordinates need to be reprojected, however I assumed they would be when being written to a shapefile using the QgsVectorFileWriter() class...?
    – Joseph
    Commented Nov 9, 2016 at 11:18
  • I would assume it reads the raw GPS data from the image EXIF data and creates a point using that. If so it would be reading WGS84 co-ordinates. But can't confirm.
    – HeikkiVesanto
    Commented Nov 9, 2016 at 12:03
  • This doesn't seem to work. It shows that it's in the projection I want but it doesn't match up with the rest of the project.
    – brink
    Commented Nov 10, 2016 at 1:25
  • 2
    @Joseph Can't win them all. I started using the modeler which has a reprojection function you can add to the work flow so I am able to avoid having unnecessary layers. Thanks for the help.
    – brink
    Commented Nov 15, 2016 at 18:08

Your Answer

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

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