qgis

CMake compilation error..(Unknown CMake command “QT4_WRAP_UI”)

痞子三分冷 提交于 2019-12-12 13:10:45
问题 im trying to build grass plugin for qgis .. when i try to use cmake .. i get the following error after configuring.. CMake Error at CMakeLists.txt:78 (QT4_WRAP_UI): Unknown CMake command "QT4_WRAP_UI". I have Qt4 ,PyQt and python2.6 installed already.. can anyone help me how to figure out whats wrong here? Thanks. 回答1: You need to import the Qt4 macros from CMake. A line like this should do it: find_package(Qt4) 回答2: In addition to just locating the package you should include ${QT_USE_FILE},

Building QGIS source code on Windows 7 - Not working

筅森魡賤 提交于 2019-12-12 06:19:34
问题 As mentioned here I've tried to build the QGIS on Windows 7. There are two methods one using Visual Studio Express Edition installer and the second one using MinGW. I've found both of them broken and don't know what to do next In building using Visual Studio The link to visual studio actually installs the version 2010 but documentation assumes it version 2009. So " set VS90COMNTOOLS=%PROGRAMFILES%\Microsoft Visual Studio 9.0\Common7\Tools\ " path is not found. Also I'm confused about the

Applying color gradient on an image in Android

被刻印的时光 ゝ 提交于 2019-12-12 03:57:19
问题 I am trying to replicate the functionalities of QGIS software in an Android application. I want to apply a color gradient (Red to Green lut) on an image for further efficient analysis. The image shown below is generated after applying the NDVI (Normalised Difference Vegetation Index) indicator on it. The value of NDVI ranges from -1 to +1. The image shown below is generated after applying the color gradient on it. This image now can be analysed efficiently because it shows the plants as green

QGIS generated shapefile malformed when converted to topojson by mapshaper

梦想与她 提交于 2019-12-12 01:55:19
问题 So I started with a really small example that is working well. I used QGIS to draw a line and then converted it to topojson with mapshaper . Then I use D3.js to load and visualize it. This is the bigger but not working example: jsfiddle.net/kwoxer/kpL1uyy2/2/ As you can see it not showing just one line, it is showing crazy lines as if the convert gone wrong. Already tested different browsers. But as I said I already did a small line before with QGIS, converted it, and everything was fine. So

Python - Import error: DLL Load failed: %1 is not a valid win32 application

社会主义新天地 提交于 2019-12-12 00:10:58
问题 I'm using QGIS + Python with the PyQt4 library. Currently I'm running Python 2.7 32bit in Windows 7 64 bit (I know these by executing sys.architecture()) I download the PyQt4 library from https://www.riverbankcomputing.com/software/pyqt/download for 32bits architecture. Then I add to the PATH variable: C:\Python27\Lib\site-packages\PyQt4;D:/Program Files/QGIS Essen/apps/qgis/bin;D:/Program Files/QGIS Essen/apps/qgis/python; And set PYTHONPATH = D:/Program Files/QGIS Essen/apps/qgis/python;

no module named psycopg2 and requests

雨燕双飞 提交于 2019-12-11 17:47:44
问题 I am running QGIS in Mac(Sierra) but I cant load the processing plugin because of this error: >>> Couldn't load plugin 'processing' ImportError: No module named psycopg2 Traceback (most recent call last): File . "/usr/local/Cellar/qgis2/2.18.21/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 308, in loadPlugin __import__(packageName) File "/usr/local/Cellar/qgis2/2.18.21/QGIS.app/Contents/MacOS/../Resources/python/qgis/utils.py", line 607, in _import mod = _builtin_import

Python 2.7 and QGIS 2.6: Subtracting two values and append ID of feature to list

拈花ヽ惹草 提交于 2019-12-11 17:01:53
问题 I would like to subtract two values retrieved from qgs feature iterator objects and append the value of the feature id to a list depending on a condition. In the context of qgis, I have two layers: roadsLayer pathsLayer What I have so far returns an empty list: evenList = [] azimuthRoadsIDX = roadsLayer.fieldNameIndex('azimuth') azimuthPathsIDX = pathsLayer.fieldNameIndex('azimuth') roads = roadsLayer.getFeatures() paths = pathsLayer.getFeatures() for feat in roads: for feature in paths:

How do I extract part of a tuple that's duplicate as key to a dictionary, and have the second part of the tuple as value?

拟墨画扇 提交于 2019-12-11 04:25:45
问题 I'm pretty new to Python and Qgis, right now I'm just running scripts but I my end-goal is to create a plugin. Here's the part of the code I'm having problems with: import math layer = qgis.utils.iface.activeLayer() iter = layer.getFeatures() dict = {} #iterate over features for feature in iter: #print feature.id() geom = feature.geometry() coord = geom.asPolyline() points=geom.asPolyline() #get Endpoints first = points[0] last = points[-1] #Assemble Features dict[feature.id() ]= [first, last

Google ImportXML from QGIS metadata file

让人想犯罪 __ 提交于 2019-12-11 03:22:46
问题 I am trying to capture elements of an qmd file (that is xml markup) using Google Sheets importxml. Based on How to use importXML function with a file from Google Drive? I think I've got the file importing correctly but can't seem to capture any of the tags. Here's what I am trying - =importXML("https://drive.google.com/uc?id=1AI2C8hQnSOuuoyJXizYBszGmpMXW8xxT&export=download","\\identifier") Here's what the qmd/xml file looks like <!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>

How to change the resolution of .tif raster file without losing data

青春壹個敷衍的年華 提交于 2019-12-11 01:26:24
问题 For example, A .tiff file of 400*200 size, I can read it as a 2-D array(400 x 200) in python. I want to change the tiff size to 200 x 100 or other ratio. How to realize that in Python or GIS software(QGIS, ArcGIS et.al). I know the resemble tool in ArcGIS can change the size of raster data. but the length-width ratio is fixed. Example Diagram: (source: tietuku.com) 回答1: With R you can do things like library(raster) r <- raster('file.tif') a <- aggregate(r, c(2,3)) 来源: https://stackoverflow