Bug report #9863
sometimes data in 900913 crs is not shown
|Affected QGIS version:||2.2.0||Regression?:||No|
|Operating System:||Windows 7||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||worksforme|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||18391|
I'm not sure if this is a similar issue to #9266 (which should be fixed), but after loading OSM data In PostGIS 2.1.1 with osm2pgsql on Windows. If I select for example the planet_osm_polygon layer (which is in srid: 900913), it prompts for SRID and regardless what I pick (EPSG:3785) or if I cancel, most of the time it does not draw the layer and doesn't give an error though somtimes it does (very odd).
However if I change my table way column with:
ALTER TABLE planet_osm_polygon ALTER COLUMN way TYPE geometry(Geometry, 3785) USING ST_SetSRID(way,3785);
It no longer prompts and works fine.
This is running QGIS version 2.2.0-Valmiera 64-bit, PROJ.4 Version 480 on Windows
#5 Updated by Giovanni Manghi over 6 years ago
- Status changed from Feedback to Closed
- Resolution set to worksforme
Regina Obe wrote:
Haven't had a chance to test this again. I have to refind the data I was working with. It didn't give an error just didn't show anything. I'll check the logs next time to see what it shows.
then maybe we can close this ticket as we can't replicate the issue, and eventually reopen it again should it show again.
#6 Updated by Regina Obe over 6 years ago
- File osm_sample.zip added
Keep this closed for now. Might be a PostGIS issue (testing with PostGIS 2.1.2 on windows with QGIS 2.4 OSGEO4W)
I finally found the dataset in question and tested in QGIS 2.4. QGIS 2.4 doesn't seem to have quite same issue and doesn't prompt so its better but the extent it uses is way off and all I see is a tiny speckle. Might be a postgis bug and not a QGIS bug.
I see a tiny speckle on the screen when I load this and can zoom in to the speckle to see all the data.
I suspect maybe QGIS is relying on the ST_EstimatedExtent value, which seems to be way off for this dataset and maybe it didn't in previous versions I used of QGIS. If I load the polygon layer first it works fine (presumably because no estimates for polygon so QGIS is using the true extent).
Attached is the sql for the linestring set in question and related polygon set.
SELECT ST_Extent(way) from planet_osm_line;
--note how this is way different from real extent --
SELECT ST_EstimatedExtent('planet_osm_line', 'way');
SELECT ST_Extent(way) from planet_osm_polygon;
SELECT ST_EstimatedExtent('planet_osm_polygon', 'way');
ERROR: stats for "planet_osm_polygon.way" do not exist