<p>google & binhs maps are for ameteures. for full GIS PostGIS is ok</p>
<div class="gmail_quote">On Apr 6, 2013 7:00 PM,  <<a href="mailto:postgis-users-request@lists.osgeo.org">postgis-users-request@lists.osgeo.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Send postgis-users mailing list submissions to<br>
        <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:postgis-users-request@lists.osgeo.org">postgis-users-request@lists.osgeo.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:postgis-users-owner@lists.osgeo.org">postgis-users-owner@lists.osgeo.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of postgis-users digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. postgis v. google (zach cruise)<br>
   2. Re: postgis v. google (<a href="mailto:pcreso@pcreso.com">pcreso@pcreso.com</a>)<br>
   3. Re: postgis v. google (Martin Feuchtwanger)<br>
   4. Re: postgis v. google (Martin Feuchtwanger)<br>
   5. unique id in QGIS/PostGIS (Margie Roswell)<br>
   6. Re: unique id in QGIS/PostGIS (Paolo Corti)<br>
   7. Re: How to perform st_PixelAsPolygon(rast, geom) ?<br>
      (Hugues Fran?ois)<br>
   8. Re: unique id in QGIS/PostGIS (Richard Greenwood)<br>
   9. Re: unique id in QGIS/PostGIS (Margie Roswell)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri, 5 Apr 2013 18:35:15 -0400<br>
From: zach cruise <<a href="mailto:zachc1980@gmail.com">zachc1980@gmail.com</a>><br>
To: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>
Subject: [postgis-users] postgis v. google<br>
Message-ID:<br>
        <<a href="mailto:CAL8icXyEdZ0Db0xgNYoAkWCbd%2BsN_KHyGwknsPQQJN4HcLAOfQ@mail.gmail.com">CAL8icXyEdZ0Db0xgNYoAkWCbd+sN_KHyGwknsPQQJN4HcLAOfQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=UTF-8<br>
<br>
when would using just google maps make more sense than using something<br>
with postgis?<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri, 5 Apr 2013 16:04:11 -0700 (PDT)<br>
From: <a href="mailto:pcreso@pcreso.com">pcreso@pcreso.com</a><br>
To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br>
Subject: Re: [postgis-users] postgis v. google<br>
Message-ID:<br>
        <<a href="mailto:1365203051.79736.YahooMailClassic@web122001.mail.ne1.yahoo.com">1365203051.79736.YahooMailClassic@web122001.mail.ne1.yahoo.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Very briefly...<br>
<br>
When you want to manage spatial data, especially large volumes,or analyze them, or do polar maps, or use projections to display data in a more correct cartographic or spatial way...<br>
<br>
Postgis plus a mapserver (mapserver/geoserver/deegree/etc) plus a web mapping client (Openlayers/leaflet/etc) gives you a more complex & more powerful suite than Google. If you need that power & complexity.<br>
<br>
Google (or Bing) gives you a rich global context map dataset to display your data on top of, that you need to provide for yourself otherwise.<br>
<br>
There is a place for both... if I was to employ a competent statistical modeller, I would not choose someone who's tool of choice was a spreadsheet. Similarly, a web mapping specialist or cartographer who's only experience was with Google... so is a simple spreadsheet approach adequate for your needs or not?<br>

<br>
Cheers,<br>
<br>
? Brent Wood<br>
--- On Sat, 4/6/13, zach cruise <<a href="mailto:zachc1980@gmail.com">zachc1980@gmail.com</a>> wrote:<br>
<br>
From: zach cruise <<a href="mailto:zachc1980@gmail.com">zachc1980@gmail.com</a>><br>
Subject: [postgis-users] postgis v. google<br>
To: "PostGIS Users Discussion" <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>
Date: Saturday, April 6, 2013, 11:35 AM<br>
<br>
when would using just google maps make more sense than using something<br>
with postgis?<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.osgeo.org/pipermail/postgis-users/attachments/20130405/6b93f5f7/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/postgis-users/attachments/20130405/6b93f5f7/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Fri, 05 Apr 2013 17:33:40 -0700<br>
From: Martin Feuchtwanger <<a href="mailto:feumar@shaw.ca">feumar@shaw.ca</a>><br>
To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br>
Cc: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>
Subject: Re: [postgis-users] postgis v. google<br>
Message-ID: <<a href="mailto:515F6D64.3080609@shaw.ca">515F6D64.3080609@shaw.ca</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
 From my point-of-view, it's a rather odd question; i see them as<br>
