0

I am regularly using the QuickWKT plugin in QGIS. My project CRS is rarely EPSG:4326, but I often need to add geometries in EPSG:4326. In order to add such geometries, I change project CRS to EPSG:4326, use QuickWKT plugin to add the geometry, then change the project CRS back to what it is by default.

If I don't change the project CRS before using the plugin, geometries such as this one: POLYGON ((-75.345 38.758, -75.229 38.758, -75.229 38.668, -75.345 38.668, -75.345 38.758)) will be interpreted not in EPSG:4326, but in project CRS. The polygon above should be a polygon in Delaware.

These back and forth changes of project CRS is somewhat tedious.

Can I use QuickWKT to add WKT strings in EPSG:4326 without changing the project CRS to EPSG:4326?

3
  • 1
    this is the one time you can change the CRS of a layer in QGIS and not have everything go wrong.
    – Ian Turton
    Commented Aug 15 at 15:10
  • Have you tried to right click the layer, set CRS?
    – JGH
    Commented Aug 15 at 17:27
  • Yes, that method works indeed.
    – zabop
    Commented Aug 15 at 17:49

1 Answer 1

0

I think that the best way is to change the code of the plugin on your local installation. You will have to change the code that checks layer CRS and hardcode EPSG:4326 there.

2
  • Thanks for the answer; I think it could be improved by pinpointing where that code is, exactly. Here is the repo.
    – zabop
    Commented Aug 15 at 17:15
  • Please try changing line 110 in file QuickWKT.py from def createLayer(self, typeString, layerTitle=None, crs=None): to def createLayer(self, typeString, layerTitle=None, crs="EPSG:4326"): I don't have much spare time to check now if it will work. If it is then I'll edit my answer.
    – rychlik
    Commented Aug 17 at 10:37

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.