Shapefile generated by ShpResponder taking the SRS of the geometry field even when proj_transform atribute is given

Luiz Fernando Barbosa Vital avatarLuiz Fernando Barbosa Vital created an issue

possible fix on

        # Creating the layer
        layer = ogr.OGR_DS_CreateLayer(ds,os.path.basename(, out_srs and out_srs._ptr or srs._ptr, ogr_type, None)

Comments (5)

  1. Dane Springmeyer

    Luis, very nice catch, thanks for the report. I can confirm that the shapes are getting transformed but the .prj output is the wrong one, and this was introduced in a0ddfa7c15da when coordinate reprojection was optimized for speed.

  2. Gilles Bassière
    • changed status to open


    Thanks very much for sharing this app, it is very useful.

    I got an error "'NoneType' object has no attribute '_ptr'" which is caused by the fix committed in r27.

    The committed fix shows: out_srs._ptr or srs._ptr whereas the proposed patch was: out_srs and out_srs._ptr or srs._ptr

    without the first condition, the export fails when no proj_transform is defined.

    Regards, Gilles

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.