complementing one another nicely.<br>
I'm working on a project that involves a large spatial database, which<br>
i'm storing in postgis, and google earth, which i'm using as the<br>
display/view tool. Postgis easily outputs kml for google earth/maps.<br>
<br>
Martin Feuchtwanger  <a href="mailto:feumar@shaw.ca">feumar@shaw.ca</a>  604-254-0361<br>
<a href="http://members.shaw.ca/geomatics.developer" target="_blank">http://members.shaw.ca/geomatics.developer</a><br>
<br>
On 05/04/2013 3:35 PM, zach cruise wrote:<br>
<br>
> when would using just google maps make more sense than using something<br>
> with postgis?<br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Fri, 05 Apr 2013 17:33:40 -0700<br>
From: Martin Feuchtwanger <<a href="mailto:feumar@shaw.ca">feumar@shaw.ca</a>><br>
To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br>
Cc: PostGIS Users Discussion <<a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>><br>
Subject: Re: [postgis-users] postgis v. google<br>
Message-ID: <<a href="mailto:515F6D64.3080609@shaw.ca">515F6D64.3080609@shaw.ca</a>><br>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed<br>
<br>
 From my point-of-view, it's a rather odd question; i see them as<br>
complementing one another nicely.<br>
I'm working on a project that involves a large spatial database, which<br>
i'm storing in postgis, and google earth, which i'm using as the<br>
display/view tool. Postgis easily outputs kml for google earth/maps.<br>
<br>
Martin Feuchtwanger  <a href="mailto:feumar@shaw.ca">feumar@shaw.ca</a>  604-254-0361<br>
<a href="http://members.shaw.ca/geomatics.developer" target="_blank">http://members.shaw.ca/geomatics.developer</a><br>
<br>
On 05/04/2013 3:35 PM, zach cruise wrote:<br>
<br>
> when would using just google maps make more sense than using something<br>
> with postgis?<br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Sat, 6 Apr 2013 04:18:59 -0400<br>
From: Margie Roswell <<a href="mailto:mroswell@gmail.com">mroswell@gmail.com</a>><br>
To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br>
Subject: [postgis-users] unique id in QGIS/PostGIS<br>
Message-ID:<br>
        <<a href="mailto:CAPAc6WEf0RfHPB7tNX2LnsXf2u6KNwa9ZR9qrJo4HeQ2HV5kXg@mail.gmail.com">CAPAc6WEf0RfHPB7tNX2LnsXf2u6KNwa9ZR9qrJo4HeQ2HV5kXg@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
