geopython / MetaSearch

*** We have moved! MetaSearch is now a core QGIS plugin! (2014-11-30). See QGIS repository
https://hub.qgis.org/wiki/quantum-gis/MetaSearch
Other
4 stars 12 forks source link

QGIS 2.3 Master Ubuntu 14.04 #58

Closed northrivergeo closed 10 years ago

northrivergeo commented 10 years ago

I hope this is a good place to leave this note.

Just started running QGIS 2.3 on Ubuntu 14.04. When searching the CSW of data.gov I received this error when clicking on records.


An error has occured while executing Python code:

Traceback (most recent call last): File "/usr/share/qgis/python/plugins/MetaSearch/dialogs/maindialog.py", line 549, in record_clicked geom.transform(ctr) Exception: unknown

Python version: 2.7.6 (default, Mar 22 2014, 23:03:41) [GCC 4.8.2]

QGIS version: 2.3.0-Master Master, exported

Python path: ['/usr/share/qgis/python/plugins/processing', '/usr/share/qgis/python', u'/home/rjhale/.qgis2/python', u'/home/rjhale/.qgis2/python/plugins', '/usr/share/qgis/python/plugins', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PILcompat', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/pymodules/python2.7', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', '/home/rjhale/.qgis2/python/plugins/DigitizingTools/tools', '/usr/share/qgis/python/plugins/fTools/tools']


I was searching (in case you want to replicate): -87.81431 34.325558 -82.79549 36.373995 for Agriculture. Before that I searched for NAIP in the same area and received an error similar to the one above.

If I need to file this on hub.qgis I can.

Thanks for all the good work.

rduivenvoorde commented 10 years ago

Hi,

you are on the right place for issue with MetaSearch plugin. so no need to add it on hub.

but I'm not able to reproduce your problem here on my machine.

What I see is that the line which gives you an error does not have that code (anymore). Which version are you running? 2.0?

When I look into the code which raises that error, it appears something to do with the Coordinate Reference System of your map. That is, the plugin tries to create a crs-transformer from latlon/4326 to the one which you have currently in QGIS. Do you maybe have some special crs started there? Or what do you see in the most right bottom corner as 'project crs'?

Another option: if you start the Python console (via Plugins/Python console), and call this lines of code:

iface.mapCanvas().mapRenderer().destinationCrs() you should see something like: <qgis._core.QgsCoordinateReferenceSystem object at 0x7fe6d91cf6d8>

iface.mapCanvas().mapRenderer().destinationCrs().toProj4() you should see somethink like (in case of latlon project) u'+proj=longlat +datum=WGS84 +no_defs'

can you maybe also try to search in another service (like the national dutch one for example, search for 'wegen')? Do you have the same problem there?

plz let us know.

northrivergeo commented 10 years ago

Good news I think. I didn't think about the projection. I was using EPSG:3857. I changed to EPSG:4326 and no error. I tried a few more searches everywhere and things are working quite well in EPSG:4326

In order to do the search I added a map service from ESRI. That defaulted the projection to 3857.

rduivenvoorde commented 10 years ago

Good to hear it is working, but apparently the bug is still there, but only showing up in certain corner cases. Is this ESRI Mapservice public? Or are you aware of such a service I can try out?

northrivergeo commented 10 years ago

I guess I should say it is a REST service from ArcGISOnline. I was using it (a topographic map layer) to locate myself on the map before doing a search. I performed the above search of the data.gov site. When I added the REST service QGIS changed projections (since it was the first thing added to the map).

Save the following to an XML and you should be able to add the image. --------------copy here--------------------------

http://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/${z}/${y}/${x} -20037508.34278700 20037508.34278700 20037508.34278100 -20037508.34278100 15 1 top EPSG:3857 256 256
tomkralidis commented 10 years ago

Related to #63.