[gdal-dev] unable to append data to orale spatial

Imran Rajjad rajjad at gmail.com
Thu Aug 12 03:47:31 EDT 2010


Hi,

the orignal table is 2 dimensioned, but the features I`m appending hav
3d, though I thought the -lco DIM=2 option would take care of that,
well it seems for now I have to convert 3d to 2d in Oracle 11g using
the method defined at
http://forums.oracle.com/forums/thread.jspa?messageID=960492&#960492
.. it has worked for me , but all this is too much time on the
consoles.

thanks a lot
regards,
Imran

On Thu, Aug 12, 2010 at 12:37 PM, Peter J Halls <P.Halls at york.ac.uk> wrote:
> Imran,
>
>   is the initial table two or three dimensioned?
>
>   Most of the shapefiles I've looked at have been generated by some ESRI
> product or other ... In my experience, shapefiles are usually x-y-z-m, so
> three dimensional geometry is a sensible default.
>
>   It might be worth checking the OGR TRAC buglist ... I've a vague
> recollection that at some version or other there may have been an issue
> regarding appending a non-default coordinate dimension, but do not recall
> whether that was ogr2ogr - which I use rarely - or an issue when programming
> with the OGR API.
>
> Best wishes,
>
> Peter
>
> Imran Rajjad wrote:
>>
>> hi,
>>
>> I have appended the data but the -lco DIM=2 option does not seem to
>> make any effect, when I`m dumping records into my table, some of them
>> have sdo_gtype set to 3001 which is suppose to be 2001 and also an
>> extra Z cordinate is also appearing but I`m sure I have mentioned the
>> dimension, could there be a problem with the syntax here?
>>
>>
>> ogr2ogr -f OCI OCI:usr/pas at ip:port/db file.shp -append -skipfailure
>> -lco SRID=8307 -lco DIM=2 -lco GEOMETRY_NAME=GEOM -nln ASIA_POI
>>
>>
>>
>>
>> regards,
>> Imran
>>
>> On Wed, Aug 11, 2010 at 11:50 AM, Peter J Halls <P.Halls at york.ac.uk>
>> wrote:
>>>
>>> Imran,
>>>
>>> Imran Rajjad wrote:
>>>>
>>>> Hi,
>>>>
>>>> yes I figured that out, for now I just drop the index added initialy
>>>> and I append new data to the table, though I`m not very optimistic
>>>
>>> That is sensible: drop spatial index, update table, update
>>> SDO_GEOM_METADATA
>>> and recreate spatial index.  There was a related bug in ArcGIS a version
>>> or
>>> two back where the workaround published by ESRI was to do this same
>>> sequence!
>>>
>>> Best wishes,
>>>
>>> Peter
>>>
>>>> about not getting any more trouble when publish this table in
>>>> geoserver.
>>>>
>>>> regards,
>>>> Imran
>>>>
>>>> On Wed, Aug 11, 2010 at 11:25 AM, Peter J Halls <P.Halls at york.ac.uk>
>>>> wrote:
>>>>>
>>>>> Imran,
>>>>>
>>>>>  in the documentation for the OCI Driver it says clearly that the
>>>>> spatial
>>>>> extent and SDO_GEOM_METADATA entries are not updated when using append
>>>>> mode
>>>>> and that it is up to the caller to manage these.
>>>>>
>>>>>  It is actually quite easy to code for this, but does require an
>>>>> SQLExecute
>>>>> to handle SDO_GEOM_METADATA.  I simply generate this on the fly, along
>>>>> with
>>>>> the SQL to update the spatial index.
>>>>>
>>>>> Best wishes,
>>>>>
>>>>> Peter
>>>>>
>>>>> Imran Rajjad wrote:
>>>>>>
>>>>>> Hi list,
>>>>>>
>>>>>> I inserted a shape file in oracle 11g, now I have another shape file
>>>>>> with exactly same attributes, I`m using the -append option but it
>>>>>> seems the new shapefile wont get appended to the table, there seems to
>>>>>> be some problem related to the spatial index because data in both
>>>>>> shape files does not come under same spatial extent, is there anyway
>>>>>> to tell gdal not to create spatial index when data is being inserted
>>>>>> and when all the data has been inserted we create the spatial index
>>>>>> manualy?
>>>>>>
>>>>>> regards,
>>>>>> Imran
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>> Peter J Halls, GIS Advisor, University of York
>>>>> Telephone: 01904 433806     Fax: 01904 433740
>>>>> Snail mail: IT Services, University of York, Heslington, York YO10 5DD
>>>>> This message has the status of a private and personal communication
>>>>>
>>>>>
>>>>> --------------------------------------------------------------------------------
>>>>>
>>>>
>>>>
>>> --
>>>
>>> --------------------------------------------------------------------------------
>>> Peter J Halls, GIS Advisor, University of York
>>> Telephone: 01904 433806     Fax: 01904 433740
>>> Snail mail: IT Services, University of York, Heslington, York YO10 5DD
>>> This message has the status of a private and personal communication
>>>
>>> --------------------------------------------------------------------------------
>>>
>>
>>
>>
>
> --
> --------------------------------------------------------------------------------
> Peter J Halls, GIS Advisor, University of York
> Telephone: 01904 433806     Fax: 01904 433740
> Snail mail: IT Services, University of York, Heslington, York YO10 5DD
> This message has the status of a private and personal communication
> --------------------------------------------------------------------------------
>



-- 
I.R


More information about the gdal-dev mailing list