Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sometimes data in 900913 crs is not shown #18391

Closed
qgib opened this issue Mar 24, 2014 · 7 comments
Closed

sometimes data in 900913 crs is not shown #18391

qgib opened this issue Mar 24, 2014 · 7 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Projections/Transformations Related to coordinate reference systems or coordinate transformation

Comments

@qgib
Copy link
Contributor

qgib commented Mar 24, 2014

Author Name: Regina Obe (Regina Obe)
Original Redmine Issue: 9863
Affected QGIS version: 2.2.0
Redmine category:projection_support


I'm not sure if this is a similar issue to #17880 (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


@qgib
Copy link
Contributor Author

qgib commented Jun 21, 2014

Author Name: Jürgen Fischer (@jef-n)


which errors do you get?


  • status_id was changed from Open to Feedback

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2014

Author Name: Jürgen Fischer (@jef-n)


  • fixed_version_id was changed from Version 2.2 to Future Release - Lower Priority

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2014

Author Name: Jürgen Fischer (@jef-n)


  • category_id was configured as Projection Support
  • subject was changed from QGIS 2.2 sometimes doesn't show 900913 data to sometimes data in 900913 crs is not shown

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2014

Author Name: Regina Obe (Regina Obe)


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.

@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2014

Author Name: Giovanni Manghi (@gioman)


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.


  • status_id was changed from Feedback to Closed
  • resolution was changed from to worksforme

@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2014

Author Name: Regina Obe (Regina Obe)


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.

For reference:
@select ST_Extent(way) from planet_osm_line;@

BOX(-7913644.17 5215347.13,-7912393.22 5216020.92)

--note how this is way different from real extent --
@select ST_EstimatedExtent('planet_osm_line', 'way');@
BOX(-7953212.5 5215343.5,39568.22265625 5216024.5)

@select ST_Extent(way) from planet_osm_polygon;@
BOX(-7913678.04 5215396.81,-7912557.37 5216007.14)

@select ST_EstimatedExtent('planet_osm_polygon', 'way');@
ERROR: stats for "planet_osm_polygon.way" do not exist


  • 7554 was configured as osm_sample.zip

@qgib
Copy link
Contributor Author

qgib commented Jun 29, 2014

Author Name: Regina Obe (Regina Obe)


Nevermind if it was a PostGIS bug, its fixed. I did a vacuum analyze on the table and now it displays fine. Sorry for the noise.

@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Projections/Transformations Related to coordinate reference systems or coordinate transformation labels May 24, 2019
@qgib qgib added this to the Future Release - Lower Priority milestone May 24, 2019
@qgib qgib closed this as completed May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Projections/Transformations Related to coordinate reference systems or coordinate transformation
Projects
None yet
Development

No branches or pull requests

1 participant