[Qgis-developer] Function instructions
Hi all. The new functions are not documented. At least for now, could we just copy and paste simple instructions, e.g. from http://www.sql.org/sql-database/postgresql/manual/functions.html ? It would be simple and a big help for new users. All the best. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Add ST_MakeValid functionality to QgsGeometry?
Hi Larry, On Mon, 17. Sep 2012 at 14:15:42 -0600, Larry Shaffer wrote: * Recently there have been several labeling-related issues where the** conclusion is that a label is not shown because the geometry is** invalid (generally polygons). I noticed Sandro Santilli's work for** PostGIS 2.0 with the new ST_MakeValid function [0]. I'm no geometry** whiz, but it appears to be based solely off of GEOS (and some other** PostGIS internals).* The functionality is in PostGIS. It just uses GEOS calls, but the actual fixing is done in PostGIS (in lwgeom_geos_clean.c). But we could adapt the code there for inclusion in QgsGeometry. Jürgen The code for ST_MAkeValid is in the LibWGeom library of postgis . The libwgeom is a portable library. This mean is is usable and compilable without all the postgis environmnet. as an exaple of libwgeom usage: The new release of Spatialite 4.0 will take advantage from this capability of the libwgeom and will support ALL the functions availables in the libwgeom. As the ST_MAkeValid and other really useful functions as the snaptogrid and the AsX3D, and so on. I'm using the spatialite 4.0 and gain most from its superb capability to Collect and union of geometries. Of course this is also thx to the use of the actually trunked geos 3.4.0. And with the MakeValid on spatialite 4.0 I'm resolving my invalid geometis (I'm really happy now) But, please notice, that the ST_MakeValid however need almost the geos 3.3.0 to work. And actually in the osgeo-setup there is available only an older geos 3.2.0. AFAIK The ST_MakeValid don't work with the geos 3.2.0. Regards, -- - Andrea Peri . . . . . . . . . qwerty àèìòù - ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Problem with intersects function on windows only
Hi I have the same issue using Windows 7. I've changed the code the intersection with pointBuff instead of pntGeom: if feat.geometry().intersects(pntBuff). It returns a result but the only problem is that it will select every feature within the: pntGeom.buffer( (self.canvas.mapUnitsPerPixel() * 2),0). This can create problems if the user is zoomed out too far. So there must be a better way of solving the Problem. The feat.geometry().intersects(pntGeom) also works for Polygons. So I don't think it's the intersect function that returns no geometry. Kind regards bertGIS wrote Hello, I use this code for selecting features, for selecting a feature and get its parameters in a form. It works well on Ubuntu, but when moving to Windows 7 with QGIS 1.7.4 or QGIS 1.8, the selection does not work, seems to be the intersect function that returns no geometry. Does anybody knows something about that ? Thanks for your help Cheers, Bert def selectFeature(self, point, button): self.selectList = [] QMessageBox.information( self.iface.mainWindow(),Info, in selectFeature function ) pntGeom = QgsGeometry.fromPoint(point) pntBuff = pntGeom.buffer( (self.canvas.mapUnitsPerPixel() * 2),0) rect = pntBuff.boundingBox() if self.cLayer: feat = QgsFeature() self.provider.select([],rect) while self.provider.nextFeature(feat): QMessageBox.information( self.iface.mainWindow(),Info, loop on features ) if feat.geometry().intersects(pntGeom): QMessageBox.information( self.iface.mainWindow(),Info, feature + str(feat.id()) + inter) self.selectList.append(feat.id()) if self.selectList: self.cLayer.setSelectedFeatures(self.selectList) self.updateForm() else: QMessageBox.information( self.iface.mainWindow(),Info, No layer currently selected in TOC ) -- View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-with-intersects-function-on-windows-only-tp4998864p5003200.html Sent from the Quantum GIS - Developer mailing list archive at Nabble.com. ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] how can i use my own map tiles in qgis?
i understand that i can load tiles from any web server using gdal WMS; and i used http://www.gdal.org/frmt_wms.html to create my xml file; but instead of using google map or openstreet map tiles i wanna use my own tiles to create the raster layer; i have tried to change the server url to localhost since i have all of my tiles locally GDAL_WMS Service name=TMS ServerUrlhttp://localhost/home/myTiles/${z}/${x}/${y}.png /ServerUrl /Service DataWindow UpperLeftX-20037508.34/UpperLeftX UpperLeftY20037508.34/UpperLeftY LowerRightX20037508.34/LowerRightX LowerRightY-20037508.34/LowerRightY TileLevel13/TileLevel TileCountX1/TileCountX TileCountY1/TileCountY YOrigintop/YOrigin /DataWindow ProjectionEPSG:4326/Projection BlockSizeX256/BlockSizeX BlockSizeY256/BlockSizeY BandsCount3/BandsCount Cache / /GDAL_WMS however when i load this xml file to quantum gis all what i get is a black screen; i am not really sure but is that the right way of doing it if i wanna use my own map tiles ? i appreciate any help or direction; thanks in advance; ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] how can i use my own map tiles in qgis?
On 09/20/2012 01:51 PM, leena S wrote: i understand that i can load tiles from any web server using gdal WMS; and i used http://www.gdal.org/frmt_wms.html to create my xml file; but instead of using google map or openstreet map tiles i wanna use my own tiles to create the raster layer; I am not sure if I understand You correctly. If You want to load multiple georeferenced images from Your local directory as one layer, You can use 'gdalbuildvrt' to create virtual raster and load it to QGIS. -- Ivan Mincik ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Access to buffered? point coordinates
Hello, I'm working on a customized user interface (based on PyQt) for attribute data input while digitizing single points. I know about the interface provided by QGIS for capturing these data (i. e. using widgets with the same name as the associated attribute), but I would prefer to do the processing/storing by myself. In this context I need to retrieve programmatically the geometry/coordinates of a newly digitized point before the form window ist closed. Can anybody give me a hint how to do this? I have already tried to use the last cursor position in some way but didn't succeed. Thank you in advance for your help! Stephan Breisig ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Python3 support
Hello everybody, I've just started work on some alugins and several applications, which will at some point interact with qgis. As Python3 is more and more getting the standard I wonder whether anybody knows if and when qgis changes to Python3. Is there a difference between writing plugins and applications in this respect? Thanks Helmut ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] [gdal-dev] Geoserver WCS demo problems on opengeo.org
On Thu, Sep 20, 2012 at 4:54 PM, Jeff McKenna jmcke...@gatewaygeomatics.com wrote: Hi Radim, I am curious, did you run your tests against the WCS service at demo.mapserver.org ? How were those results comparably? If you did run them, maybe you can report your findings on the MapServer-dev list. modis-001 / 1.0.0 [M1]: The server advertises temporalDomain.timePosition 2002-001 but GetCoverages fails with 'msWCSGetCoverage(): WCS server error. Underlying layer is not tiled, unable to do temporal subsetting.' if TIME=2002-001 is used. The same with GDAL and gvSIG. This is well known problem which I have already reported in mapserver list. Other layers work with WCS 1.0.0, also with GDAL and gvSIG-1_11-1305-final (it is using 1.0.0 by default). OTOH, modis-001 is the only one working correctly with WCS 1.1.1. Other layers have all pixels 0. The same with GDAL. Radim [M1] http://demo.mapserver.org:8080/cgi-bin/wcs?SERVICE=WCSVERSION=1.0.0REQUEST=GetCoverageFORMAT=GeoTIFFCOVERAGE=modis-001TIME=2002-001BBOX=778457.,5048895.,781457.,5050395.CRS=EPSG:26915RESPONSE_CRS=EPSG:26915WIDTH=6HEIGHT=3 -jeff On 12-09-20 11:47 AM, Radim Blazek wrote: I am testing QGIS WCS client with [1] and I found some problems which are server side, I believe. 1) Coverage og:0 / version 1.0.0 [2] and bm / version 1.1.0 [5]: The server fails in DescribeCoverage with: java.io.IOException null Translator error Unexpected error occurred during describe coverage xml encoding ... 2) Coverage usgs:nlcd / version 1.0.0 [3] and nlcd / version 1.1.0 [4]: The server does not offer any CRS in DescribeCoverage supportedCRSs / supportedCRS. If the CRS defined in spatialDomain.Envelope is used server fails reporting error: Could not recognize crs ... 3) Coverage 0 / version 1.1.0 [6] and naturalearth / version 1.1.0: The server fails in GetCoverage with 'java.lang.IllegalArgumentException: xScale:the parameter value is not valid. xScale:the parameter value is not valid.' It fails with BOUNDINGBOX=-2,-6,2,6GRIDORIGIN=2,-6GRIDOFFSETS=-2,3 and it works with BOUNDINGBOX=-2,-6,2,6GRIDORIGIN=2,-6GRIDOFFSETS=2,-3 (GRIDOFFSETS signs switched) but other coverages (Arc_Sample e.g.) work OK with the first. 4) Coverage Img_Sample / version 1.1.0 [7]: The server fails in GetCoverage with 'java.lang.IllegalArgumentException: The specified dimensional parameter is non-positive. The specified dimensional parameter is non-positive'. The problems 1) and 2) occur also with GDAL 1.9.1 while other layers are working with GDAL and WCS version 1.0.0. I could not verify WCS 1.1.0 with GDAL because all layers fail. I could not verify with gvSIG-1_11-1305-final because it does not work at all with this server. CC to various lists to which it may be of interest. Let us make WCS really working with OS GIS tools! Radim [1] http://demo.opengeo.org/geoserver/wcs [2] http://demo.opengeo.org/geoserver/wcs?SERVICE=WCSREQUEST=DescribeCoverageVERSION=1.0.0COVERAGE=og:0 [3] http://demo.opengeo.org/geoserver/wcs?SERVICE=WCSREQUEST=DescribeCoverageVERSION=1.0.0COVERAGE=usgs:nlcd [4] http://demo.opengeo.org/geoserver/wcs?SERVICE=WCSREQUEST=DescribeCoverageVERSION=1.1.1IDENTIFIERS=nlcd [5] http://demo.opengeo.org/geoserver/wcs?SERVICE=WCSREQUEST=DescribeCoverageVERSION=1.1.1IDENTIFIERS=bm [6] http://demo.opengeo.org/geoserver/wcs?SERVICE=WCSVERSION=1.1.1REQUEST=GetCoverageFORMAT=image/tiff;subtype=%22geotiff%22IDENTIFIER=0BOUNDINGBOX=-2,-6,2,6,urn:ogc:def:crs:EPSG::4326GRIDBASECRS=urn:ogc:def:crs:EPSG::4326GRIDCS=urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS GRIDTYPE=urn:ogc:def:method:WCS:1.1:2dSimpleGridGRIDORIGIN=2,-6GRIDOFFSETS=-2,3 [7] http://demo.opengeo.org/geoserver/wcs?SERVICE=WCSVERSION=1.1.1REQUEST=GetCoverageFORMAT=image/tiff;subtype=%22geotiff%22IDENTIFIER=Img_Sample BOUNDINGBOX=-96,36,-94,37,urn:ogc:def:crs:EPSG::4326GRIDBASECRS=urn:ogc:def:crs:EPSG::4326GRIDCS=urn:ogc:def:cs:OGC:0.0:Grid2dSquareCSGRIDTYPE=urn:ogc:def:method:WCS:1.1:2dSimpleGridGRIDORIGIN=-94,36GRIDOFFSETS=-1,1 ___ gdal-dev mailing list gdal-...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev -- Jeff McKenna MapServer Consulting and Training Services http://www.gatewaygeomatics.com/ ___ gdal-dev mailing list gdal-...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Python3 support
Hi On Thu, Sep 20, 2012 at 8:19 PM, Helmut Seidel M.A. i...@knowhow-la.de wrote: Hello everybody, I've just started work on some alugins and several applications, which will at some point interact with qgis. As Python3 is more and more getting the standard I wonder whether anybody knows if and when qgis changes to Python3. Is there a difference between writing plugins and applications in this respect? Short answer is that it is not something we have really discussed until now. There are broader implications than just QGIS - under the osgeo4w environment it is nicer IMHO that everything runs against a common python environment which means tools like gdal etc. should all move forward together. Regards Tim Thanks Helmut ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) == Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Visit http://linfiniti.com to find out about: * QGIS programming and support services * Mapserver and PostGIS based hosting plans * FOSS Consulting Services Skype: timlinux Irc: timlinux on #qgis at freenode.net == ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] Access to buffered? point coordinates
If you can run the latest dev version I have changed it so that the method is passes the full feature rather then just the id. So the method is: def mymethod(dialog, layer, feature). In 1.8 there is no way to do want you need. Sent from some fancy phone looking thingo From: Stephan Breisig Sent: 21/09/2012 12:25 AM To: qgis-developer@lists.osgeo.org Subject: [Qgis-developer] Access to buffered? point coordinates Hello, I'm working on a customized user interface (based on PyQt) for attribute data input while digitizing single points. I know about the interface provided by QGIS for capturing these data (i. e. using widgets with the same name as the associated attribute), but I would prefer to do the processing/storing by myself. In this context I need to retrieve programmatically the geometry/coordinates of a newly digitized point before the form window ist closed. Can anybody give me a hint how to do this? I have already tried to use the last cursor position in some way but didn't succeed. Thank you in advance for your help! Stephan Breisig ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] invalid conversion from 'void*' to 'OGRSpatialReferenceHS*'
hi every body, updating to th letest android qt version is being tougher than planned ... I got all the dependencies ok now but building qgis gives me this errors below. any Ideas? this is using android ndk 8b with gcc 4.4.3 thanks a lot /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp: In destructor 'QgsCoordinateReferenceSystem::~QgsCoordinateReferenceSystem()': /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:78: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:78: error: initializing argument 1 of 'void OSRDestroySpatialReference(OGRSpatialReferenceHS*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp: In member function 'QgsCoordinateReferenceSystem QgsCoordinateReferenceSystem::operator=(const QgsCoordinateReferenceSystem)': /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:255: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:255: error: initializing argument 1 of 'void OSRDestroySpatialReference(OGRSpatialReferenceHS*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:256: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:256: error: initializing argument 1 of 'OGRSpatialReferenceHS* OSRClone(OGRSpatialReferenceHS*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp: In member function 'bool QgsCoordinateReferenceSystem::loadFromDb(QString, QString, QString)': /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:360: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:360: error: initializing argument 1 of 'void OSRDestroySpatialReference(OGRSpatialReferenceHS*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:362: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:362: error: initializing argument 1 of 'OGRErr OSRSetFromUserInput(OGRSpatialReferenceHS*, const char*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp: In member function 'bool QgsCoordinateReferenceSystem::axisInverted() const': /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:385: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:385: error: initializing argument 1 of 'const char* OSRGetAxis(OGRSpatialReferenceHS*, const char*, int, OGRAxisOrientation*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp: In member function 'bool QgsCoordinateReferenceSystem::createFromWkt(QString)': /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:410: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:410: error: initializing argument 1 of 'OGRErr OSRImportFromWkt(OGRSpatialReferenceHS*, char**)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:422: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:422: error: initializing argument 1 of 'OGRErr OSRAutoIdentifyEPSG(OGRSpatialReferenceHS*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:425: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:425: error: initializing argument 1 of 'const char* OSRGetAuthorityName(OGRSpatialReferenceHS*, const char*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:426: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:426: error: initializing argument 1 of 'const char* OSRGetAuthorityCode(OGRSpatialReferenceHS*, const char*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:437: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:437: error: initializing argument 1 of 'OGRErr OSRExportToProj4(OGRSpatialReferenceHS*, char**)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:447: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:447: error: initializing argument 1 of 'OGRErr OSRFixup(OGRSpatialReferenceHS*)' /home/marco/dev/Quantum-GIS/src/core/qgscoordinatereferencesystem.cpp:449: error: invalid conversion from 'void*' to 'OGRSpatialReferenceHS*'
[Qgis-developer] Size of bar?
Hi all. What is the use of the ViewDecorationsScale barSize of bar? I tried changing it, but I do not see an effect. All the best. -- Paolo Cavallini - Faunalia www.faunalia.eu Full contact details at www.faunalia.eu/pc Nuovi corsi QGIS e PostGIS: http://www.faunalia.it/calendario ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer