[Qgis-user] Calculate Areas of shape polygon layer
Is it possible to recalculate the areas and perimeters of polygons in a shp layer with qgis? Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra Jaume Almera (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain Tel. 34 934095410 Fax. 34 934110012 email: [EMAIL PROTECTED] http://www.ija.csic.es/gt/obster ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Calculate Areas of shape polygon layer
Hi Agustin, Yes it is perfectly possible In the version 0.11.0 using the plugin tool - fTools Table tools Add geometry Columns Credits for Carson of course Success Stefaan Agustin Lobo [EMAIL PROTECTED] wrote: Is it possible to recalculate the areas and perimeters of polygons in a shp layer with qgis? Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra Jaume Almera (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain Tel. 34 934095410 Fax. 34 934110012 email: [EMAIL PROTECTED] http://www.ija.csic.es/gt/obster ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user _ Stefaan Dondeyne (PhD) Ecologist/Environmental Advisor CP 121 Chimoio - Mozambique Cell 82 733 24 14 _ http://www.actf.gov.mz/reserva_chimanimani.html http://www.mozambiqueflora.com/index.php http://micaia.org/centre/micaia_family.html ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] shp (produced with QGIS) into R: missing first field?
When I inspect the table of a shp in QGIS I can see a field id with unique values for each row (polygon), but once I import it into R, that first field is not there: metrop1spdf - readOGR(/media/IOMEGA HDD/Mario/BCNmetrop/GEODATA_BCN/Shape_final2c, layer=SHAPE_FINAL2C) OGR data source with driver: ESRI Shapefile Source: /media/IOMEGA HDD/Mario/BCNmetrop/GEODATA_BCN/Shape_final2c, layer: SHAPE_FINAL2C with 3272 rows and 49 columns save.image() str(metrop1spdf,2) Formal class 'SpatialPolygonsDataFrame' [package sp] with 5 slots ..@ data :'data.frame': 3272 obs. of 49 variables: ..@ polygons :List of 3272 ..@ plotOrder : int [1:3272] 703 1501 140 1467 1416 1336 82 2127 2796 1387 ... ..@ bbox : num [1:2, 1:2] 421333 4576848 438994 4593850 .. ..- attr(*, dimnames)=List of 2 ..@ proj4string:Formal class 'CRS' [package sp] with 1 slots str([EMAIL PROTECTED]) 'data.frame': 3272 obs. of 49 variables: $ FID_inters: int 0 0 1 1 2 3 4 5 6 7 ... $ FID_UC: int 0 0 0 0 0 0 0 0 0 0 ... $ ID_GRAFIC : int 1 1 1 1 1 1 1 1 1 1 ... $ N_VERTEXS : int 5770 5770 5770 5770 5770 5770 5770 5770 5770 5770 ... $ PERIMETRE : num 191741 191741 191741 191741 191741 ... $ PERIMETREE: num 191807 191807 191807 191807 191807 ... $ AREA : num 276 5364 790 3935 ... etc As I want to operate with that table in R (which implies merging with other DF) and produce a new SPDF and export to shp, I worry for not having that field. Or is it somehow implied in R? I'm surprised by the fact that the first value in the id field in QGIS is 0 and not 1. I think that such an id in R would start by 1, am I wrong? Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra Jaume Almera (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain Tel. 34 934095410 Fax. 34 934110012 email: [EMAIL PROTECTED] http://www.ija.csic.es/gt/obster ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] shp (produced with QGIS) into R: missing first field?
Hi Agustin The field id is a unique identifier for qgis, but not an attribute in the dbf table. Regards, Marco On Thursday 20 November 2008 14:48:16 Agustin Lobo wrote: When I inspect the table of a shp in QGIS I can see a field id with unique values for each row (polygon), but once I import it into R, that first field is not there: metrop1spdf - readOGR(/media/IOMEGA HDD/Mario/BCNmetrop/GEODATA_BCN/Shape_final2c, layer=SHAPE_FINAL2C) OGR data source with driver: ESRI Shapefile Source: /media/IOMEGA HDD/Mario/BCNmetrop/GEODATA_BCN/Shape_final2c, layer: SHAPE_FINAL2C with 3272 rows and 49 columns save.image() str(metrop1spdf,2) Formal class 'SpatialPolygonsDataFrame' [package sp] with 5 slots ..@ data :'data.frame': 3272 obs. of 49 variables: ..@ polygons :List of 3272 ..@ plotOrder : int [1:3272] 703 1501 140 1467 1416 1336 82 2127 2796 1387 ... ..@ bbox : num [1:2, 1:2] 421333 4576848 438994 4593850 .. ..- attr(*, dimnames)=List of 2 ..@ proj4string:Formal class 'CRS' [package sp] with 1 slots str([EMAIL PROTECTED]) 'data.frame': 3272 obs. of 49 variables: $ FID_inters: int 0 0 1 1 2 3 4 5 6 7 ... $ FID_UC: int 0 0 0 0 0 0 0 0 0 0 ... $ ID_GRAFIC : int 1 1 1 1 1 1 1 1 1 1 ... $ N_VERTEXS : int 5770 5770 5770 5770 5770 5770 5770 5770 5770 5770 ... $ PERIMETRE : num 191741 191741 191741 191741 191741 ... $ PERIMETREE: num 191807 191807 191807 191807 191807 ... $ AREA : num 276 5364 790 3935 ... etc As I want to operate with that table in R (which implies merging with other DF) and produce a new SPDF and export to shp, I worry for not having that field. Or is it somehow implied in R? I'm surprised by the fact that the first value in the id field in QGIS is 0 and not 1. I think that such an id in R would start by 1, am I wrong? Agus -- Dr. Marco Hugentobler Institute of Cartography ETH Zurich Technical Advisor QGIS Project Steering Committee ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Testing qgis_rasterlayertest ***Failed
Greets: I ran into a problem with qgis on ubuntu not finding coordinates on rasters. So I rebuild from svn sources and this time build the test suite. On running the tests the rasterlayertest fails. However all dependencies are met. So I was wondering how do I trace down this error. Best and many thanks. -- /ch ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Testing qgis_rasterlayertest ***Failed
Howdy Chris, Can you explain a little more about how QGIS is not finding coordinates on rasters ? What/which tool are you using to collect coordinates? What format of raster are you using and what projection is it in? **Note that on the fly projection is not supported for rasters. -pete Chris h wrote: Greets: I ran into a problem with qgis on ubuntu not finding coordinates on rasters. So I rebuild from svn sources and this time build the test suite. On running the tests the rasterlayertest fails. However all dependencies are met. So I was wondering how do I trace down this error. Best and many thanks. -- Peter J. Ersts, Project Specialist American Museum of Natural History Center for Biodiversity and Conservation Central Park West at 79th Street New York, New York 10024 Tel: Home Office (518)-632-4745 or NYC Office (212)-496-3488 Web: http://biodiversityinformatics.amnh.org Web: http://cbc.amnh.org Quantum GIS Raster Development Team. Visit http://www.qgis.org to learn more about QGIS, a free and open source desktop GIS Open Source, ...evolving through community cooperation to change the world bit by bit ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] select elements from a wms layer
José María Michia wrote: Hi all I want to export a sub region of a WMS layer, but the selection tool is not enabled when a layer WMS is active. Is it not possible to select elements of a WMS layer? Hi José, what do you exactly mean by 'export a sub region'? A WMS-layer is a flat image. That is whenever you zoomin or pan, a new png/gif/jpeg image is requested from a WMS-server (http://en.wikipedia.org/wiki/Web_Map_Service) and shown in your map. But this means that the underlying data is NOT available for QGIS, while it off course is when you are showing shapefile or postgis data. So there is (besides exporting it to an image) not so much to export I think. It is however possible (if the WMS-layer is 'queryable'), to fire getFeatureInfo-requests to the WMS-server. Using the I-tool, you can click on the WMS-layer, an x,y is sent to the WMS-server and the server will then sent back the attributes of one or more features that are laying on that x,y. This is possible because the WMS-server DOES have the data with which it 'paints' the map images. Another option is to use a WFS-layer (mind the F). A webFEATUREserver (http://en.wikipedia.org/wiki/Web_Feature_Service) There is a plugin available for those. Sometimes a WMS is also configures as a WFS. A WFS will return 'features' (that is the geometric objects including attributes) as gml. Qgis is then able to generate a map based on this data, and the different objects are selectable. If you want to try out a WFS: use this url: http://www.rijkswaterstaat.nl/services/geoservices/overzichtskaartnl?service=WFStypename=NL-provversion=1.0.0 you will be able to receive provinces, highways etc from the Netherlands. Regards, Richard Duivenvoorde ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Problem defining a projection
Dear List, I have a problem defining my own projection in QGIS. It is for Brandenburg, a province in Germany. The EPSG-Code to use is 325833 and the parameters are basically like EPSG 25833 except that the false easting is 350 instead of 50. I have edited the file EPSG in /usr/share/proj/ but to no effect. After trying the 'Define your own projection' in QGIS it says that the proj4 projection definition is invalid. I have entered: +proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=350 +y_0=0 +ellps=GRS80 +units=m +no_defs Can anybody point me to where I am going wrong?! Thanks in advance and best regards, Hinrich -- * * SensorGIS 'Geodaten in Echtzeit' * * http://www.sensorgis.de * * http://www.terrestris.de * * = terrestris GmbH Co. KG Firmensitz: Irmintrudisstr. 17, 53111 Bonn Registergericht: Amtsgericht Bonn, HRA 6835 Geschäftsführer: Dipl.-Geogr. Hinrich Paulsen Dipl.-Geogr. Till Adams Tel. 0228 - 962 899 51 Fax. 0228 - 962 899 57 Internet: www.terrestris.de = ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Testing qgis_rasterlayertest ***Failed
Hi The test suite has not been updated to recent changes in SVN - its on our todo list before we can release. Regards Tim On Thu, 2008-11-20 at 10:13 -0500, Chris h wrote: Greets: I ran into a problem with qgis on ubuntu not finding coordinates on rasters. So I rebuild from svn sources and this time build the test suite. On running the tests the rasterlayertest fails. However all dependencies are met. So I was wondering how do I trace down this error. Best and many thanks. -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) == Visit http://linfiniti.com to find out about: * QGIS programming services * Mapserver and PostGIS based hosting plans * FOSS Consulting Support Services Skype: timlinux Irc: timlinux on #qgis at freenode.net == signature.asc Description: This is a digitally signed message part ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] select elements from a wms layer
Hi José On Thu, 2008-11-20 at 12:37 -0300, José María Michia wrote: Hi all I want to export a sub region of a WMS layer, but the selection tool is not enabled when a layer WMS is active. Is it not possible to select elements of a WMS layer? QGIS does not yet support selection of rasters (and there are no immediate plans for this). That said it would be quite interesting to be able to do a rectangular selection on a raster and then right click the image and say save selection as which would then save that area as a georeferenced imageone for you to add as an enhancement request to trac I guess :-) Regards Tim Thanks for any advice. José María ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) == Visit http://linfiniti.com to find out about: * QGIS programming services * Mapserver and PostGIS based hosting plans * FOSS Consulting Support Services Skype: timlinux Irc: timlinux on #qgis at freenode.net == signature.asc Description: This is a digitally signed message part ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Testing qgis_rasterlayertest ***Failed
On Thursday 20 November 2008 10:13:49 Chris h wrote: I should have added this is the stable source, rev 9674 ver 0.11.0 -- /ch ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Testing qgis_rasterlayertest ***Failed
On Thursday 20 November 2008 10:24:59 Peter Ersts wrote: Howdy Chris, Can you explain a little more about how QGIS is not finding coordinates on rasters ? What/which tool are you using to collect coordinates? What format of raster are you using and what projection is it in? **Note that on the fly projection is not supported for rasters. Never had this issue before. So this one is new for me. Installed 0.11.0 from the download page on a fresh install of ubuntu 8.04 Loading NOAA rasters which have worked seemlessly in the past, all I can do is load the raster and move it on the screen, I cannot zone or use any of the other features associated with that tool set.(the one with the blue hand) Looking at the terminal output I get Warning: No valid projection. Unable to set map units but I also get this at boottime when I boot from a terminal. As Ive seen this before and ignored it as the application worked fine. However on this latest install when loading an NOAA raster I get the following in the terminal Warning: Creating Warped VRT. Warning: No valid projection. Unable to set map units. Warning: No valid projection. Unable to set map units. OK..so I build it from source (stable) and build the test suite as well. I understand the test suite is not current but shows the above error message identified in the subject. In not really sure whats going on here as I've not run across this error before and used qgis for at least several months now on NOAA charts. WIll check the build to make sure I didnt miss something but thats unlikely with the detailed Install Notes and ccmake. -- /ch ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Python binding for QgsMessageViewer
Hi again, On Thu, Nov 20, 2008 at 4:59 PM, Möri Cedric [EMAIL PROTECTED] wrote: Hi! In my current phyton plugin, I'd like to use QgsMessageViewer. It works well except for the setCheckBoxQSettingLabel which gives a attriubte error. Am I right, that this method is good to set a Qsetting to true or false? I'd like to have a don't show this message again kind of dialog and so it would be great if this could be added in the bindings, as I'm guessing that the error is triggerd by a missing binding. You're right, the binding was missing in QgsMessageViewer. I've added it in r9675. PS: thanks a lot to Martin for the qgsMapCanvasSnapper and the correction of the deactivate of the MapTools. All this stuff works very well now! You're welcome... if you find any more problems, let us know! Sometimes developers add new functions/classes to libraries and forget to add appropriate bindings. Martin ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Problem defining a projection
On Fri, 2008-11-21 at 01:56 +0100, Nikos Alexandris wrote: On Thu, 2008-11-20 at 16:48 +0100, Hinrich Paulsen wrote: Dear List, I have a problem defining my own projection in QGIS. It is for Brandenburg, a province in Germany. The EPSG-Code to use is 325833 and the parameters are basically like EPSG 25833 except that the false easting is 350 instead of 50. I have edited the file EPSG in /usr/share/proj/ but to no effect. After trying the 'Define your own projection' in QGIS it says that the proj4 projection definition is invalid. I have entered: +proj=tmerc +lat_0=0 +lon_0=15 +k=0.9996 +x_0=350 +y_0=0 +ellps=GRS80 +units=m +no_defs Can anybody point me to where I am going wrong?! Thanks in advance and best regards, Hinrich Hi Hinrich! It works for me using QGIS 0.11.0 Regards, Nikos Probably you know all this, but anyway, here is what I do: 1. Settings Custom Projection... (Definition) Sorry for the broken message! 2. I hit the *(asterisk) 3. Enter a Name and the Parameters 4. Hit the Floppy Disk button (WoW, I don't remember when I really saw a floppy disk last time :-) 5. OK 6. Use under Settings Project Properties 7. Set Meters under General tab and the custom projection under the Projection tab. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Raster selection
Hi, José María, Have you tried MultiSpec? It allows for establishing a rectangle selection, either manually or by coordinates (rows, cols; degrees or meters) and then saving selection. I vave found it usefull for importing raster selections in QGis Sergio Zárate ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] scale bar
Hello, I've tried again with other projects : always crashes. (Win xp ubuntu 8.10 i386) JC Andreas Neumann a écrit : hm - seems to work for me: * SVN latest trunk (Ubuntu 8.10, 64bit) * Win2K, Preview2 Andreas Hello, When we add the scale bar on the printing window Qgis win ubuntu preview 2 crashes JC ___ 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 selection
Thanks Sergio, but it's not what I'm looking to do. I'm difficult with english, and i can not explain precisely. The layer in question is vector layer, not raster. More exactly, is an LABEL/ANNOTATION layer. And to be more exact, I wish this layer processed by MapServer for generalize at certain scale. My previous post is about some alternatives that I've explored explored in QGIS. The raster extraction mentioned, is not useful for me in this case. 2008/11/21 Sergio Zárate Pedroche [EMAIL PROTECTED]: Hi, José María, Have you tried MultiSpec? It allows for establishing a rectangle selection, either manually or by coordinates (rows, cols; degrees or meters) and then saving selection. I vave found it usefull for importing raster selections in QGis Yes, I tried MultiSpec. However, I am a Linux user, and I prefer to use gdal_translate and GRASS for handling raster files. Thank you very much Sergio José María ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] QGIS segmentation fault
Hi Ubuntu server 7.10. QGIS worked until I did an apt-get update some time back. It was using standard repositories plus the launchpad/timlinux one. Yesterday I added launchpad/qgis to my apt sources and tried a new install but I still get this, I'm not even sure what version it's attempting to run. The splash screen was coming up in earlier versions of this crash but now that's not even happening: qgis Warning: No valid projection. Unable to set map units. Warning: No valid projection. Unable to set map units. Warning: No valid projection. Unable to set map units. Segmentation fault Any tips? Gavin This message is intended for the addressee only. Information and attachments in this e-mail may contain confidential, proprietary, or legally privileged information. If you are not the intended recipient, or responsible for delivery of the message to the intended recipient, any disclosure, copying, distribution, or any action taken is prohibited and may be unlawful, and could result in a claim against you. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] select elements from a wms layer
2008/11/20 Richard Duivenvoorde [EMAIL PROTECTED]: José María Michia wrote: Hi all I want to export a sub region of a WMS layer, but the selection tool is not enabled when a layer WMS is active. Is it not possible to select elements of a WMS layer? Hi José, what do you exactly mean by 'export a sub region'? I mean export as GIS format, including geometry and attributes (at least, an ID or LABEL FIELD). A WMS-layer is a flat image. That is whenever you zoomin or pan, a new png/gif/jpeg image is requested from a WMS-server (http://en.wikipedia.org/wiki/Web_Map_Service) and shown in your map. But this means that the underlying data is NOT available for QGIS, while it off course is when you are showing shapefile or postgis data. So there is (besides exporting it to an image) not so much to export I think. Yes. I like the labeling offered by MapServer, and I've used MapServer for my work. But now, i'm exploring GMT for printed maps. GMT is great for map production, but no have implented a labeling algorithm. For the first attempts, I used the labels of MapServer exported in PDF format. By using Inkscape, I have combined these PDF files with PS files generated by GMT. Maybe this is the best way of making this. It is however possible (if the WMS-layer is 'queryable'), to fire getFeatureInfo-requests to the WMS-server. Using the I-tool, you can click on the WMS-layer, an x,y is sent to the WMS-server and the server will then sent back the attributes of one or more features that are laying on that x,y. This is possible because the WMS-server DOES have the data with which it 'paints' the map images. Another option is to use a WFS-layer (mind the F). A webFEATUREserver (http://en.wikipedia.org/wiki/Web_Feature_Service) There is a plugin available for those. Sometimes a WMS is also configures as a WFS. A WFS will return 'features' (that is the geometric objects including attributes) as gml. Qgis is then able to generate a map based on this data, and the different objects are selectable. Querying features, use all elements of the layer, even deleted items for the cartographic generalization made by MapServer. Therefore, it is not what I'm looking for. With WFS I've come close to what I need. The problem is that WFS does not work with layers of labels. I've changed the geometry type, to polygon, without style, and with label, and i can display this layer in QGIS. I've inserted this WFS layer in QGIS. And, at certain scale, QGIS show only the labels that i want to write out. So, QGIS display the data that i wish to write to some GIS file. But, QGIS not let me select elementos from WFS/WMS layers. Selection tools is deactivated. And i cannot found any way of convert to gis format. Only found a way to convert it to image. Using QGIS, with both WMS and WFS layers, the selection tool is deactivated. I can not select elements of these layers. With other layer formats, the tool is activated, and I can select elements. Is correct this behavior? If you want to try out a WFS: use this url: http://www.rijkswaterstaat.nl/services/geoservices/overzichtskaartnl?service=WFStypename=NL-provversion=1.0.0 you will be able to receive provinces, highways etc from the Netherlands. Yes, I've configured my ANNOTATION/LABEL layers as WFS and WMS layers. And is cool, but anyway, Yes, I have set my ANNOTATIONS/LABEL layers, as WFS/WMS layers, but still I could not take advantage of this to achieve the objective. Regards, Richard Duivenvoorde Thanks Richards, saludos para ti y todos los usuarios de QGIS. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user