I've been googling up a storm, now that I've got a local postgis database<br>
with QGIS. But still haven't figured out how to display a newly created<br>
table.<br>
<br>
The query I used to create the table:<br>
CREATE TABLE smaller_leg_final AS<br>
SELECT ST_Buffer(geom,-500) AS geom, legislative_final.district<br>
FROM legislative_final<br>
WHERE area > 30;<br>
<br>
I then discovered that I needed a unique ID, and did the following:<br>
ALTER TABLE smaller_leg_final ADD COLUMN id serial not null;<br>
<br>
This successfully populated the ID field with unique integers.<br>
<br>
However when I go into QGIS, the Primary Key column offers no options. when<br>
I click into it, it just asks me to choose an SRID, which I believe I've<br>
already done. The table loads, but nothing displays.<br>
<br>
I honestly feel a bit like a toddler given ice skates and placed on an icy<br>
rink. I'm toddling my way around, falling, getting back up, and then<br>
looking up and asking: why did I fall?<br>
<br>
Once upon a time I was at the true cutting edge of GIS... I purchased<br>
MapInfo versions 1.1, and upgraded from there for many years. Moving into<br>
QGIS/Posgres/postGIS now, and well on the path to success, but .... not...<br>
quite... there.<br>
<br>
Are there any QGIS users here who can help me to display my new table?<br>
<br>
Do I need a different postgres statement? Is there a different field name<br>
expected? Maybe my query generated invalid shapes... But still, the geom<br>
field is displaying in the "Add PostGIS layers "Geometry column", but the<br>
Primary key column option doesn't allow me to select my 'id' field.<br>
<br>
Insight welcome.<br>
<br>
<br>
<br>
<br>
--<br>
<a href="http://FarmBillPrimer.org" target="_blank">http://FarmBillPrimer.org</a><br>
<a href="http://www.BaltimoreUrbanAg.org" target="_blank">http://www.BaltimoreUrbanAg.org</a> (Please send events; This site is hungry.)<br>
<a href="http://www.ExcellentNutrition.org" target="_blank">http://www.ExcellentNutrition.org</a><br>
<a href="http://www.packtpub.com/drupal-5-views-recipes/book" target="_blank">http://www.packtpub.com/drupal-5-views-recipes/book</a><br>
<br>
<br>
On Thu, Apr 4, 2013 at 11:21 AM, Lelo - Luiz Rog?rio De Pieri <<br>
<a href="mailto:lelo.pieri@gmail.com">lelo.pieri@gmail.com</a>> wrote:<br>
<br>
> Hi all,<br>
><br>
> I'm having a problem to execute a pgsql2shp command using java.<br>
><br>
> My OS is Ubuntu and it's frequently I use to generate shp files using<br>
> pgsql2shp, but now I want to do it through java.<br>
><br>
> The follow command works fine on terminal<br>
> pgsql2shp -f pontos_05600202_teste -h myhost -u myuser -P mypasswd -g<br>
> coordinates my_database "SELECT * from points where id_uploaded_file =<br>
> 37995";<br>
><br>
> Now I'm trying to execute the follow code:<br>
><br>
> ProcessBuilder pb = new ProcessBuilder("pgsql2shp", "-f<br>
> pontos_05600202_teste", "-h myhost", "-u myuser", "-P mypasswd", "-g<br>
> coordinates", "my_database", "SELECT coordinates, date from points where<br>
> id_uploaded_file = 37995");<br>
><br>
> Process proc;<br>
> proc = pb.start();<br>
> InputStream stdin = proc.getInputStream();<br>
> InputStreamReader isr = new InputStreamReader(stdin);<br>
> BufferedReader br = new BufferedReader(isr);<br>
><br>
> String line = null;<br>
> System.out.println("<OUTPUT>");<br>
><br>
> while ((line = br.readLine()) != null)<br>
>     System.out.println(line);<br>
><br>
> System.out.println("</OUTPUT>");<br>
> int exitVal = proc.waitFor();<br>
> System.out.println("Process exitValue: " + exitVal);<br>
><br>
><br>
> And the result is:<br>
><br>
> <OUTPUT><br>
> Preparing table for user query... Done.<br>
> Initializing...  coordinates: no such attribute in table<br>
> __pgsql2shp14493_tmp_table<br>
> </OUTPUT><br>
><br>
> Does anybody as any idea about it?<br>
><br>
> Thank you for all<br>
><br>
> Best regards<br>
> --<br>
> Rog?rio De Pieri  (Lelo)<br>
> SCJP 5<br>
> Buscando melhorar a cada dia<br>
> ?udio, Hardware & Software<br>
> <a href="http://www.twitter.com/lelopieri" target="_blank">www.twitter.com/lelopieri</a><br>
> <a href="http://blogdolelo.wordpress.com" target="_blank">blogdolelo.wordpress.com</a><br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.osgeo.org/pipermail/postgis-users/attachments/20130406/b5cf6410/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/postgis-users/attachments/20130406/b5cf6410/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Sat, 6 Apr 2013 11:03:10 +0200<br>
From: Paolo Corti <<a href="mailto:pcorti@gmail.com">pcorti@gmail.com</a>><br>
To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br>
Subject: Re: [postgis-users] unique id in QGIS/PostGIS<br>
Message-ID:<br>
        <<a href="mailto:CAHXrU-%2Bd2LzvC4t76q%2BwK1wL86CxvmNPMpW8aVdpOuzY9x-9qA@mail.gmail.com">CAHXrU-+d2LzvC4t76q+wK1wL86CxvmNPMpW8aVdpOuzY9x-9qA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset=ISO-8859-1<br>
<br>
On Sat, Apr 6, 2013 at 10:18 AM, Margie Roswell <<a href="mailto:mroswell@gmail.com">mroswell@gmail.com</a>> wrote:<br>
><br>
> The query I used to create the table:<br>
> CREATE TABLE smaller_leg_final AS<br>
> SELECT ST_Buffer(geom,-500) AS geom, legislative_final.district<br>
> FROM legislative_final<br>
> WHERE area > 30;<br>
><br>
> I then discovered that I needed a unique ID, and did the following:<br>
> ALTER TABLE smaller_leg_final ADD COLUMN id serial not null;<br>
><br>
> This successfully populated the ID field with unique integers.<br>
><br>
> However when I go into QGIS, the Primary Key column offers no options. when<br>
> I click into it, it just asks me to choose an SRID, which I believe I've<br>
> already done. The table loads, but nothing displays.<br>
><br>
<br>
Which version of PostGIS are you using?<br>
Could you send the DDL CREATE TABLE syntax?<br>
<br>
You can get it like this:<br>
<br>
pg_dump -t tablename --schema-only<br>
<br>
or copy and paste it from the pgAdmin SQL table pane<br>
<br>
I have the suspect, thought, that you are using PostGIS < 2.0: in that<br>
case you explicitely need to record the metadata in geometry_columns<br>
using AddGeometryColumn<br>
<br>
regards<br>
p<br>
<br>
--<br>
Paolo Corti<br>
Geospatial software developer<br>
web: <a href="http://www.paolocorti.net" target="_blank">http://www.paolocorti.net</a><br>
twitter: @capooti<br>
skype: capooti<br>
<br>
<br>
------------------------------<br>
<br>
Message: 7<br>
Date: Sat, 6 Apr 2013 14:11:23 +0200<br>
From: Hugues Fran?ois <<a href="mailto:hugues.francois@irstea.fr">hugues.francois@irstea.fr</a>><br>
To: "PostGIS Users Discussion" <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br>
Subject: Re: [postgis-users] How to perform st_PixelAsPolygon(rast,<br>
        geom) ?<br>
Message-ID:<br>
        <<a href="mailto:3CB901080554B04881D30F111F62D930028EEFE6@nadia.grenoble.cemagref.fr">3CB901080554B04881D30F111F62D930028EEFE6@nadia.grenoble.cemagref.fr</a>><br>
Content-Type: text/plain;       charset="iso-8859-1"<br>
<br>
Thank you very much Pierre ! That's exactly what I was looking for. Sorry I didn't find the st_worldtorastercoord functions which do exactly what I need (maybe it should be a good idea to add a reference in the pixel accessors et setter functions -in "see also" -  since theses function work at the pixel level).<br>

<br>
Hugues.<br>
<br>
-----Message d'origine-----<br>
De?: <a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a>] De la part de Pierre Racine<br>

Envoy??: vendredi 5 avril 2013 18:12<br>
??: PostGIS Users Discussion<br>
Objet?: Re: [postgis-users] How to perform st_PixelAsPolygon(rast, geom) ?<br>
<br>
You can do:<br>
<br>
SELECT ST_PixelAsPolygon(rast, ST_WorldToRasterCoordX(rast, ST_X(geom)), ST_WorldToRasterCoordY(rast, ST_Y(geom))) geom FROM yourrast, yourpoints WHERE ST_Intersects(rast, geom)<br>
<br>
Note that PixelAsPolygon has no "s".<br>
<br>
You will get the vectorization of every pixels having a point inside. Up to you to deal with duplicates.<br>
<br>
Pierre<br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:postgis-users-bounces@lists.osgeo.org">postgis-users-bounces@lists.osgeo.org</a> [mailto:<a href="mailto:postgis-users-">postgis-users-</a><br>
> <a href="mailto:bounces@lists.osgeo.org">bounces@lists.osgeo.org</a>] On Behalf Of Hugues Fran?ois<br>
> Sent: Friday, April 05, 2013 6:51 AM<br>
> To: <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> Subject: [postgis-users] How to perform st_PixelAsPolygon(rast, geom) ?<br>
><br>
> Hello,<br>
><br>
><br>
><br>
> I need to work with a dem raster at the pixel scale but there are few<br>
> functions to access them. Maybe I forgot something but, if we can have<br>
> a value crossing a point with raster using st_value, we can't access<br>
> the pixel geometry directly from a point.<br>
><br>
><br>
><br>
> The only way I found was first to use St_PixelAsPolygons to access<br>
> pixel geometry (for relevant tiles) and then intersects resulting<br>
> geometries with original points but this method costs very much.<br>
><br>
><br>
><br>
> Anyone have an idea to increase performances ?<br>
><br>
><br>
><br>
> Hugues.<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br>
<br>
------------------------------<br>
<br>
Message: 8<br>
Date: Sat, 6 Apr 2013 07:28:10 -0600<br>
From: Richard Greenwood <<a href="mailto:richard.greenwood@gmail.com">richard.greenwood@gmail.com</a>><br>
To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br>
Subject: Re: [postgis-users] unique id in QGIS/PostGIS<br>
Message-ID:<br>
        <CAHBySPbH3MNH35tVh952Zdsx7try8FE-NJ7718zBne=<a href="mailto:rPF7T9w@mail.gmail.com">rPF7T9w@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
