Problem Importing Shapefile to PostgreSQL

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem Importing Shapefile to PostgreSQL

Jack Morris
I am having problems importing shape files from QGIS to PostgreSQL using
the Import Tool.

I am using Ubuntu Edgy, PostgreSQL 8.1.4.

I have successfully, I think, installed PostGIS and can see, using
pgAdmin III, that I have added to my database: 14 Casts, and under
Schemas>public: 9 Aggregates, 328 Functions, 17 Operators, 2 Tables
(geometry_columns and spatial_ref_sys) and 7 Types. I can successfully
connect to my database from the Import Tool as "postgres", but when I
try to import a shape file I get:

"Problem inserting features from file: (path to shape file)"

No other explanation!!!

Jack
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem Importing Shapefile to PostgreSQL

Jack Morris
Corrections/additions to my first post:

qgis version is 0.8.0
PostgreSQL version is 8.1.8
PostGIS is 1.1.2
Additional Items added to "database">schemas>public: one Trigger
Function [cache_bbox()] and two Operator Classes ("btree_geometry_ops"
and "gist_geometry_ops")

Jack

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem Importing Shapefile to PostgreSQL

Martin Dobias
In reply to this post by Jack Morris
Hi,

please report your problem to our bug tracking system and attach (or
link) also the shapefile you're trying to import.
https://svn.qgis.org/trac

Btw. yes, error reporting in the import tool is poor, that might be
another ticket :)

Martin

On 4/14/07, Jack Morris <[hidden email]> wrote:

> I am having problems importing shape files from QGIS to PostgreSQL using
> the Import Tool.
>
> I am using Ubuntu Edgy, PostgreSQL 8.1.4.
>
> I have successfully, I think, installed PostGIS and can see, using
> pgAdmin III, that I have added to my database: 14 Casts, and under
> Schemas>public: 9 Aggregates, 328 Functions, 17 Operators, 2 Tables
> (geometry_columns and spatial_ref_sys) and 7 Types. I can successfully
> connect to my database from the Import Tool as "postgres", but when I
> try to import a shape file I get:
>
> "Problem inserting features from file: (path to shape file)"
>
> No other explanation!!!
>
> Jack
> _______________________________________________
> Qgis-user mailing list
> [hidden email]
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
>
_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Reply | Threaded
Open this post in threaded view
|

Re: Problem Importing Shapefile to PostgreSQL

Jack Morris
Martin,

I have solved the problem!

First, I tried importing the majrivers shape file from the
"qgis_sample_data" folder and that worked fine. I noted that all the
file names in that folder are lower case and with no spaces. I, on the
other hand, have picked up (from windoze, no doubt) the habit of using
"plain english" file names, ie, Caps as appropriate and spaces within
multi-word names. I went back and changed all my file names to single,
lower case names and now they import just fine. Apparently, either the
Import Tool or PostgreSQL does not like "plain english" names.
Apparently SQL does not allow white space within object names unless the
name is quoted. I need to remember this in the future!

I will still enter a ticket about improving error reporting in the
Import Tool :-) .

Jack



Martin Dobias wrote:

> Hi,
>
> please report your problem to our bug tracking system and attach (or
> link) also the shapefile you're trying to import.
> https://svn.qgis.org/trac
>
> Btw. yes, error reporting in the import tool is poor, that might be
> another ticket :)
>
> Martin
>
> On 4/14/07, Jack Morris <[hidden email]> wrote:
>> I am having problems importing shape files from QGIS to PostgreSQL using
>> the Import Tool.
>>
>> I am using Ubuntu Edgy, PostgreSQL 8.1.4.
>>
>> I have successfully, I think, installed PostGIS and can see, using
>> pgAdmin III, that I have added to my database: 14 Casts, and under
>> Schemas>public: 9 Aggregates, 328 Functions, 17 Operators, 2 Tables
>> (geometry_columns and spatial_ref_sys) and 7 Types. I can successfully
>> connect to my database from the Import Tool as "postgres", but when I
>> try to import a shape file I get:
>>
>> "Problem inserting features from file: (path to shape file)"
>>
>> No other explanation!!!
>>
>> Jack
>> _______________________________________________
>> Qgis-user mailing list
>> [hidden email]
>> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
>>
>

_______________________________________________
Qgis-user mailing list
[hidden email]
http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user