[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    Re: [postgis-users] PostGIS 2.0 Shapefile and DBF Loader
From:       Anthony DeBarros <adebarros () gmail ! com>
Date:       2019-03-23 19:06:42
Message-ID: CAAQFaFKTUSea0n47xxtppNTGjxW7-=rUoCJTa827m1YmOiC3sg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


How about using the command line on your Mac and the shp2pgsql and psql
commands?

For example, this command would load a shapefile into a table called
us_counties_2010_shp in a database called gis_analysis:

shp2pgsql -I -s 4269 -W Latin1 tl_2010_us_county10.shp us_counties_2010_shp
| psql -d gis_analysis -U postgres

It's also setting options for the file encoding and SRID. Here's a cheat
sheet: http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg

On Fri, Mar 22, 2019 at 5:15 PM Regina Obe <lr@pcorp.us> wrote:

> Do you have shp2gpsql-gui installed on your system? That's why I was
> asking which distribution you are using, because many don't come with the
> shp2gpsql-gui executable. The PostGIS Shapefile Import/Export
> (shp2pgsql-gui (is the filename))
>
> never had anything to do with pgAdmin3.  It followed the pgAdmin3 protocol
> for plugins was all, but runs perfectly fine without pgAdmin3.
>
>
>
> If you don't have shp2pgsql-gui installed on your Mac, you can't use it
> even if you have pgAdmin3 installed.
>
>
>
> *From:* postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] *On
> Behalf Of *Carson Gray
> *Sent:* Friday, March 22, 2019 4:58 PM
> *To:* PostGIS Users Discussion <postgis-users@lists.osgeo.org>
> *Subject:* Re: [postgis-users] PostGIS 2.0 Shapefile and DBF Loader
>
>
>
> I have pgAdmin 4 tho..
>
>
>
> On Fri, Mar 22, 2019 at 4:43 PM Regina Obe <lr@pcorp.us> wrote:
>
> Carson,
>
>
>
> You'd need shp2pgsql-gui installed (and pgAdmin3 didn't come with that).
> That always got packaged with the desktop distributions that included
> PostGIS.
>
>
>
> All pgAdmin3 really helped you with was prefilling the connection info,
> which turned out to be more convenient than I thought.  It's amazing how
> lazy I've become.
>
>
>
> If you can find where the shp2pgsql-gui binary is installed on your system
> you can launch it directly and then click the "View connection details" and
> fill in the information that pgAdmin3 would so conveniently fill in for you.
>
>
>
>
>
>
>
>
>
>
>
>
>
> *From:* postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] *On
> Behalf Of *Carson Gray
>
>
> *Sent:* Friday, March 22, 2019 3:38 PM
> *To:* PostGIS Users Discussion <postgis-users@lists.osgeo.org>
> *Subject:* Re: [postgis-users] PostGIS 2.0 Shapefile and DBF Loader
>
>
>
> Should I just download pgAdmin 3?
>
>
>
> On Fri, Mar 22, 2019 at 2:25 PM Paul Ramsey <pramsey@cleverelephant.ca>
> wrote:
>
> I wonder if we could do some thing native in pgadmin4 with shapely
>
>
> On Mar 22, 2019, at 11:15 AM, Carson Gray <carson.gray3@gmail.com> wrote:
>
> I am very new to this and need to upload shapefiles to pgAdmin 4 and my
> instructions say to use the Shapefile Loader.
>
>
>
> On Fri, Mar 22, 2019 at 2:12 PM Regina Obe <lr@pcorp.us> wrote:
>
> Carson,
>
>
>
> Do you compile your own PostGIS or you get from a distribution.  We still
> have shp2pgsql-gui in PostGIS code base, and I still ship it as part of the
> Windows EDB builds.
>
>
>
> Unfortunately pgAdmin4 plugin architecture changed from pgAdmin3 days, so
> shp2gpsql-gui cannot work as a plugin under pgAdmin4.
>
>
>
> I took it out of our upcoming PostGIS In Action book we are doing because
> of that and hoping we'll have a replacement for it soon that piggy backs on
> shp2pgsql commandline.
>
>
>
>
>
>
>
> *From:* postgis-users [mailto:postgis-users-bounces@lists.osgeo.org] *On
> Behalf Of *Carson Gray
> *Sent:* Friday, March 22, 2019 1:50 PM
> *To:* postgis-users@lists.osgeo.org
> *Subject:* [postgis-users] PostGIS 2.0 Shapefile and DBF Loader
>
>
>
> Hello,
>
>
>
> I have a Macbook Pro and am using PGAdmin 4 and PostGIS. I cannot seem to
> find the PostGIS 2.0 Shapefile and DBF Loader. Can anyone help with this?
> Is there something else I need to download? Thanks.
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users

[Attachment #5 (text/html)]

<div dir="ltr"><div dir="ltr">How about using the command line on your Mac and the \
shp2pgsql and psql commands?<div><br></div><div>For example, this command would load \
a shapefile into a table called us_counties_2010_shp in a database called \
gis_analysis:</div><div><br></div><div>shp2pgsql -I -s 4269 -W Latin1 \
tl_2010_us_county10.shp us_counties_2010_shp | psql -d gis_analysis -U \
postgres<br><br>It&#39;s also setting options for the file encoding and SRID. \
Here&#39;s a cheat sheet:  <a \
href="http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg">http://bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg</a></div></div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 22, 2019 at 5:15 PM \
Regina Obe &lt;<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="EN-US"><div \
class="gmail-m_-1756901818765513986WordSection1"><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Do you \
have shp2gpsql-gui installed on your system? That&#39;s why I was asking which \
distribution you are using, because many don&#39;t come with the shp2gpsql-gui \
executable. The PostGIS Shapefile Import/Export (shp2pgsql-gui (is the \
filename))<u></u><u></u></span></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">never had \
anything to do with pgAdmin3.   It followed the pgAdmin3 protocol for plugins was \
all, but runs perfectly fine without pgAdmin3.<u></u><u></u></span></p><p \
class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u>  \
<u></u></span></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">If you \
don&#39;t have shp2pgsql-gui installed on your Mac, you can&#39;t use it even if you \
have pgAdmin3 installed.<u></u><u></u></span></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)"><u></u>  \
<u></u></span></p><div \
style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid \
blue;padding:0in 0in 0in 4pt"><div><div \
style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid \
rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b><span \
style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span \
style="font-size:11pt;font-family:Calibri,sans-serif"> postgis-users [mailto:<a \
href="mailto:postgis-users-bounces@lists.osgeo.org" \
target="_blank">postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Carson \
Gray<br><b>Sent:</b> Friday, March 22, 2019 4:58 PM<br><b>To:</b> PostGIS Users \
Discussion &lt;<a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a>&gt;<br><b>Subject:</b> Re: \
[postgis-users] PostGIS 2.0 Shapefile and DBF \
Loader<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u>  \
<u></u></p><div><div><p class="MsoNormal">I have pgAdmin 4 \
tho..<u></u><u></u></p></div></div><div><p class="MsoNormal"><u></u>  \
<u></u></p><div><div><p class="MsoNormal">On Fri, Mar 22, 2019 at 4:43 PM Regina Obe \
&lt;<a href="mailto:lr@pcorp.us" target="_blank">lr@pcorp.us</a>&gt; \
wrote:<u></u><u></u></p></div><blockquote \
style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid \
rgb(204,204,204);padding:0in 0in 0in \
6pt;margin-left:4.8pt;margin-right:0in"><div><div><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Carson,</span><u></u><u></u></p><p \
class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">You&#39;d \
need shp2pgsql-gui installed (and pgAdmin3 didn&#39;t come with that).   That always \
got packaged with the desktop distributions that included \
PostGIS.</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">All \
pgAdmin3 really helped you with was prefilling the connection info, which turned out \
to be more convenient than I thought.   It&#39;s amazing how lazy I&#39;ve \
become.</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">If you can \
find where the shp2pgsql-gui binary is installed on your system you can launch it \
directly and then click the &quot;View connection details&quot; and fill in the \
information that pgAdmin3 would so conveniently fill in for \
you.</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><img border="0" width="433" \
height="658" id="gmail-m_-1756901818765513986_x0000_i1025" \
src="cid:169abee88534cff311"><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><div \
style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid \
blue;padding:0in 0in 0in 4pt"><div><div \
style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid \
rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b><span \
style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span \
style="font-size:11pt;font-family:Calibri,sans-serif"> postgis-users [mailto:<a \
href="mailto:postgis-users-bounces@lists.osgeo.org" \
target="_blank">postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Carson \
Gray</span><u></u><u></u></p></div></div></div></div></div><div><div><div \
style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid \
blue;padding:0in 0in 0in 4pt"><div><div \
style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid \
rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif"><br><b>Sent:</b> Friday, March \
22, 2019 3:38 PM<br><b>To:</b> PostGIS Users Discussion &lt;<a \
href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a>&gt;<br><b>Subject:</b> Re: \
[postgis-users] PostGIS 2.0 Shapefile and DBF \
Loader</span><u></u><u></u></p></div></div><p class="MsoNormal">  \
<u></u><u></u></p><div><p class="MsoNormal">Should I just download pgAdmin \
3?<u></u><u></u></p></div><p class="MsoNormal">  <u></u><u></u></p><div><div><p \
class="MsoNormal">On Fri, Mar 22, 2019 at 2:25 PM Paul Ramsey &lt;<a \
href="mailto:pramsey@cleverelephant.ca" \
target="_blank">pramsey@cleverelephant.ca</a>&gt; \
wrote:<u></u><u></u></p></div><blockquote \
style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid \
rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><div><div><p \
class="MsoNormal">I wonder if we could do some thing native in pgadmin4 with shapely  \
<u></u><u></u></p></div><div><p class="MsoNormal" style="margin-bottom:12pt"><br>On \
Mar 22, 2019, at 11:15 AM, Carson Gray &lt;<a href="mailto:carson.gray3@gmail.com" \
target="_blank">carson.gray3@gmail.com</a>&gt; \
wrote:<u></u><u></u></p></div><blockquote \
style="margin-top:5pt;margin-bottom:5pt"><div><div><div><p class="MsoNormal">I am \
very new to this and need to upload shapefiles to pgAdmin 4 and my instructions say \
to use the Shapefile Loader.  <u></u><u></u></p></div></div><div><p \
class="MsoNormal">  <u></u><u></u></p><div><div><p class="MsoNormal">On Fri, Mar 22, \
2019 at 2:12 PM Regina Obe &lt;<a href="mailto:lr@pcorp.us" \
target="_blank">lr@pcorp.us</a>&gt; wrote:<u></u><u></u></p></div><blockquote \
style="border-top:none;border-right:none;border-bottom:none;border-left:1pt solid \
rgb(204,204,204);padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt"><div><div><p \
class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Carson,</span><u></u><u></u></p><p \
class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Do you \
compile your own PostGIS or you get from a distribution.   We still have \
shp2pgsql-gui in PostGIS code base, and I still ship it as part of the Windows EDB \
builds.</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">Unfortunately \
pgAdmin4 plugin architecture changed from pgAdmin3 days, so shp2gpsql-gui cannot work \
as a plugin under pgAdmin4.</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">I took it \
out of our upcoming PostGIS In Action book we are doing because of that and hoping \
we&#39;ll have a replacement for it soon that piggy backs on shp2pgsql \
commandline.</span><u></u><u></u></p></div></div><div><div><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><p class="MsoNormal"><span \
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,73,125)">  \
</span><u></u><u></u></p><div \
style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid \
blue;padding:0in 0in 0in 4pt"><div><div \
style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid \
rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b><span \
style="font-size:11pt;font-family:Calibri,sans-serif">From:</span></b><span \
style="font-size:11pt;font-family:Calibri,sans-serif"> postgis-users [mailto:<a \
href="mailto:postgis-users-bounces@lists.osgeo.org" \
target="_blank">postgis-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Carson \
Gray<br><b>Sent:</b> Friday, March 22, 2019 1:50 PM<br><b>To:</b> <a \
href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br><b>Subject:</b> [postgis-users] \
PostGIS 2.0 Shapefile and DBF Loader</span><u></u><u></u></p></div></div><p \
class="MsoNormal">  <u></u><u></u></p><div><p \
class="MsoNormal">Hello,<u></u><u></u></p><div><p class="MsoNormal">  \
<u></u><u></u></p></div><div><p class="MsoNormal">I have a Macbook Pro and am using \
PGAdmin 4 and PostGIS. I cannot seem to find the PostGIS 2.0 Shapefile and DBF \
Loader. Can anyone help with this? Is there something else I need to download? \
Thanks.<u></u><u></u></p></div></div></div></div></div><p \
class="MsoNormal">_______________________________________________<br>postgis-users \
mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br><a \
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><u></u><u></u></p></blockquote></div></div></div></blockquote><blockquote \
style="margin-top:5pt;margin-bottom:5pt"><div><p \
class="MsoNormal">_______________________________________________<br>postgis-users \
mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br><a \
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><u></u><u></u></p></div></blockquote></div><p \
class="MsoNormal">_______________________________________________<br>postgis-users \
mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br><a \
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><u></u><u></u></p></blockquote></div></div></div></div><p \
class="MsoNormal">_______________________________________________<br>postgis-users \
mailing list<br><a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br><a \
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><u></u><u></ \
u></p></blockquote></div></div></div></div></div>_______________________________________________<br>
 postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" \
target="_blank">postgis-users@lists.osgeo.org</a><br> <a \
href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" \
target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>



[Attachment #6 (text/plain)]

_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic