Mon, Mar 20 2006
15:00:54
|
|
Request created by guest
|
|
Subject: Could not import a NB Double Stereographic shapefile - used EPSG #2036
Platform: GNU/Linux/x86
grass obtained from: Trento Italy site
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: Grass 6.1cvs 18-03-2006
I downloaded this shapefile:
https://www.web11.snb.ca/topo/aadb/shape/nbaa_5000_ranb.zip
The shapefile is in New Brunswick Double Stereographic, NAD83 CSRS98 (Canadian
Spatial Reference System 1998)
This shapefile comes from a municipal government site, so is highly likely that
the shapefile is in the projection is says it is. Or at least it's not suspect
at this point.
Reading the .prj file shows that the projection is indeed New Brunswick Double
Stereographic. I created a new Location using EPSG code #2036, which seemed to
match the shapefile's projection parameter-for-parameter. Imported shapefile
into Location using:
v.in.ogr dsn=shapefile_directory output=nbaa_5000_ranb layer=nbaa_5000_ranb
and received a seg fault, with no other error information. Importing the shapefile
using the 'location' parameter in v.in.ogr also gives a seg fault, with no feedback.
Normally I would think that the problem is a projection mismatch, but I can't
detect any differences here. ?
Additional info: my 'dsn' parameter is 62 characters long. Does this exceed the
maximum allowed for this parameter, perhaps?
~ Eric Patton |
|
Tue, Mar 21 2006
00:06:01
|
|
Mail sent by mneteler
|
|
Eric,
it would be a great help if you could do some debugging. I have
drafted an illustrated howto here for "ddd", the graphical frontend
to gdb:
http://grass.gdf-hannover.de/twiki/bin/view/GRASS/GrassDebugging#Using_DDD_gdb_graphical_frontend
Maybe you can give it a try, at least to figure out where is crashes?
thanks
Markus
PS: I tried the file, it killed my Xserver in QGIS - wow |
|
Tue, Mar 21 2006
02:30:14
|
|
Mail sent by hamish_nospam@yahoo.com
|
|
Return-Path |
<hamish_nospam@yahoo.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Tue, 21 Mar 2006 13:29:58 +1200
|
From |
Hamish <hamish_nospam@yahoo.com>
|
To |
Request Tracker <grass-bugs@intevation.de>
|
Cc |
grass5@grass.itc.it
|
Subject |
Re: [GRASS5] [bug #4190] (grass) Could not import a NB Double Stereographic shapefile - used EPSG #2036
|
Message-Id |
<20060321132958.66dae35f.hamish_nospam@yahoo.com>
|
In-Reply-To |
<20060320140054.476B51005AC@lists.intevation.de>
|
References |
<20060320140054.476B51005AC@lists.intevation.de>
|
X-Mailer |
Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
|
X-Face |
M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
|
Mime-Version |
1.0
|
Content-Type |
text/plain; charset=US-ASCII
|
Content-Transfer-Encoding |
7bit
|
X-Spam-Status |
No, hits=-1.3 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD, SUBJ_HAS_UNIQ_ID
|
X-Spam-Level |
|
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4190
> ---------------------------------------------------------------------
>
> Subject: Could not import a NB Double Stereographic shapefile - used
> EPSG #2036
>
> Platform: GNU/Linux/x86
> grass obtained from: Trento Italy site
> grass binary for platform: Downloaded precompiled Binaries
> GRASS Version: Grass 6.1cvs 18-03-2006
>
> I downloaded this shapefile:
>
> https://www.web11.snb.ca/topo/aadb/shape/nbaa_5000_ranb.zip
>
> The shapefile is in New Brunswick Double Stereographic, NAD83 CSRS98
> (Canadian Spatial Reference System 1998)
>
> This shapefile comes from a municipal government site, so is highly
> likely that the shapefile is in the projection is says it is. Or at
> least it's not suspect at this point.
>
> Reading the .prj file shows that the projection is indeed New
> Brunswick Double Stereographic. I created a new Location using EPSG
> code #2036, which seemed to match the shapefile's projection
> parameter-for-parameter. Imported shapefile into Location using:
>
> v.in.ogr dsn=shapefile_directory output=nbaa_5000_ranb
> layer=nbaa_5000_ranb
>
> and received a seg fault, with no other error information. Importing
> the shapefile using the 'location' parameter in v.in.ogr also gives a
> seg fault, with no feedback.
what happens if you try looking at it with 'ogrinfo' ?
also, maybe quicker for you, the above can just be:
v.in.ogr dsn=directory/file.shp out=map # and no layer=
Hamish
|
|
Tue, Mar 21 2006
02:31:29
|
|
Mail sent by hamish_nospam@yahoo.com
|
|
Return-Path |
<hamish_nospam@yahoo.com>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Date |
Tue, 21 Mar 2006 13:31:24 +1200
|
From |
Hamish <hamish_nospam@yahoo.com>
|
To |
Request Tracker <grass-bugs@intevation.de>
|
Subject |
Re: [GRASS5] [bug #4190] (grass) Could not import a NB Double Stereographic shapefile - used EPSG #2036
|
Message-Id |
<20060321133124.1155f71d.hamish_nospam@yahoo.com>
|
In-Reply-To |
<20060320140054.476B51005AC@lists.intevation.de>
|
References |
<20060320140054.476B51005AC@lists.intevation.de>
|
X-Mailer |
Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-pc-linux-gnu)
|
X-Face |
M<EoB)"*Z~u!,vFhXmw}R_KbdBta*P_=T|rbBL'e1/CQ9;/1g\BU3&!=y8ria$2Uk!HT&BB 8i?|X_+7~1jsy}F~g$2va%3fV`*=L(*cem[@3\yg,G,@rg6/QMJ
|
Mime-Version |
1.0
|
Content-Type |
text/plain; charset=US-ASCII
|
Content-Transfer-Encoding |
7bit
|
X-Spam-Status |
No, hits=-1.3 tagged_above=-999.0 required=3.0 tests=BAYES_00, FORGED_YAHOO_RCVD, SUBJ_HAS_UNIQ_ID
|
X-Spam-Level |
|
> Additional info: my 'dsn' parameter is 62 characters long. Does this
> exceed the maximum allowed for this parameter, perhaps?
test:
cd dir
v.in.ogr dsn=foo.shp
?
Hamish
|
|
Tue, Mar 21 2006
11:49:09
|
|
Mail sent by guest
|
|
Hi,
I have tried to import the SHAPE file:
v.in.ogr nbaa_5000_ranb.shp out=nbaa loc=new_brunswick
Segmentation Fault.
Using 'ddd', I found:
0xb7791448 in strcmp () from /lib/tls/libc.so.6
(gdb) up
#1 0xb78c2515 in G_find_key_value (key=0x0, kv=0x80794e8) at key_value1.c:107
/home/neteler/soft/61grass_cvsexp/lib/gis/key_value1.c:107:2013:beg:0xb78c2515
It happens here:
char *G_find_key_value (char *key, struct Key_Value *kv)
{
int n;
for (n = 0; n < kv->nitems; n++)
if (strcmp (key, kv->key[n]) == 0) <----------- ZAP!
return kv->value[n][0] ? kv->value[n] : NULL;
return NULL;
}
while n is 0.
It is called in lib/proj/convert.c:352
sprintf(path,"%s/etc/projections",G_gisbase());
if( G_lookup_key_value_from_file(path,pszProj,name,sizeof(name)) > 0
)
At this stage 'pszProj' is empty (huh).
This is called in v.in.ogr/main.c here in line 371:
if ( GPJ_osr_to_grass( &cellhd, &proj_info,
&proj_units, Ogr_projection, 1) < 0 )
where Ogr_projection is empty (huh) because above
Ogr_projection = OGR_L_GetSpatialRef(Ogr_layer);
but Ogr_layer is empty (huh!!).
Apparently
/* Open OGR DSN */
Ogr_ds = OGROpen( dsn_opt->answer, FALSE, NULL );
if ( Ogr_ds == NULL ) G_fatal_error (_("Cannot open data source: %s"),
dsn_opt->answer);
fails.
According to
http://www.gdal.org/ogr/ogr__api_8h.html#82ff6956f7e39436cc7d6550247435d5
the OGROpen() function isn't used correctly.
I'll try and report back.
This sort of bug was also reported by others to me.
Markus
|
|
Tue, Mar 21 2006
12:18:49
|
|
Mail sent by epatton@nrcan.gc.ca
|
|
Return-Path |
<epatton@nrcan.gc.ca>
|
Delivered-To |
grass-bugs@lists.intevation.de
|
Message-ID |
<0E5A77B55A57D511BB3F0002A537C262064110BB@s5-dar-r1.nrn.nrcan.gc.ca>
|
From |
"Patton, Eric" <epatton@nrcan.gc.ca>
|
To |
'Markus Neteler via RT ' <grass-bugs@intevation.de>, "Patton, Eric" <epatton@nrcan.gc.ca>
|
Cc |
"'grass5@grass.itc.it '" <grass5@grass.itc.it>
|
Subject |
RE: [bug #4190] (grass) Could not import a NB Double Stereographi c shapefile - used EPSG #2036
|
Date |
Tue, 21 Mar 2006 07:18:46 -0400
|
MIME-Version |
1.0
|
X-Mailer |
Internet Mail Service (5.5.2657.72)
|
X-Envelope-From |
rt@intevation.de
|
X-Envelope-To |
rt@intevation.de
|
X-Sender |
rt@intevation.de
|
Content-Type |
text/plain; charset="iso-8859-1"
|
X-Spam-Status |
No, hits=-2.2 tagged_above=-999.0 required=3.0 tests=BAYES_00, SUBJ_HAS_UNIQ_ID
|
X-Spam-Level |
|
Markus, I'll give ddd a try and see what I can find out!
thanks,
~ Eric.
-----Original Message-----
From: Markus Neteler via RT
To: epatton@nrcan.gc.ca
Cc: grass5@grass.itc.it
Sent: 3/20/2006 6:06 PM
Subject: [bug #4190] (grass) Could not import a NB Double Stereographic
shapefile - used EPSG #2036
Eric,
it would be a great help if you could do some debugging. I have
drafted an illustrated howto here for "ddd", the graphical frontend
to gdb:
http://grass.gdf-hannover.de/twiki/bin/view/GRASS/GrassDebugging#Using_D
DD_gdb_graphical_frontend
Maybe you can give it a try, at least to figure out where is crashes?
thanks
Markus
PS: I tried the file, it killed my Xserver in QGIS - wow
-------------------------------------------- Managed by Request Tracker
|
|
Tue, Mar 21 2006
12:32:22
|
|
Mail sent by mneteler
|
|
Hi again,
apparently the OGROpen() is used correctly (the example on
the ogr page was a bit misleading to me) but doesn't work
as Ogr_ds doesn't contain what it should. It is not NULL,
but its content points to 0x0.
# import:
v.in.ogr ~/tmp/nbaa_5000_ranb.shp out=nbaa loc=new_brunswick
Segmentation fault
Since Ogr_ds is sort of empty, it must crash.
The good question is why ogrinfo can open it, but v.in.ogr not.
I am trying it with GDAL and PROJ from CVS (where the EPSG was
recently updated).
CC'ed to Frank.
Markus |
|
Tue, Mar 21 2006
12:52:15
|
|
Comments added by sholl
|
|
Hi
this seems similar to my problem [1] which is also segfaulting on the exact
same position.
I wll try Markus recently commited fix and report back.
Best
Stephan
[1] http://grass.itc.it/pipermail/grass5/2006-March/021775.html |
|
Tue, Mar 21 2006
13:30:38
|
|
Comments added by sholl
|
|
Hi
Markus recent fix does not solve our v.in.ogr-related problem. there is still
a segfault.
Best
Stephan
|
|
Wed, Mar 22 2006
10:00:06
|
|
User changed to epatton@nrcan.gc.ca,holl@gdf-hannover.de by mneteler
|
|
Thu, Aug 3 2006
03:27:47
|
|
Mail sent by guest
|
|
Actually, I am happy to report that this bug is now fixed for me; I can
successfully import a New Brunswick double stereographic shapefile into an
EPSG #2036 location. No errors, and the shapefile extents look good -
attributes can be queried with no problems. Should this bug report be closed
because my initial bug is fixed, or should we rename it because of Stephan's
problem?
~ Eric.
<epatton at nrcan dot gc dot ca> |
|
Thu, Aug 3 2006
15:58:59
|
|
Mail sent by msieczka
|
|
Eric wrote:
> Actually, I am happy to report that this bug is now fixed for me;
Cool.
> Should this bug report be closed because my initial bug is fixed, or should
> we rename it because of Stephan's problem?
Let's not close as it seems a wider problem. I read the whole
http://grass.itc.it/pipermail/grass5/2006-March/021775.html thread and still
don't quite get it.
Stephan, please update the information. If the problem is still valid, what
bug title would you suggest? (CC me: tutey at o2.pl).
Maciek
|
|
Thu, Aug 3 2006
20:24:39
|
|
Mail sent by sholl
|
|
msieczka wrote (Thu, Aug 3 2006 15:58:59):
> Eric wrote:
>
> > Actually, I am happy to report that this bug is now fixed for me;
>
> Cool.
>
> > Should this bug report be closed because my initial bug is fixed, or should
> > we rename it because of Stephan's problem?
>
> Let's not close as it seems a wider problem. I read the whole
> http://grass.itc.it/pipermail/grass5/2006-March/021775.html thread and still
> don't quite get it.
>
> Stephan, please update the information. If the problem is still valid, what
> bug title would you suggest? (CC me: tutey at o2.pl).
It _seems_ that at least the segfault corresponding to projection issues was
sorted out. Paul has added a warning in early May 2006.
For me it seems similar to bug #4564, which is still running on my large
dataset constantly swapping.
We could close this one and work on #4564 with this issue?
Stephan
|
|
Thu, Aug 3 2006
22:08:10
|
|
Status changed to resolved by msieczka
|
|
Thu, Aug 3 2006
22:08:10
|
|
Mail sent by msieczka
|
|
Closing then. Cheers.
Maciek
|
|