Re: [Qgis-user] How to use a vat.dbf with tif in QGIS?
Am 20.02.2015 um 09:13 schrieb Albin Blaschka: Hello List, I have a geotiff raster [1] with an associated vat.dbf - file containing the legend for the unique values of the raster. Now, I would like to use this information to style the raster in QGIS, but did not find a way... Has anyone experience with such a file (vat.dbf) in QGIS or better found a way to use it? Other tools like grass or command-line tools are also ok. I googled around, but I am stuck... As anybody a hint or push in the right direction? Thanks in advance, Albin [1] http://rmgsc.cr.usgs.gov/outgoing/ecosystems/Global/ Hello, so, in the meantime after excessive googling and much trial and error, I found (hopefully) the solution by myself :-) https://pvanb.wordpress.com/2014/02/05/creating-a-qgis-color-map-from-text-file/ Not tested yet... Albin -- | Albin Blaschka, Mag.rer.nat. | Etrichstrasse 26, A-5020 Salzburg | * www.albinblaschka.info * | * www.researchgate.net/profile/Albin_Blaschka * | - It's hard to live in the mountains, hard but not hopeless! ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] How evaluate a string as an expression in expression builder
Hello all, Does any one know how if it's possible to evaluate an all string as an expression in expression builder. What I'm aiming to be able to do is to dynamicly create expression based on other fields. So Imagine I have attribute with a string like this: 'field_1 = 20' Is there a way to evaluate this as an conditional expression? Thanks, Alexandre Neto ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Re : How evaluate a string as an expression in expression builder
Hi, Can't this be done with the simple use of case when condition? Something like: CASE WHEN field_1= 20 THEN 'something True' ELSE 'something false' END Envoyé depuis mon HTC - Reply message - De : Enrico Ferreguti enrico...@gmail.com Pour : Alexandre Neto senhor.n...@gmail.com Cc : QGIS User qgis-user@lists.osgeo.org Objet : [Qgis-user] How evaluate a string as an expression in expression builder Date : jeu., févr. 26, 2015 15:52 I developed a plugin called refFunctions v1.0 that extends expressions with a new group of functions. In Expression calculator, under the group 'Reference' you will find a function called dbquery(targetLayer,targetField,whereClause) It was developed keeping in mind the reference to other layers, but I think you can use it with the same layer. You can pass the field containing conditional expression in whereClause parameter and retrieve the same field used in where clause. I you get NULL the test is false otherwise is true. for example (with field condition containing 'testField = 1'): CASE WHEN dbquery('samelayer','testFiled',condition) = NULL THEN 0 ELSE 1 END Pay attention to quotes! Here is the description: dbquery function Retrieve first targetField value from targetLayer when whereClause is true Syntax dbquery(targetLayer,targetField,whereClause) Arguments targetLayer → the name of a currently loaded layer, for example 'myLayer'. targetLayer → a field of targetLayer whom value is needed, for example 'myField'. In case of multiple results only the first is retrieved. If targetLayer = '$geometry' geometry value is retrieved whereClause → a valid expression string without duoble quotes to identify fields, for example 'field1 1 and field2 = foo' Example dbquery('myLayer','myField','field1 1 and field2 = foo') dbquery('myLayer','$geometry','field1 1 and field2 = foo') 2015-02-26 14:00 GMT+01:00 Alexandre Neto senhor.n...@gmail.com: Hello all, Does any one know how if it's possible to evaluate an all string as an expression in expression builder. What I'm aiming to be able to do is to dynamicly create expression based on other fields. So Imagine I have attribute with a string like this: 'field_1 = 20' Is there a way to evaluate this as an conditional expression? Thanks, Alexandre Neto ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] No module namede zope.interface
Hi all, I'm trying to install the GEarthView plugin but I got the error: The plugin is broken. Python said: No module named zope.interface I tried to install different version of zope.interface lib and also the Twisted lib (as suggested in some posts around the web) but without success. Could you please tell me if there is any work around to this problem? Thanks in advance Regards, Bart _ _ Dr. Ventura Bartolomeo Institute for Applied Remote Sensing Technology for Environmental Monitoring EURAC research Viale Druso 1, I-39100 Bolzano, Italy t +39 0471 055 374 f +39 0471 055 389 bartolomeo.vent...@eurac.edumailto:bartolomeo.vent...@eurac.edu www.eurac.eduhttp://www.eurac.edu/ This transmission is intended only for the use of the addressee and may contain confidential or legally privileged information. If you receive this transmission by error, please notify the author immediately by mail and delete all copies of this transmission and any attachments. Any use or dissemination of this communication is strictly prohibited by the Privacy-Code, D.Lgs. 196/2003 and may lead to penal prosecution and liability for damages. P Think before you print ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How evaluate a string as an expression in expression builder
I developed a plugin called refFunctions v1.0 http://geogear.wordpress.com/2014/11/13/reffunctions-v1-0/ that extends expressions with a new group of functions. In Expression calculator, under the group 'Reference' you will find a function called dbquery(targetLayer,targetField,whereClause) It was developed keeping in mind the reference to other layers, but I think you can use it with the same layer. You can pass the field containing conditional expression in whereClause parameter and retrieve the same field used in where clause. I you get NULL the test is false otherwise is true. for example (with field condition containing 'testField = 1'): CASE WHEN dbquery('samelayer','testFiled',condition) = NULL THEN 0 ELSE 1 END Pay attention to quotes! Here is the description: dbquery function Retrieve first targetField value from targetLayer when whereClause is true Syntax dbquery(targetLayer,targetField,whereClause) Arguments targetLayer → the name of a currently loaded layer, for example 'myLayer'. targetLayer → a field of targetLayer whom value is needed, for example 'myField'. In case of multiple results only the first is retrieved. If targetLayer = '$geometry' geometry value is retrieved whereClause → a valid expression string without duoble quotes to identify fields, for example 'field1 1 and field2 = foo' Example dbquery('myLayer','myField','field1 1 and field2 = foo') dbquery('myLayer','$geometry','field1 1 and field2 = foo') 2015-02-26 14:00 GMT+01:00 Alexandre Neto senhor.n...@gmail.com: Hello all, Does any one know how if it's possible to evaluate an all string as an expression in expression builder. What I'm aiming to be able to do is to dynamicly create expression based on other fields. So Imagine I have attribute with a string like this: 'field_1 = 20' Is there a way to evaluate this as an conditional expression? Thanks, Alexandre Neto ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] print composer and atlas feature on large dataset
Hello matteo, Can you send me a sample you your dataset, so I can do some tests? thanks, Alexandre Neto, PS: I will only be able to work on a proper solution tomorrow, I will leave a partial answer on gis.stackexchange meanwhile. On Thu, Feb 26, 2015 at 10:46 AM, Matteo Ghetta matteo.ghe...@gmail.com wrote: Thanks! :) I hope you'll get an answer.. please tell me if you need a subset of my data.. Cheers Mattep 2015-02-26 11:14 GMT+01:00 Alexandre Neto senhor.n...@gmail.com: Nice challenge! I will try to think of a good answer. Alexandre Neto On Thu, Feb 26, 2015 at 9:55 AM, Matteo Ghetta matteo.ghe...@gmail.com wrote: Hi guys, I raised up this question on stackoverflow some times ago, but no answer yet, maybe someone can help me.. http://gis.stackexchange.com/questions/135834/print-composer-and-atlas-feature-on-large-dataset does somebody ever had a similar problem? Basically the question is if one can use the atlas in order to print several layout depending on different styles (categorization based on different attributes) of a layer.. Thanks! Matteo ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] print composer and atlas feature on large dataset
Hi guys, I raised up this question on stackoverflow some times ago, but no answer yet, maybe someone can help me.. http://gis.stackexchange.com/questions/135834/print-composer-and-atlas-feature-on-large-dataset does somebody ever had a similar problem? Basically the question is if one can use the atlas in order to print several layout depending on different styles (categorization based on different attributes) of a layer.. Thanks! Matteo ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] print composer and atlas feature on large dataset
Nice challenge! I will try to think of a good answer. Alexandre Neto On Thu, Feb 26, 2015 at 9:55 AM, Matteo Ghetta matteo.ghe...@gmail.com wrote: Hi guys, I raised up this question on stackoverflow some times ago, but no answer yet, maybe someone can help me.. http://gis.stackexchange.com/questions/135834/print-composer-and-atlas-feature-on-large-dataset does somebody ever had a similar problem? Basically the question is if one can use the atlas in order to print several layout depending on different styles (categorization based on different attributes) of a layer.. Thanks! Matteo ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] QGIS 2.6.1 on Centos 6.5
Hi all I would need to have QGIS 2.6.1 working in Centos 6.5, and I am trying to build it, but I am struggling at the same point hit by other users with Debian 6 [1]: [clipped] [ 8%] Building CXX object src/core/CMakeFiles/qgis_core.dir/qgsvectorlayerfeatureiterator.cpp.o /home/test/software/qgis/QGIS/src/core/qgsvectorlayerfeatureiterator.cpp: In constructor ‘QgsVectorLayerFeatureIterator::QgsVectorLayerFeatureIterator(QgsVectorLayerFeatureSource*, bool, const QgsFeatureRequest)’: /home/test/software/qgis/QGIS/src/core/qgsvectorlayerfeatureiterator.cpp:87: error: class ‘QgsVectorLayerFeatureIterator’ does not have any field named ‘QgsAbstractFeatureIteratorFromSource’ /home/test/software/qgis/QGIS/src/core/qgsvectorlayerfeatureiterator.cpp:88: error: no matching function for call to ‘QgsAbstractFeatureIteratorFromSourceQgsVectorLayerFeatureSource::QgsAbstractFeatureIteratorFromSource()’ /home/test/software/qgis/QGIS/src/core/qgsfeatureiterator.h:113: note: candidates are: QgsAbstractFeatureIteratorFromSource template-parameter-1-1 ::QgsAbstractFeatureIteratorFromSource(T*, bool, const QgsFeatureRequest) [with T = QgsVectorLayerFeatureSource] /home/test/software/qgis/QGIS/src/core/qgsfeatureiterator.h:111: note: QgsAbstractFeatureIteratorFromSourceQgsVectorLayerFeatureSource::QgsAbstractFeatureIteratorFromSource(const QgsAbstractFeatureIteratorFromSourceQgsVectorLayerFeatureSource) /home/test/software/qgis/QGIS/src/core/qgsvectorlayerfeatureiterator.cpp: At global scope: /home/test/software/qgis/QGIS/src/core/qgsvectorlayerfeatureiterator.cpp:521: warning: unused parameter ‘methodType’ I have upgraded gcc to 4.7.2 version, but still no joy here. Some more information on the non standard Centos 6.5 dependencies 9 (compiled from sources) I am using: QT 4.7.2 SIP 4.13.3 PyQT 4.9.4 QScintilla 2.8.4 GDAL 1.11.2 Anyone can give a good recommendation about what is the cleanest way to build on Centos 6.5? Are you aware of any package created for it even only for test? thanks a lot p [1] http://osgeo-org.1560.x6.nabble.com/Compiling-QGIS-2-4-with-GCC-4-4-debian-squeeze-td5146777.html -- Paolo Corti Geospatial software developer web: http://www.paolocorti.net twitter: @capooti skype: capooti ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] print composer and atlas feature on large dataset
Thanks! :) I hope you'll get an answer.. please tell me if you need a subset of my data.. Cheers Mattep 2015-02-26 11:14 GMT+01:00 Alexandre Neto senhor.n...@gmail.com: Nice challenge! I will try to think of a good answer. Alexandre Neto On Thu, Feb 26, 2015 at 9:55 AM, Matteo Ghetta matteo.ghe...@gmail.com wrote: Hi guys, I raised up this question on stackoverflow some times ago, but no answer yet, maybe someone can help me.. http://gis.stackexchange.com/questions/135834/print-composer-and-atlas-feature-on-large-dataset does somebody ever had a similar problem? Basically the question is if one can use the atlas in order to print several layout depending on different styles (categorization based on different attributes) of a layer.. Thanks! Matteo ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] How can I attach a label to precede an attribute value?
Hi Goyo,Thank you VERY MUCH for the answer to my question. I have used it and it worked. I'm very new to QGIS, so I'm still in the learning process. Part of the problem for me was that I was searching the user manual, but not searching in the right place!! Thank you again joey From: Goyo goyod...@gmail.com To: Joey Wang joey.wan...@yahoo.com Cc: qgis-user@lists.osgeo.org qgis-user@lists.osgeo.org Sent: Wednesday, February 25, 2015 3:11 PM Subject: Re: [Qgis-user] How can I attach a label to precede an attribute value? In the expression editor: 'System A: '||System A||' System B: '||System B http://docs.qgis.org/testing/en/docs/user_manual/working_with_vector/vector_properties.html#labeling-with-expressions Regards Goyo 2015-02-24 21:27 GMT+01:00 Joey Wang joey.wan...@yahoo.com: Hello, I am currently running QGIS 2.6.1-Brighton on a Mac Air, and I am having a difficult time figuring out how to attach a label to an attribute value at a geographic point. For example, for a geographic location I have a value for System A, and a value for System B. How do I actually create the label for each geographic location so that at every location it shows (for example) System A: 15 System B: 7 rather than just the values themselves (for example) 15 7. Thanks very much!! joey wang ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] raster calculator - no file produced
This is already fixed (tested on master) and backported to 2.8. https://github.com/qgis/QGIS/commit/0ccc07af0eacd56986fbf01418aa6d3a701e231e Thanks Jurgen! Pedro 2015-02-23 16:47 GMT+00:00 Pedro Venâncio pedrongvenan...@gmail.com: Same test on Windows produces a raster file with all pixel values zero, like Anita. - Metadata: Driver GDAL provider GTiff GeoTIFF Dataset Description D:\Testes\mdt.tif AREA_OR_POINT=Area Band 1 STATISTICS_MAXIMUM=0 STATISTICS_MEAN=0 STATISTICS_MINIMUM=0 STATISTICS_STDDEV=0 Dimensions X: 2896 Y: 1870 Bands: 1 Origin 50410.2,147300 Pixel Size 24.9975,-24.9975 No Data Value *NoDataValue not set* Data Type Float32 - Thirty two bit floating point Pyramid overviews Layer Spatial Reference System +proj=tmerc +lat_0=39.668258 +lon_0=-8.1331084 +k=1 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs Layer Extent (layer original source projection) 50410.245009987287,100555.123890025751 : 122802.919680063377,147300.393790018999 Band Band 1 Band No 1 No Stats No stats collected yet - gdalinfo: Algorithm Information starting... GDAL command: gdalinfo D:\Testes\mdt.tif GDAL command output: Driver: GTiff/GeoTIFF Files: D:\Testes\mdt.tif Size is 2896, 1870 Coordinate System is: PROJCS[ETRS89 / Portugal TM06, GEOGCS[ETRS89, DATUM[European_Terrestrial_Reference_System_1989, SPHEROID[GRS 1980,6378137,298.2572221010002, AUTHORITY[EPSG,7019]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY[EPSG,6258]], PRIMEM[Greenwich,0], UNIT[degree,0.0174532925199433], AUTHORITY[EPSG,4258]], PROJECTION[Transverse_Mercator], PARAMETER[latitude_of_origin,39.668258], PARAMETER[central_meridian,-8.1331084], PARAMETER[scale_factor,1], PARAMETER[false_easting,0], PARAMETER[false_northing,0], UNIT[metre,1, AUTHORITY[EPSG,9001]], AUTHORITY[EPSG,3763]] Origin = (50410.24500999000,147300.3937900) Pixel Size = (24.997470535220998,-24.997470534759358) Metadata: AREA_OR_POINT=Area Image Structure Metadata: INTERLEAVE=BAND Corner Coordinates: Upper Left ( 50410.245, 147300.394) ( 7d32' 2.45W, 40d59'35.67N) Lower Left ( 50410.245, 100555.124) ( 7d32'16.02W, 40d34'20.37N) Upper Right ( 122802.920, 147300.394) ( 6d40'25.89W, 40d59' 8.02N) Lower Right ( 122802.920, 100555.124) ( 6d40'58.94W, 40d33'53.13N) Center ( 86606.582, 123927.759) ( 7d 6'25.74W, 40d46'47.18N) Band 1 Block=2896x1 Type=Float32, ColorInterp=Gray Pedro ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Trouble projecting on the fly
Still struggling I am attaching the info from the prj file and the extent info from the metadata for each shapefile: I noticed that the PROJCS is labeled as Custom...could that be confusing QGIS? Or is it because one is a projected CRS and one is a geographic CRS? *_or_state_boundary.prj_* PROJCS[Custom, GEOGCS[GCS_North_American_1983, DATUM[D_North_American_1983, SPHEROID[GRS_1980,6378137.0,298.257222101]], PRIMEM[Greenwich,0.0], UNIT[Degree,0.0174532925199433]], PROJECTION[Lambert_Conformal_Conic], PARAMETER[False_Easting,1312335.958], PARAMETER[False_Northing,0.0], PARAMETER[Central_Meridian,-120.5], PARAMETER[Standard_Parallel_1,43.0], PARAMETER[Standard_Parallel_2,45.5], PARAMETER[Central_Parallel,41.75], UNIT[Foot,0.3048]] xMin,yMin 183871.74,88600.9 : xMax,yMax 2345213.24,1675042.97 *_CKUWR.prj_* GEOGCS[GCS_North_American_1983, DATUM[D_North_American_1983, SPHEROID[GRS_1980,6378137.0,298.257222101]], PRIMEM[Greenwich,0.0], UNIT[Degree,0.0174532925199433]] xMin,yMin -123.522,43.356 : xMax,yMax -121.714,45.4562 Help very much appreciated. On 02/24/2015 07:26 AM, Andre Joost wrote: Am 24.02.2015 um 07:55 schrieb Ramon Andiñach: On 24 Feb 2015, at 14:06, Sharon Selvaggio I start by setting my project CRS. And make sure OTF is on. You have no choice of setting a project CRS if OTF is off. But when I do this with files that have originated from two different sources with different native projections (or no projection?) they still do not align. Different sources or different layer CRS shouldn't matter. Shapefiles without .prj file are still existing in the world. There is an option mentioned previously so that you can set how QGIS handles layers that it can't tell what the CRS is. Settings - Options, CRS Tab, CRS foor new layers. If you can point us at the files you're using - or excerpts from them - then we might be able to understand where the problem is better. Or tell us the extent of every layer, as reported by Rightclick - Properties, metadata tab. 1. On a side note. Do not use the Google maps/satellite images to check if your layers are in the right place unless you understand the gotchas in using that service. I don't agree with that. If some layers come up on the wrong part of the Earth, it is a good reference to see which layers are right and which are wrong. Natural Earth shapefiles can be a reference as well. Greetings, André Joost ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user