Closed afalenski closed 2 years ago
A solution has to deal with 2 aspects:
To 1.: We are using the openlayer library to visualize maps and shape files. This lib has an build in support for the the projection types 'EPSG:4326' and 'EPSG:3857' and some aliases of them. The lib provides a method to detect whether the projection is built in supported. Ergo, question 1 is easy to answer, if we want to use the built in support only.
To 2.: Event with an appropriate projection type, the user might see no shapes, either because (Case A) the dimension of the shapes is zero (only point of interests), or (Case B) the shapes are to small in comparison to the zoom scale or station distances, or (Case C) the shapes are out of focus (e.g. only german stations but a shape file from spain). Case A ist easy to detect, but Case B and C depend on some defintions, in particular 'When exactly are the shapes out of focus?' and 'When are the shapes to small?'
1) We should definitely use both EPSG which are WGS 84 Web Mercator / WGS 84/Pseudo-Mercator. This "...is a variant of the Mercator map projection and is the de facto standard for Web mapping applications." (https://en.wikipedia.org/wiki/Web_Mercator_projection). 2) The user needs to use one of these two projections. An imported shape must be visible, even if it is just a point of interest. Using the zoom all button in FCL Web the shapes should also be focused. This means if there are 4 stations in Germany and one shape in the USA, the zoom all button should focus the map so that stations AND shape are visible.
@ruegenbfr Please provide your geojson test file for testing when the 'EPSG:4326' and 'EPSG:3857' projection types have been implemented.
Warnings are different to the issue description:
Data cannot be loaded. Unsupported projection type. Please use geojson with pojection type 'EPSG:4326' or 'EPSG:3857' instead.
is shown to the user.Please test with: Polygon_DE_EPSG3043.geojson Polygon_DE_EPSG4326.geojson Polygon_DE_EPSG3857.geojson Polygon_DE_wo_projection_type_spec.geojson
Tested with Machine: SINA
OS: Windows 10
Datasets:
Browsers:
As a user who has uploaded *.geojson files I would like to see this shapefile. I uploaded a file containing all German municipalities (see http://opendatalab.de/projects/geojson-utilities/) as well as my own geojson drawn at https://geojson.io (see attachment). Neither of these geojson files were displayed.
Polygon-DE-0-rough.txt (rename .txt to .geojson; geojson is not allowed in ZenHub)
Include a warning -> if no projection type is given, the warning should be "Projection type of geojson file not specified. Mercator projection is assumed. Map might be distorted if data do not fit Mercator projection." -> if wrong projection type, the warning should be "Incorrect projection type. Incorrect geojson files are not supported."
Think of Tests
Additional context
General Guidelines