Closed ghost closed 2 years ago
Sorry for raising this issue, it turns out the problem was with how I created the .shp files. They were not actually projected into EPSG 4326, their .prj file just said so. The data itself was still in EPSG 28992.
After fixing that issue the plugin works as expected.
I did find out that, in case of a non EPSG 4326 projection, the .prj file has to contain a PROJ.4 definition instead of an ESRI WKT which QGIS creates by default.
So instead of:
$ cat map.prj
PROJCS["RD_New",GEOGCS["GCS_Amersfoort",DATUM["D_Amersfoort",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["False_Easting",155000.0],PARAMETER["False_Northing",463000.0],PARAMETER["Central_Meridian",5.38763888888889],PARAMETER["Scale_Factor",0.9999079],PARAMETER["Latitude_Of_Origin",52.1561605555556],UNIT["Meter",1.0]]
It should be:
$ cat map.prj
+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.417,50.3319,465.552,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs
QGIS always creates the .prj file in the ESRI WKT format, but there are tools available that can convert that programmatically (or you can look it up on epsg.io).
It appears all shapefiles I upload as a collection of files inside a zip file are rendered as a line at the top of the basemap:![image](https://user-images.githubusercontent.com/52008464/162032249-fd3aaf32-7c63-404a-877e-ae343237eed2.png)
This is regardless of the projection set using QGIS and stored in the accompanying .prj file.
Steps to reproduce
I've attached two testfiles in case this helps with reproducing the issue. pc4-4326.zip pc4-28992.zip
Expected result: The shapefile is shown on a basemap. Actual result: A single line is shown in the top of the basemap
Things I've tried without any noticeable result
ckanext.geoview.shp_viewer.srid = 4326
in the ckanproduction.ini
file<hash>_shp.js
file, so I assume the steps worked, but I could not render the shapefiles correctly.Things I've tried with limited result
ckanext.geoview.shp_viewer.srid = 28992
in the ckanproduction.ini
file.Versions
Thank you very much for any support in advance!