On Sat, Apr 6, 2013 at 2:18 AM, Margie Roswell <<a href="mailto:mroswell@gmail.com">mroswell@gmail.com</a>> wrote:<br>
<br>
> I've been googling up a storm, now that I've got a local postgis database<br>
> with QGIS. But still haven't figured out how to display a newly created<br>
> table.<br>
><br>
> The query I used to create the table:<br>
> CREATE TABLE smaller_leg_final AS<br>
> SELECT ST_Buffer(geom,-500) AS geom, legislative_final.district<br>
> FROM legislative_final<br>
> WHERE area > 30;<br>
><br>
> I then discovered that I needed a unique ID, and did the following:<br>
> ALTER TABLE smaller_leg_final ADD COLUMN id serial not null;<br>
><br>
<br>
<br>
Why don't you try making you unique column a primary key?<br>
<br>
ALTER TABLE smaller_leg_final<br>
  ADD CONSTRAINT smaller_leg_final_pk PRIMARY KEY(id);<br>
<br>
Rich<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.osgeo.org/pipermail/postgis-users/attachments/20130406/6be6a245/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/postgis-users/attachments/20130406/6be6a245/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
Message: 9<br>
Date: Sat, 6 Apr 2013 10:31:56 -0400<br>
From: Margie Roswell <<a href="mailto:mroswell@gmail.com">mroswell@gmail.com</a>><br>
To: PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a>><br>
Subject: Re: [postgis-users] unique id in QGIS/PostGIS<br>
Message-ID:<br>
        <CAPAc6WEOuWT_bvJLO=<a href="mailto:Nrr41DRXU29aPwVQSJKgNsPas2cpX0Qw@mail.gmail.com">Nrr41DRXU29aPwVQSJKgNsPas2cpX0Qw@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Thanks. I went ahead and created the primary key as directed. Still no<br>
