PostGIS Geography Type, ERROR: Invalid geography #17317
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Data Provider
Related to specific vector, raster or mesh data providers
Author Name: Denver Pierce (Denver Pierce)
Original Redmine Issue: 8572
Affected QGIS version: master
Redmine category:data_provider/postgis
Loading geography types in Master by adding a PostGIS Layer, nothing is displayed and the following log is given:
@query: DECLARE qgisf0_0 BINARY CURSOR FOR SELECT
st_asbinary(st_force_2d("pos"::geometry),'NDR'),"id" FROM
"public"."locations" WHERE "pos" && st_makeenvelope(-180,-90,180,90,4326)
returned 7 [ERROR: Invalid geography. Antipodal (180 degrees long) edge
(180 -90,180 90) detected, add a point between to make two edges that span
less than 180 degrees.]@
Relevant stack exchange post:
http://gis.stackexchange.com/questions/70556/error-invalid-geography-antipodal-edge-with-postgis?noredirect=1#comment96122_70556
And post on the list:
http://osgeo-org.1560.x6.nabble.com/geometry-with-geography-type-column-not-displayed-td4690688.html#a4690860
It seems the BBOX query is being cast to geography, then that is being sent back as invalid as it contains a banned antipodal query on a geography.
@create TABLE global_points (
id SERIAL PRIMARY KEY,
name VARCHAR(64),
location GEOGRAPHY(POINT,4326)
);
INSERT INTO global_points (name, location) VALUES ('freiburg', ST_GeographyFromText('POINT(7.86 48.0)'));
CREATE INDEX global_points_gix ON global_points USING GIST ( location );@
The text was updated successfully, but these errors were encountered: