I have geojson derived from a catchment API stored in a postgres. Using a st_transform function a geometry field is added in a view as per the code below. The resulting view works fine in QGIS however it fails to load when added to ArcMap /Pro. The issue only happens when features contain complex polygons (donut shapes), no issues when the polygon is simple.
This issue seems recent, as I have been using this for over three years now and always the complex polygons were visible within Arc. as anything changed recently?
I can share actual data if that helps.
CREATE OR REPLACE VIEW public.travel_times_test
AS
WITH data AS (
SELECT travel_data_new.id,
travel_data_new.type,
travel_data_new."time",
travel_data_new.postcode,
travel_data_new.project,
travel_data_new.data::json AS fc
FROM travel_data_new
)
SELECT row_number() OVER () AS objectid,
f.id,
f.postcode,
f.type,
f.project,
f."time",
st_transform(st_setsrid(st_geomfromgeojson(f.feat ->> 'geometry'::text), 4326), 3785) AS geom
FROM ( SELECT json_array_elements(data.fc -> 'features'::text) AS feat,
data.id,
data.type,
data."time",
data.project,
data.postcode
FROM data) f;
ALTER TABLE public.travel_times_test
OWNER TO gwkgis2016;
Actually used this method to generate the geometry: Storing GeoJSON FeatureCollection to PostgreSQL with PostGIS? - Geographic Information Systems Stack...