luck. I created this mini-screencast so you can see what I'm talking about<br>
<a href="http://screencast.com/t/9WMkHN56e" target="_blank">http://screencast.com/t/9WMkHN56e</a><br>
<br>
and adding on a few more seconds, here:<br>
<a href="http://screencast.com/t/DCjs2OXsew" target="_blank">http://screencast.com/t/DCjs2OXsew</a><br>
<br>
and a quick screenshot here, showing the data<br>
<a href="http://screencast.com/t/fImccBVh" target="_blank">http://screencast.com/t/fImccBVh</a><br>
<br>
(sorry, I didn't get all that in one pass.)<br>
<br>
I should add that the original Maryland Legislative district is here:<br>
<a href="http://planning.maryland.gov/PDF/Redistricting/2010zip/Legislative_shape.zip" target="_blank">http://planning.maryland.gov/PDF/Redistricting/2010zip/Legislative_shape.zip</a><br>
<br>
The PRJ file reads as follows<br>
GEOGCS["GCS_GRS_1980",DATUM["D_GRS_1980",SPHEROID["GRS_1980",6378137,298.2572221]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]]<br>
<br>
<br>
Oddly enough, also, the legislature_final file ALSO doesn't list primary<br>
key, but it displays anyhow. In this case, I've selected the ones with area<br>
> 25, because I thought they'd be more likely to buffer successfully...<br>
<br>
Anyhow, maybe with the mini-video screencast, it'll be easier to see what<br>
I'm talking about.<br>
<br>
Margie<br>
<br>
<br>
<br>
Margie<br>
<br>
--<br>
<a href="http://FarmBillPrimer.org" target="_blank">http://FarmBillPrimer.org</a><br>
<a href="http://www.BaltimoreUrbanAg.org" target="_blank">http://www.BaltimoreUrbanAg.org</a> (Please send events; This site is hungry.)<br>
<a href="http://www.ExcellentNutrition.org" target="_blank">http://www.ExcellentNutrition.org</a><br>
<a href="http://www.packtpub.com/drupal-5-views-recipes/book" target="_blank">http://www.packtpub.com/drupal-5-views-recipes/book</a><br>
<br>
<br>
On Sat, Apr 6, 2013 at 9:28 AM, Richard Greenwood <<br>
<a href="mailto:richard.greenwood@gmail.com">richard.greenwood@gmail.com</a>> wrote:<br>
<br>
><br>
> On Sat, Apr 6, 2013 at 2:18 AM, Margie Roswell <<a href="mailto:mroswell@gmail.com">mroswell@gmail.com</a>> wrote:<br>
><br>
>> I've been googling up a storm, now that I've got a local postgis database<br>
>> with QGIS. But still haven't figured out how to display a newly created<br>
>> table.<br>
>><br>
>> The query I used to create the table:<br>
>> CREATE TABLE smaller_leg_final AS<br>
>> SELECT ST_Buffer(geom,-500) AS geom, legislative_final.district<br>
>> FROM legislative_final<br>
>> WHERE area > 30;<br>
>><br>
>> I then discovered that I needed a unique ID, and did the following:<br>
>> ALTER TABLE smaller_leg_final ADD COLUMN id serial not null;<br>
>><br>
><br>
><br>
> Why don't you try making you unique column a primary key?<br>
><br>
> ALTER TABLE smaller_leg_final<br>
>   ADD CONSTRAINT smaller_leg_final_pk PRIMARY KEY(id);<br>
><br>
> Rich<br>
><br>
> _______________________________________________<br>
> postgis-users mailing list<br>
> <a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
> <a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
><br>
><br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://lists.osgeo.org/pipermail/postgis-users/attachments/20130406/59e47305/attachment-0001.html" target="_blank">http://lists.osgeo.org/pipermail/postgis-users/attachments/20130406/59e47305/attachment-0001.html</a>><br>

<br>
------------------------------<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
<br>
<br>
End of postgis-users Digest, Vol 134, Issue 4<br>
*********************************************<br>
</blockquote></div>