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

Map projection selection for printing #34

Open
4 of 7 tasks
mbarto opened this issue Nov 5, 2021 · 1 comment
Open
4 of 7 tasks

Map projection selection for printing #34

mbarto opened this issue Nov 5, 2021 · 1 comment
Assignees

Comments

@mbarto
Copy link

mbarto commented Nov 5, 2021

We want to allow the user to select an alternative CRS for the printed map from the MapStore / GeoNode printing dialog.

New Wireframe 1

We will introduce a reprojection phase of all the stuff to be printed, so that the map is printed using a user-selected projection. For sure we would have to reproject:

  • The map bbox (or center and scale)
  • Vector data
  • BBOX of wms layers

Some types of layers are not, by nature, reprojection friendly, so we would exclude those layers from the printed map, if reprojection occurs (a warning to the user could be displayed in this case. These layers may include WMTS and TMS ones (OSM and similar too), and all the vendor API based ones (google, bing, etc.). We could also check that WMS layers support the chosen CRS (using capabilities). We could somehow use the already existing engine that does the same when the screen map is in a CRS different from EPSG:3857.

Also, CRS may be incompatible, depending on the current bbox, so it may not be possible to reproject the current map at every position and scale (for example, UTM zones are valid only on a specific area). We may advise the user when reprojection is not possible.

Final concern: the map preview would be inconsistent with the printed map when a CRS different than the screen one is selected, so we will hide the map preview box when this happens, with a notice for the user on why the preview map is not shown.

This requires some work at the MapStore level:

And some work as a custom plugin:

  • implementing a configurable CRS selector as a printing dialog plugin (it should allow listing the allowed CRSs, so that only those requested by AIT are shown, EPSG:3857, EPSG:4326, EPSG:32647, EPSG:32648), that would store the user selection in the printing spec; eventually reuse part of the CRS selector plugin, refactoring where needed
  • implementing and configuring a reprojection step for the spec to mapfish transformer
  • implement custom validation that will notify the user of layers non supported to print on the selected CRS, or of an invalid area for reprojection (Improve layer validation for printing, excluding those not able to print in the target projection MapStore2#7748)
@mbarto
Copy link
Author

mbarto commented Dec 21, 2021

Depends on geosolutions-it/MapStore2#7689

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