ERROR: Operation on mixed SRID geometries

I'm trying to identify which users live within defined zones in Brussels. The script looks at geom data such as 

POLYGON ((4.43881988525391 50.8450258476852, 4.43568706512451 50.8375463073822, 4.43748950958252 50.8373836953645, 4.43856239318848 50.8370042651197, 4.43809032440186 50.8361911899212, 4.43826198577881 50.8358659558754, 4.43976402282715 50.835649131919, 4.44332599639893 50.8347276188661, 4.44723129272461 50.8331826885148, 4.45014953613281 50.831935865329, 4.45482730865479 50.8294150123684, 4.45620059967041 50.8293607989814, 4.46117877960205 50.8313666523666, 4.46774482727051 50.8371668784595, 4.46499824523926 50.8394434057215, 4.46555614471436 50.8401751230416, 4.46379661560059 50.8447006752114, 4.46195125579834 50.844483892303, 4.45903301239014 50.8482232562963, 4.44972038269043 50.8474103765768, 4.44521427154541 50.8442671083874, 4.44281101226807 50.8436980458164, 4.43881988525391 50.8450258476852))

The script doesn't identify the geoms for all the zones. When I enter the goem for "woluwe saint pierre" I get an erros message  "ERROR: Operation on mixed SRID geometries"

Query:

WITH user_address_geom AS
  (SELECT ST_SetSRID(ST_MakePoint(lon, lat), 4326) AS address_pos_gis,member_ID,
          lon,          lat
   FROM rw.user_address_nonnull_lonlat),
zones as (
SELECT u.*,
       case when sz.name ='woluwe' then 'Woluwe'
            when sz.name = 'Airport' then 'Airport'
             when sz.name = 'evere' then 'Evere'
 when sz.name = 'Jette' then 'Jette'
 when sz.name = 'expo' then 'Expo'
 when sz.name = 'ukkle' then 'Ukkle'
 when sz.name = 'woluwe saint pierre' then 'Woluwe Saint Pierre'
 when sz.name = 'launch homezone' then 'Launch Homezone'
else 'Outside Homezone' end AS zone_name
FROM user_address_geom u
LEFT JOIN rw.homezone sz ON st_contains(sz.geom, u.address_pos_gis)
LEFT JOIN rw.user_address_nonnull_lonlat ll ON ll.member_id = u.member_ID)

Select distinct m.country, zo.zone_name
,date_trunc('month',m.application_date)
,case when zo.zone_name is not null then zo.zone_name else 'Empty' end as "Home_Zone"
,count(distinct m.member_id)
  from ana.members_table m
left join user_address_geom z on z.member_ID = m.member_ID
left join zones zo on zo.member_ID = m.member_ID
where  m.role = 'customer'
and m.test_account_p = 'f'
and m.application_date >='2017-01-01'
group by m.country, zo.zone_name,date_trunc('month',m.application_date)
Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
reply to topic
Like Follow
  • 3 wk agoLast active
  • 28Views
  • 1 Following