[GRASS5] v.in.ogr behaviour
Stephan Holl
holl at gdf-hannover.de
Fri Mar 24 04:24:44 EST 2006
Hello marcos boullón magán,
On Thu, 23 Mar 2006 17:10:45 +0100 "marcos boullón magán"
<marcosboullon at gmail.com> wrote:
> Hello again,
>
> If you are still receiving a segfault with GRASS 6.1 cvs version in
> file lib/gis/key_value1.c, line 107, as said in a previous email, you
> can try the following patch (attached) to gather more information on
> the error conditions (but don't apply the Chos's patch!).
Thank you very much for your clear and very helpful explanation of what
was going in chos patch.
As I am now C-expert, it is now possible to understand the differences
between the two decalarations.
> The patch containts code to show the comparing strings process while
> running in G_find_key_value() function. Patch and compile as
> necessary, then in GRASS try v.out.ogr/v.in.ogr and compare your
> results with the attached ones:
>
> $ cd grass6/lib/gis
> $ patch < key_vect1.patch
> ...
> GRASS 6.1.cvs (spearfish60):~/cvsgrass/grass6 > v.out.ogr in=soils
> type=area dsn=/tmp/ olayer=soils 2> v.out.ogr.stderr.txt
> GRASS 6.1.cvs (spearfish60):~/cvsgrass/grass6 > md5sum /tmp/soils.shp
> 24a6c8a36089cfd661b417807546f8ba /tmp/soils.shp
> GRASS 6.1.cvs (spearfish60):~/cvsgrass/grass6 > v.in.ogr
> dsn=/tmp/soils.shp out=test1 2> v.in.ogr.stderr.txt
I have applied your patch and have the same behviour as yours with the
shapefile. The import works well.
BUT:
Using other datasources are getting more difficult.
I have a PostGIS-Point-dataset (EPSG:4326 -> latlon)
ogrinfo -al -summary "PG:dbname=postgis user=gdf" grass_users
INFO: Open of `PG:dbname=postgis user=gdf'
using driver `PostgreSQL' successful.
Layer name: grass_users
Geometry: Point
Feature Count: 32
Extent: (-155.605011, -77.280006) - (128.640015, 75.840004)
Layer SRS WKT:
GEOGCS["WGS 84",
DATUM["WGS_1984",
SPHEROID["WGS 84",6378137,298.257223563,
AUTHORITY["EPSG","7030"]],
AUTHORITY["EPSG","6326"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.01745329251994328,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4326"]]
gid: Integer (0.0)
x: Integer (0.0)
y: Integer (0.0)
name: String (0.0)
company: String (0.0)
which imports just fine into spearfish60 ?! This is aparently wrong.
Please see the debugging output attached (v.in.ogr_pgis.dmp).
So apparently GRASS identifies the dataset as utm (which is not true
as shown above from ogrinfo).
I have found another strange behaviour when trying to access
oracle-spatial through v.in.ogr. ogrinfo reports the correct
projection-information, but v.in.ogr segfaults while trying to compare
(null) -> segfault. (see v.in.ogr_oracle.dmp)
ogrinfo -al -summary -ro "OCI:user/pw at oracle.galileo"
DATA.SPEAR_SOILS
using driver `OCI' successful.
Layer name: DATA.SPEAR_SOILS
Geometry: Unknown (any)
Feature Count: 737
Extent: (589443.780000, 4913923.480000) - (609546.170000,
4928105.880000) Layer SRS WKT:
PROJCS["UTM Zone 13, Northern Hemisphere",
GEOGCS["clark66",
DATUM["North_American_Datum_1927",
SPHEROID["clark66",6378206.4,294.9786982]],
PRIMEM["Greenwich",0],
UNIT["Decimal Degree",0.0174532925199433]],
PROJECTION["Transverse_Mercator"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",-105],
PARAMETER["scale_factor",0.9996],
PARAMETER["false_easting",500000],
PARAMETER["false_northing",0],
UNIT["Meter",1]]
cat: Integer (11.0)
label: String (80.0)
At least for other datasources than shapefiles some
projection-quirks are there.
Your help is greatly appreciated.
Thank you very much.
Stephan
--
GDF Hannover - Solutions for spatial data analysis and remote sensing
Hannover Office - Mengendamm 16d - D-30177 Hannover
Internet: www.gdf-hannover.de - Email: holl at gdf-hannover.de
Phone : ++49-(0)511.39088507 - Fax: ++49-(0)511.39088508
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v.in.ogr_oracle.dmp
Type: application/octet-stream
Size: 98 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20060324/690bcbe0/v.in.ogr_oracle.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: v.in.ogr.pgis.dmp
Type: application/octet-stream
Size: 2700 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20060324/690bcbe0/v.in.ogr.pgis.obj
More information about the grass-dev
mailing list