[postgis-users] shp2pgsql Null geometries
Mark Cave-Ayland
mark.cave-ayland at ilande.co.uk
Thu Feb 22 03:52:49 PST 2007
On Tue, 2007-02-20 at 17:27 +0000, paallen at attglobal.net wrote:
> Hi all,
>
> I noticed that my attributes had some odd spanish
> characters so I decided to only keep some numeric
> fields to keep life simple.
>
> I ran these commands
> shp2pgsql -w co.shp public.co1 > co1.sql
> psql -d ddh -U pallen -f co1.sql
>
> Then I ran the following query in pgAdminIII:
> select gid, objectid, "__gid", AsText(the_geom) as
> thegeom from public.co1
>
> And I noticed that many of the thegeom records
> were null/blank. What has happened? The shape
> file was cleaned first with ArcGIS 9.2.
>
> Actually the first geometry was blank. Looking at
> it in ArcGIS it was just a simple polygon with an
> island. Are islands the problem?
>
> I have attached an insert.sql of a problematic
> record. I have looked at it in a text editor and
> all looks fine to me
>
> thanks,
>
> Phil
Hi Phil,
Good question. If the geometries which appear NULL are represented fine
in your co1.sql file, then the server is likely rejecting them for some
reason. Does anything show up in the server log?
Kind regards,
Mark.
More information about the postgis-users
mailing list