Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
init_spacialite.sql primary key error
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  4 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
AdamG  
View profile  
 More options Sep 11 2009, 11:35 am
From: AdamG <agree...@gmail.com>
Date: Fri, 11 Sep 2009 08:35:47 -0700 (PDT)
Local: Fri, Sep 11 2009 11:35 am
Subject: init_spacialite.sql primary key error
Hello - I'm new to this group and new to SpaciaLite; I currently use
Postgres, PostGIS and Django, and am looking forward to experimenting
with SpatiaLite.

I'm having difficulties with the installation, however. Running
init_spatialite.sql yields a primary key error at row 24. I found this
file at http://www.gaia-gis.it/spatialite-2.2/index.html. I've tried
the .sql from 2.0,2.1,and 2.2 and all result in the same constraint
violation.

I saw this error mentioned in a comment on one of the tutorials, but
there was no response.

Has anyone else encountered and solved this issue?

Thanks in advance,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
NiceDogE  
View profile  
 More options Sep 13 2009, 8:29 pm
From: NiceDogE <bwil...@gmail.com>
Date: Sun, 13 Sep 2009 17:29:38 -0700 (PDT)
Local: Sun, Sep 13 2009 8:29 pm
Subject: Re: init_spacialite.sql primary key error
How did you create the new SQLite database....was it using the
SpatiaLite GUI / SpatiaLite CLI?  Or was it through a SQLite GUI or
SQLite CLI?

If you are using the SpatiaLite GUI/CLI to create a new DB file, then
you don't need to run the Init_spatialite.sql script separately, this
is automatically done for you whenever you create a new DB......re-
running it I suspect would give constraint violations as the tables
the script is trying to populate are already pre-populated.

You only ever need to run Init_spatialite.sql if you have created the
DB using SQLite instead.

On Sep 12, 1:35 am, AdamG <agree...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
a.furi...@lqt.it  
View profile  
 More options Sep 14 2009, 3:25 am
From: a.furi...@lqt.it
Date: Mon, 14 Sep 2009 09:25:06 +0200
Local: Mon, Sep 14 2009 3:25 am
Subject: Re: [SpatiaLite-Users] Re: init_spacialite.sql primary key error
Hi,
just a few points to be kept in mind.

The 'init_spatialite.sql' script simply creates the
metadata tables 'geometry_columns' and 'spatial_ref_sys',
inserting all the EPSG defs (SRIDs) into this latest one
table.

Metadata tables are required in order to fully support
Geometries and Spatial operators, so you have to create
(and properly feed) them each time you'll create a new
database (if you already use PostGIS you are surely
already familiar with such metadata tables).

But starting since v.2.3.0 the GUI tools 'spatialite-gui'
and 'spatialite-gis' silently create and feed the metadata
tables during the database creation phase:
so running the 'init_spatialite.sql' script as a separate
step isn't any longer required.

Quite obviously, if you try to execute this script on an
already initialized DB you'll get some error, because you
are actually attempting to re-create an already existing table,
and/or to insert duplicate primary keys into 'spatial_ref_sys'.

Hint: check your DB; if it already contains the 'geometry_columns'
and 'spatial_ref_sys' tables there is no need at all to
run the 'init_spatialite.sql' script, because any initialization
task has been already performed by the GUI tool.

bye,
Sandro


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Adam Green  
View profile  
 More options Sep 14 2009, 9:14 am
From: Adam Green <agree...@gmail.com>
Date: Mon, 14 Sep 2009 09:14:00 -0400
Subject: Re: [SpatiaLite-Users] Re: init_spacialite.sql primary key error

Thanks to all for the replies - after reading, the error makes complete
sense. I think the instructions I was reading must have been dated. A
cursory check of spatial_ref_sys shows that all of the SRIDs in
init_spacialite are present, hence the pk error.

Thanks again,
Adam


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »