[fdo-dev] SHP provider

Haris Kurtagic haris at sl-king.com
Mon Oct 30 11:11:08 EST 2006


keep on (for example oracle occi reader would do some of this stuff)

Haris

-----Original Message-----
From: Traian Stanev [mailto:traian.stanev at autodesk.com] 
Sent: Monday, October 30, 2006 5:02 PM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] SHP provider


In my opinion, a feature reader should be allowed to return a decimal as
an Int32 if one calls the GetInt32 function instead of GetDecimal. Such
an upcast data conversion would be useful since it would reduce the
number of switch cases one needs (i.e. int8, int16 and int32 can all be
treated as regular integers). Also, one should be able to call GetString
for any data value, no matter its type to get a string representation of
the property value -- it is very often that one has to convert a value
to a string to display in UI etc. I can dream, can't I?


Traian

 

-----Original Message-----
From: Dan Stoica
Sent: Monday, October 30, 2006 10:32 AM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] SHP provider

Hi Haris,

You cannot map double to decimal or int64 to 4 bytes numeric without the
risk of data truncation. And this is unacceptable as any other data
corruption.

Dan.

-----Original Message-----
From: Haris Kurtagic [mailto:haris at sl-king.com]
Sent: Monday, October 30, 2006 7:24 AM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] SHP provider


Hi Pierre,

True, DBF has limited number of types, and for other data sources there
is also limited number and no exact match to fdo data types For example
in Oracle there is no boolean etc..
Match between db type and fdo type is no so strict, I think.
For example right now shp provider is matching dbf number to int32, why
not to int16 or int64.

I was thinking that when for example apply schema is executed some types
could be changed , I suppose single,double would go to decimal, int to
numeric, etc.

Haris 

-----Original Message-----
From: Pierre Dalcourt [mailto:pierre.dalcourt at autodesk.com]
Sent: Monday, October 30, 2006 1:15 PM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] SHP provider


Hi,

Its possible for SHP Provider to support more FDO data types.
However, you have to consider SHP/DBF limitations.  DBF only supports a
few types: numeric (stored in ascii format), string, blob, date, and
boolean.  To distinguish between int16/int32/int64 for example, you
would need to store some metadata indicating which of these types the
column represents.  There is (theoretically) no room for custom metadata
in the DBF/SHP files, although perhaps there is a way to hack around
that.  You would have to store metadata in a separate file.  There is
already code to store such information in an xml file, but it is
currently (mostly) disabled for technical reasons.  There are also other
considerations, such as the fact that since DBF stores numbers in ascii
format while FDO represents numbers in binary format, the range of
numbers you can store in FDO or DBF will never match up exactly.  Also,
you have to consider that applications outside your own will be
editing/creating SHP/DBF files which might break any artificial numeric
limits you impose since they are not aware of your metadata.

Pierre

-----Original Message-----
From: Haris Kurtagic [mailto:haris at sl-king.com]
Sent: October 29, 2006 11:56 AM
To: dev at fdo.osgeo.org
Subject: RE: [fdo-dev] SHP provider


As a meter a fact it is very simple, basically for shp provider data
store is the folder.
Apply schema will create shp files in folder (data store).

Anyhow I agree that this command should be implemented, it is important
to try to keep consistency across providers, to have a common level of
functionality as high as possible.

Haris

-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net] 
Sent: Sunday, October 29, 2006 2:46 PM
To: dev at fdo.osgeo.org
Subject: Re: [fdo-dev] SHP provider

Haris Kurtagic wrote:
> Hi,
> 
> Shape provider is suporting very limited range of fdo data type's.
> 
> I believe it is small change to add double,single int32,int64,..
> 
> Fdo shp provider is open for contributations ?

Haris, I'd like to join your question.
I'm also wondering the reason CreateDataStore command has not been
implemented yet.
Theoretically, it seems as not a big challenge, but I suppose there are
some details which I can't see but which make it tricky.
I'd be thankful for some comments from SHP provider developer(s).

Cheers
--
Mateusz Loskot
http://mateusz.loskot.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org For additional
commands, e-mail: dev-help at fdo.osgeo.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org
For additional commands, e-mail: dev-help at fdo.osgeo.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org
For additional commands, e-mail: dev-help at fdo.osgeo.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org
For additional commands, e-mail: dev-help at fdo.osgeo.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org
For additional commands, e-mail: dev-help at fdo.osgeo.org




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org
For additional commands, e-mail: dev-help at fdo.osgeo.org





More information about the Fdo-internals mailing list