iobis / bioeco-geonode

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
https://geonode.org/
Other
0 stars 1 forks source link

GeoJSON layers get assigned CRS 0 #140

Open pieterprovoost opened 2 years ago

pieterprovoost commented 2 years ago
insert into public._all_layers (pk, name, keywords, readiness_coordination, readiness_data, readiness_requirements, the_geom)
select
    %s as pk,
    %s as name,
    %s as keywords,
    %s as readiness_coordination,
    %s as readiness_data,
    %s as readiness_requirements,
    ST_ForceCollection(st_transform(the_geom, 4326)) as the_geom
from public."map_Patricia_Rosel_NOAA_Federal"
column "the_geom" does not exist
LINE 10: ...                  ST_ForceCollection(st_transform(the_geom, ...
                                                              ^
HINT:  There is a column named "the_geom" in table "_all_layers", but it cannot be referenced from this part of the query.
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"stroke":"#555555","stroke-width":2,"stroke-opacity":1,"fill":"#555555","fill-opacity":0.5,"name":"Galveston and West Bay"},"geometry":{"type":"Polygon","coordinates":[[[-95.2239990234375,28.94086176940557],[-94.46044921875,28.94086176940557],[-94.46044921875,29.835878945929952],[-95.2239990234375,29.835878945929952],[-95.2239990234375,28.94086176940557]]]}},{"type":"Feature","properties":{"stroke":"#555555","stroke-width":2,"stroke-opacity":1,"fill":"#555555","fill-opacity":0.5,"name":"Terrebonne & Timbalier Bay"},"geometry":{"type":"Polygon","coordinates":[[[-90.92010498046875,29.0969770630431],[-90.24169921875,29.0969770630431],[-90.24169921875,29.370207973865522],[-90.92010498046875,29.370207973865522],[-90.92010498046875,29.0969770630431]]]}},{"type":"Feature","properties":{"stroke":"#555555","stroke-width":2,"stroke-opacity":1,"fill":"#555555","fill-opacity":0.5,"name":"Choctawhatchee"},"geometry":{"type":"Polygon","coordinates":[[[-86.64230346679688,30.307688867381398],[-86.10397338867188,30.307688867381398],[-86.10397338867188,30.52204730013766],[-86.64230346679688,30.52204730013766],[-86.64230346679688,30.307688867381398]]]}}]}
pieterprovoost commented 2 years ago

A fix was implemented for the change in geometry column, but the issue is now with missing SRID.

ST_Transform: Input geometry has unknown (0) SRID