Re: [Qgis-user] Question on PostGIS Table and QGIS
Hi Randal, I believe there are a few things going on at the same time here. When you did select *, (st_dump(geom)).geom as the_geom from trgtgis.boundary; you ended up with two geometry columns since trgtgis.boundary.* already have a geom column(the one with the multipolygons), (can't find a reason to it's name in qgis are both the_geom tho). So, instead of using *, you should pick the columns one by one, leaving the original geometry column out. Besides that, after using st_dump(), try cast it as the right geometry and CRS, otherwise QGIS might have problems in guessing. Something like this: (st_dump(geom)).geom::geometry('POLYGON',26916) Finally, in order to be able open the layer in QGIS, you need a unique values primary key, and you can't use the original boundary primary key, because it has now duplicated values. You can wrap your query and had a ROW_NUMBER() OVER() as gid. Something like this: WITH r as ( SELECT field1, field2, field3,--... (ST_Dump(geom)).geom::geometry('POLYGON',26916) as the_geom FROM table_1 ) SELECT ROW_NUMBER() OVER() as id, r.* FROM r; Finally, if you want to skip all this, you can just select all your features in QGIS, start editing and use the (very handy cof cof) multipart split plugin http://plugins.qgis.org/plugins/splitmultipart/, it will split all your multipart polygons into single polygons in the original layer. Hope it helps, Alexandre On Mon, Jun 8, 2015 at 4:06 PM, Randal Hale rjh...@northrivergeographic.com wrote: I've had one other suggestion - I'll add this to the list and see what happens. Luckily this isn't vital at the moment - so I have some time to play a bit and see what I can do better. On 06/08/2015 11:03 AM, Jeff McKenna wrote: On 2015-06-07 11:50 AM, Randal Hale wrote: I'm breaking new ground and I'm pretty sure this might be a mistake on my end. I just need to understand why. I've set up a PostGIS database. I'm importing data through DB manager into my schema. I imported some parcel records and discovered that I had multipolygons. So I decided to break them up into single polygons through the psql interface: create table trgtgis.parcels as select *, (st_dump(geom)).geom as the_geom from trgtgis.boundary; When I go back to QGIS I have two tables called parcels (only one listed if I look through postgresql). One table is what I suspect to see with column called the_geom, data Type as Geometry, Spatial type of Polygon, SRID of 26916. The second parcel table is greyed out and doesn't have a spatial type or a SRID. Neither lists a primary key (I need to go back and add one) but I don't think this is the problem...I think. Screenshot: https://drive.google.com/file/d/0B8WLtz606XDdcFIxaG5fNExpMlU/view?usp=sharing Hi Randy, I've seen this issue before (QGIS listing multiple layers for one PostGIS table), but I did solve it, I just can't remember how I did that ha :) I believe one of my issues was that QGIS (and MapServer in fact) need a unique ID field, to display the data from PostGIS, so I always make sure to specify a unique ID field when creating tables for use in both QGIS and MapServer. -jeff -- - Randal Hale North River Geographic Systems, Inc http://www.northrivergeographic.com 423.653.3611 rjh...@northrivergeographic.com twitter:rjhale http://about.me/rjhale http://www.northrivergeographic.com/introduction-to-quantum-gis Southeast OSGEO: http://wiki.osgeo.org/wiki/Southeast_US ___ 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] add coordinates to my map?
Hello Peter, Following Lene's idea, If your layer geometry type are lines or polygons, you need to calculate the centroid. https://sigsemgrilhetas.wordpress.com/2015/02/10/calcular-coordenadas-do-centroide-de-poligonos-calculate-polygon-centroids-coordinates/ So the expression will become: *xmin(centroid($geometry)) || ‘ , ‘ || ymin(centroid($geometry))* Hope it helped, Alexandre On Mon, Jun 8, 2015 at 6:17 AM, Lene Fischer l...@ign.ku.dk wrote: Hi Peter, You can use the functions $x and $y for inserting it as an Expression in a label. To separate the information between the X and Y you insert *‘ space comma space ‘ *it looks like: *$X || ‘ , ‘ || $Y* See the video at http://screencast.com/t/iL02hUFDCHo Regards *Lene Fischer* Associate Professor *Department of Geosciences and Natural Resource Management* University of Copenhagen MOB +45 40115084 l...@ign.ku.dk [image: cid:image001.gif@01D03029.2F3EC6A0] *Fra:* qgis-user-boun...@lists.osgeo.org [mailto: qgis-user-boun...@lists.osgeo.org] *På vegne af *peter spence *Sendt:* 7. juni 2015 23:08 *Til:* qgis-user@lists.osgeo.org *Emne:* [Qgis-user] add coordinates to my map? Dear Ggis users, Can any one tell me how I can add coordinates to the X,Y-as of my map? Thanks! Peter ps I couldn't find it in the manual... Using Qgis 2.6 ___ 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] add coordinates to my map?
Hello Peter, Maybe I misunderstand your question, but I supose you want to add coordinates to x and y axes in a printed map. This is the road map: 1) Open or create a Print Composer 2) Add new map (your view) 3) Go to Item properties -- Grids 4) Add new grid (green +) and select your choice (CRS, interval, style, ...) Sorry if this don't help you, Juan Carlos 2015-06-09 10:47 GMT+02:00 Alexandre Neto senhor.n...@gmail.com: Hello Peter, Following Lene's idea, If your layer geometry type are lines or polygons, you need to calculate the centroid. https://sigsemgrilhetas.wordpress.com/2015/02/10/calcular-coordenadas-do-centroide-de-poligonos-calculate-polygon-centroids-coordinates/ So the expression will become: *xmin(centroid($geometry)) || ‘ , ‘ || ymin(centroid($geometry))* Hope it helped, Alexandre On Mon, Jun 8, 2015 at 6:17 AM, Lene Fischer l...@ign.ku.dk wrote: Hi Peter, You can use the functions $x and $y for inserting it as an Expression in a label. To separate the information between the X and Y you insert *‘ space comma space ‘ *it looks like: *$X || ‘ , ‘ || $Y* See the video at http://screencast.com/t/iL02hUFDCHo Regards *Lene Fischer* Associate Professor *Department of Geosciences and Natural Resource Management* University of Copenhagen MOB +45 40115084 l...@ign.ku.dk [image: cid:image001.gif@01D03029.2F3EC6A0] *Fra:* qgis-user-boun...@lists.osgeo.org [mailto: qgis-user-boun...@lists.osgeo.org] *På vegne af *peter spence *Sendt:* 7. juni 2015 23:08 *Til:* qgis-user@lists.osgeo.org *Emne:* [Qgis-user] add coordinates to my map? Dear Ggis users, Can any one tell me how I can add coordinates to the X,Y-as of my map? Thanks! Peter ps I couldn't find it in the manual... Using Qgis 2.6 ___ 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 -- ___ Juan Carlos Giménez Fernández Grado en Ingeniería Forestal y del Medio Natural Centro Universitario de Plasencia Universidad de Extremadura Avda. Virgen del Puerto nº 2 10600 Plasencia Cáceres (Spain) Phone: +34-927-25-70-00 (ext. 52148) FAX: +34-927-42-52-09 Móvil: +34-655-06-87-86 ___ ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Is there a default CSS for labels in map composer?
Hello all, Anyone knows if there is a default CSS file for HTML rendered labels used in in the map composer that one could edit? Thanks, Alexandre ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Opengeo (Geoserver) - QGIS 1:n relations
On 06/08/2015 07:00 AM, Pedro wrote: Hi, I'm using Opengeo plugin in QGIS top publish at Geoserver. Have a problem that I don't know how to handle it. At QGIS Project Properties established a relationship between two postgis tables (1:n). So when when I open an object editor got the information from the two tables. (just 1 table have a geometry column). By submitting the project to the Geoserver (with OpenGeo plugin) it takes the individual layers, i.e., it lose the relationship between the tables. Are you aware if there is a way to keep this 1:n relationship in Geoserver? Thanks, Pedro You probably need to create a Postgis view yourself that mimics what the plugin did. Then add this view directly to geoserver. Other than that sounds like a feature request to OpenGeo for adding more features to their plugin. Thanks, -Alex ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Issues to install QGIS on RedHat 6
Hi, I have issue to install QGIS 2.8 on Linux RedHat 6. First part: I installed ELGIS and EPEL using the instructions from: http://www.qgis.org/en/site/forusers/alldownloads.html#rhel-centos-scientific-linux The following commands were successfully executed sudo wget fedora.vitu.ch/EL/qgis.repo -P /etc/yum.repos.d/ sudo rpm --import http://fedora.vitu.ch/Fedora/RPM-GPG-Key-vitu But the execution of the next one failed: sudo yum update I got this error: http://fedora.vitu.ch/EL/6Workstation/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - The requested URL returned error: 404 Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: qgis. Please verify its path and try again This command failed as well. sudo yum install qgis qgis-python qgis-grass qgis-mapserver It seems the issue has been reported on Apr 14 2014 but no solution was release. It seems the location http://fedora.vitu.ch/EL/6Workstation/x86_64/repodata/does not exist anymore or was changed and instructions were not updated. Does anyone know a solution? Thanks, Marian This electronic message, as well as any transmitted files included in the electronic message, may contain privileged or confidential information and is intended solely for the use of the individual(s) or entity to which it is addressed. If you have received this electronic message in error please notify the sender immediately and delete the electronic message. Any unauthorized copying, disclosure or distribution of the electronic message is strictly forbidden. NAV CANADA accepts no liability for any damage caused by any virus and/or other malicious code transmitted by this electronic communication. Le présent message électronique et tout fichier qui peut y être joint peuvent contenir des renseignements privilégiés ou confidentiels destinés à l’usage exclusif des personnes ou des organismes à qui ils s’adressent. Si vous avez reçu ce message électronique par erreur, veuillez en informer l’expéditeur immédiatement et supprimez le. Toute reproduction, divulgation ou distribution du présent message électronique est strictement interdite. NAV CANADA n’assume aucune responsabilité en cas de dommage causé par tout virus ou autre programme malveillant transmis par ce message électronique. ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Processing Plugin Error
Hello, I have been trying to install/update the Processing plugin, but am unable to because of an error. The message reads: The plugin is broken. Python said: cannot import name AlgorithmDecorator. Please let me know how I might be able to fix this and use the plugin. Thanks, Lucas ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Processing Plugin Error
I tried to simulate your problem by simply removing the processing folder from .qgis2/python/plugins. When then updating processing, I got the same error. After one restart of QGIS, and trying to update again, the error was still there. The second time I restarted QGIS, everything was fine again. Running QGIS 2.8.2 on Linux Mint Am 10.06.2015, 01:12 Uhr, schrieb Lucas Bernard Grigri lgri...@uvm.edu: Hello, I have been trying to install/update the Processing plugin, but am unable to because of an error. The message reads: The plugin is broken. Python said: cannot import name AlgorithmDecorator. Please let me know how I might be able to fix this and use the plugin. Thanks, Lucas ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user -- Bernd Vogelgesang Siedlerstraße 2 91083 Baiersdorf/Igelsdorf Tel: 09133-825374 ___ Qgis-user mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user
[Qgis-user] Transferring Attributes
Hello, I would like to transfer contour line elevation values to polygons in another shapefile based on the contours contained within any given polygon. Is there a tool for this? I can select the polygons with a spatial query based upon another polygon but need to add the height info from the contour file. Thank you, cheers . . . . Springfield Harrison ___ 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] Transferring Attributes
Try Vector - Data Management - Join Attributes by Location. That should allow you to transfer the elevation from your contour to the polygon. Make sure your contour and polygon have the same projection. Hope that helps. Randy Randal Hale North River Geographic Systems, Inc http://www.northrivergeographic.com 423.653.3611 rjh...@northrivergeographic.com twitter:rjhale http://about.me/rjhale http://www.northrivergeographic.com/introduction-to-quantum-gis On 06/09/2015 10:18 PM, Springfield Harrison wrote: Hello, I would like to transfer contour line elevation values to polygons in another shapefile based on the contours contained within any given polygon. Is there a tool for this? I can select the polygons with a spatial query based upon another polygon but need to add the height info from the contour file. Thank you, cheers . . . . Springfield Harrison ___ 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 mailing list Qgis-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-user