You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reading SRID info from serialized geometries using shapely.get_srid is wrong for srid >= 3968 #2122
df=spark.sql("""SELECT ST_SetSRID(ST_GeomFromText('POINT (0 0)'), 3857) as geom1, ST_SetSRID(ST_GeomFromText('POINT (0 0)'), 3967) as geom2, ST_SetSRID(ST_GeomFromText('POINT (0 0)'), 3968) as geom3, ST_SetSRID(ST_GeomFromText('POINT (0 0)'), 3969) as geom4""")
col=df.collect()[0]
print(shapely.get_srid(col[0])) # 3857 (correct)print(shapely.get_srid(col[1])) # 3967 (correct)print(shapely.get_srid(col[2])) # -128 (should be 3968)print(shapely.get_srid(col[3])) # -127 (should be 3969)
The boundary is 3968, which is 10000000. It's being interpreted as -128 instead. Seems like it's being interpreted as a signed 8-bit int instead of an unsigned one or a larger int.
Activity
[GH-2122] Fix deserialization of geometry SRID in python (#2123)
[apacheGH-2122] Fix deserialization of geometry SRID in python (apach…