[postgis-users] Problem importing SHP polygons
Conrad Bielski
conrad_bielski at yahoo.com
Tue Mar 10 08:31:10 PDT 2015
Thanks Steve,here is the output from ogrinfo:ogrinfo -ro -so emsr118_8Zaragoza_20150202_forecast_20150203_0600.shp
INFO: Open of `emsr118_8Zaragoza_20150202_forecast_20150203_0600.shp'
using driver `ESRI Shapefile' successful.
1: emsr118_8Zaragoza_20150202_forecast_20150203_0600 (Polygon)
The non-summary top part is this:INFO: Open of `emsr118_8Zaragoza_20150202_forecast_20150203_0600.shp'
using driver `ESRI Shapefile' successful.
Layer name: emsr118_8Zaragoza_20150202_forecast_20150203_0600
Geometry: Polygon
Feature Count: 119
Extent: (-88683.343224, 5071795.372268) - (-51666.416524, 5103519.364138)
Layer SRS WKT:
PROJCS["WGS_84_Pseudo_Mercator",
GEOGCS["GCS_WGS_1984",
DATUM["WGS_1984",
SPHEROID["WGS_84",6378137,298.257223563]],
PRIMEM["Greenwich",0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Mercator_1SP"],
PARAMETER["central_meridian",0],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["Meter",1],
PARAMETER["latitude_of_origin",0.0]]
cat: Integer (10.0)
value: Integer (10.0)
label: String (10.0)
Conrad
From: Stephen Woodbridge <woodbri at swoodbridge.com>
To: Conrad Bielski <conrad_bielski at yahoo.com>; PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Sent: Tuesday, March 10, 2015 3:15 PM
Subject: Re: [postgis-users] Problem importing SHP polygons
On 3/10/2015 10:48 AM, Conrad Bielski wrote:
> Hi,
> I'm having a curious issue importing a polygon SHP file into PostGIS.
> I'll describe the procedure that I'm using and the problem that I'm
> having and hopefully somebody has had this issue in the past and fixed it.
>
> So the procedure is that I use GRASS to produce a vector from a raster
> output: (r.to.vect input=MASK output=vecMap feature=area) and then
> export to SHP file (v.out.ogr -c -e input=vecMap dsn=fname
> format=ESRI_Shapefile type=area).
What does ogrinfo say about the shapefile? I would start here to make
sure the shapefile is really a polygon and not and arc type.
-Steve
> Now when this SHP file is imported into PostGIS, the type is changed to
> multistring for some reason. Then when checking the topology, there is a
> 'ring self-intersection' error. This PostGIS db is then imported into
> GeoServer, where lines are connecting between different parts of the
> largest polygon (this should not be happening). If I fix this typology
> problem, then the largest polygon in the db disappears.
>
> The strange thing is the following:
> 1. Opening the SHP file in QGIS doesn't have this problem
> 2. Importing the SHP file directly into GeoServer, doesn't generate this
> problem either.
>
> Why is PostGIS having an issue importing this file?
>
> Any ideas how to fix this?
>
> Thanks in advance for your help,
> Conrad
>
>
>
>
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20150310/996fa89f/attachment.html>
More information about the postgis-users
mailing list