Opened 13 years ago

Closed 13 years ago

#1039 closed defect (fixed)

ST_Distance_Spheroid / ST_Distance_Sphere gives gbox_overlaps: geometries have mismatched dimensionality

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.0.0
Component: postgis Version: master
Keywords: Cc:

Description

This works in PostGIS 1.5 and fails in PostGIS 2.0.0 now

SELECT ST_Distance_Spheroid(foo1.the_geom, foo2.the_geom, 'SPHEROID["GRS_1980",6378137,298.257222101]') As result, 
ST_AsText(foo1.the_geom) As ref1_geom, ST_AsText(foo2.the_geom) As ref2_geom
	FROM ((SELECT ST_Buffer(ST_SetSRID(ST_Point(i,j),4326), j*0.05)  As the_geom
		FROM (SELECT a*1.11111111 FROM generate_series(-10,50,10) As a) As i(i)
			CROSS JOIN generate_series(40,70, 20) As j
			ORDER BY i, i*j, j)) As foo1 CROSS JOIN ((SELECT geom  As the_geom
FROM (VALUES ( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0771 42.3866 1,-71.0767 42.3872 1,-71.0767 42.3863 1,-71.0771 42.3866 1))') ),
	( ST_GeomFromEWKT('SRID=4326;POLYGON((-71.0775 42.386 2,-71.0773 42.3863 1.75,-71.0773 42.3859 1.75,-71.0775 42.386 2))') ) ) As g(geom))) As foo2

This works in PostGIS 1.5.3 — broken now in PostGIS 2.0.0

I haven't isolated it to see which one of the above records is the problem child. It's not all of them. Let me know if you want me to try to distill further.

Change History (3)

comment:1 by robe, 13 years ago

Summary: ST_Distance_Spheroid gives gbox_overlaps: geometries have mismatched dimensionalityST_Distance_Spheroid / ST_Distance_Sphere gives gbox_overlaps: geometries have mismatched dimensionality

ditto with ST_Distance_Sphere

comment:2 by pramsey, 13 years ago

Please distill…!

comment:3 by pramsey, 13 years ago

Resolution: fixed
Status: newclosed

Pretty sure this got fixed with #1037

Note: See TracTickets for help on using tickets.