[postgis-users] PostGIS 2.0 Shapefile and DBF Loader

Anthony DeBarros adebarros at gmail.com
Sat Mar 23 12:06:42 PDT 2019


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 at 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 at lists.osgeo.org] *On
> Behalf Of *Carson Gray
> *Sent:* Friday, March 22, 2019 4:58 PM
> *To:* PostGIS Users Discussion <postgis-users at 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 at 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 at lists.osgeo.org] *On
> Behalf Of *Carson Gray
>
>
> *Sent:* Friday, March 22, 2019 3:38 PM
> *To:* PostGIS Users Discussion <postgis-users at 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 at 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 at 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 at 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 at lists.osgeo.org] *On
> Behalf Of *Carson Gray
> *Sent:* Friday, March 22, 2019 1:50 PM
> *To:* postgis-users at 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 at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190323/a9d765df/attachment.html>


More information about the postgis-users mailing list