Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shape export/import fails with different projection #315

Closed
GoogleCodeExporter opened this issue May 10, 2015 · 1 comment
Closed

Shape export/import fails with different projection #315

GoogleCodeExporter opened this issue May 10, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.Goto http://lib.heron-mc.org/heron/0.77/examples/formsearchcenter/index.html 
and search for some objects and download them as ESRI Shape
2.Goto http://lib.heron-mc.org/heron/0.77/examples/uploadfeatures/index.html 
and import the shape


What is the expected output? What do you see instead?
We expect to zoom in to the uploaded objects but none of them are displayed on 
a zoomed out map

What version of the product are you using? On what operating system?
Heron-077

Please provide any additional information below.
The generated shape/zip does contain a .prj file so it seems that generating 
the shape is fine but reading and paring is not.

Original issue reported on code.google.com by rvob...@gmail.com on 2 Dec 2013 at 10:39

@GoogleCodeExporter
Copy link
Author

Fixed, see example:

http://lib.heron-mc.org/heron/latest/examples/uploadfeatures/index.html

It was already possible to upload any projection format. But the UploadFeature 
config needed to have a "fileProjection" configured for each possible 
projection (like EPSG: 28992) like:

                 {name: 'ESRI Shapefile (zipped, Dutch RD EPSG:28992)', fileExt: '.zip', mimeType: 'text/plain', formatter: 'OpenLayers.Format.GeoJSON', fileProjection: new OpenLayers.Projection('EPSG:28992')},


Now UploadFeature and heron.cgi have been extended to allow explicit 
reprojection. Note, that not all formats are self-describing in their 
projection. e.g. a Shapefile must contain a .prj file for this to work. By 
setting the 'targetSrs' config value in the Upload format entry server-side 
(via ogr2ogr) reprojection is triggered, e.g.

   {name: 'ESRI Shapefile (zipped, Any Projection)', fileExt: '.zip', mimeType: 'text/plain', formatter: 'OpenLayers.Format.GeoJSON', targetSrs : 'EPSG:4326'}


In addition it is possible to configure an explicit sourceSrs (see example 
GeoJSON upload Dutch RD, e.g.
                 {name: 'GeoJSON, Dutch RD EPSG:28992', fileExt: '.json', mimeType: 'text/plain', formatter: 'OpenLayers.Format.GeoJSON', sourceSrs : 'EPSG:28992', targetSrs : 'EPSG:4326'},


Original comment by jus...@gmail.com on 2 Dec 2013 at 1:01

  • Changed state: Fixed
  • Added labels: Milestone-Release1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant