Details Ticket 4898


Comment | Reply | Take | Open


Serial Number 4898
Subject g.proj -p segfaults because of missing datum name
Area grass6
Queue grass
Requestors mlennert@club.worldonline.be
Owner none
Status resolved
Last User Contact Mon Jul 24 17:25:37 2006 (2 yr ago)
Current Priority 30
Final Priority 70
Due No date assigned
Last Action Mon Jul 24 17:25:37 2006 (2 yr ago)
Created Mon Jul 24 15:21:19 2006 (2 yr ago)

Transaction History Ticket 4898


Mon, Jul 24 2006 15:21:19    Request created by guest  
Subject: g.proj -p segfaults because of missing datum name

Platform: GNU/Linux/x86
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: cvs_head_20060724

Trying to use the "Use georeferenced file" for new location definition in the
start-up screen I get a segfault.
Searching for the cause, I find that it's in the call to g.proj, as calling g.proj
-p on the file gives the following:

> g.proj -p UrbAdm_Mu.shp
Trying to open with GDAL...ERROR 4: `UrbAdm_Mu.shp' not recognised as a supported
file format.

Trying to open with OGR......succeeded.
WARNING: Datum 'unnamed' not recognised by GRASS and no parameters found.
         Datum transformation will not be possible using this projection
         information.
Segmentation fault

The warning comes from GPJ_osr_to_grass() which is in lib/proj/convert.c. I don't
know why it segfaults, though.

Do we absolutely need a datum name as the information contained in the .prj file
seems to be sufficient to create a location ?

ogrinfo gives the following on the file:

$ ogrinfo -so UrbAdm_Mu.shp UrbAdm_Mu
INFO: Open of `UrbAdm_Mu.shp'
using driver `ESRI Shapefile' successful.

Layer name: UrbAdm_Mu
Geometry: Polygon
Feature Count: 19
Extent: (141192.712000, 161464.403000) - (158005.472000, 178169.335000)
Layer SRS WKT:
PROJCS["Belge 1972 / Belgian Lambert 72",
    GEOGCS["unnamed",
        DATUM["unnamed",
            SPHEROID["International_1924",6378388,297.0000000000601]],
        PRIMEM["Greenwich",0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["standard_parallel_1",51.16666723333333],
    PARAMETER["standard_parallel_2",49.8333339],
    PARAMETER["latitude_of_origin",90],
    PARAMETER["central_meridian",4.367486666666666],
    PARAMETER["false_easting",150000.013],
    PARAMETER["false_northing",5400088.438],
    UNIT["Meter",1]]
MUID: Real (20.0)
POLID: Real (20.0)
REID: Real (20.0)
MUNC: String (5.0)
MU3C: String (3.0)
MUDN: String (24.0)
MUDNIN: String (2.0)
MUFN: String (24.0)
MUFNIN: String (2.0)


Moritz
Mon, Jul 24 2006 15:52:19    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <44C4D08E.5090906@club.worldonline.be>
Date Mon, 24 Jul 2006 15:52:14 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Thunderbird 1.5.0.2 (X11/20060516)
MIME-Version 1.0
To Request Tracker <grass-bugs@intevation.de>
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #4898] (grass) g.proj -p segfaults because of missing datum name
References <20060724132119.341ED1005B8@lists.intevation.de>
In-Reply-To <20060724132119.341ED1005B8@lists.intevation.de>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.469 tagged_above=-999 required=3 tests=[AWL=1.531, BAYES_00=-5]
X-Spam-Level
Request Tracker wrote:
> this bug's URL: http://intevation.de/rt/webrt?serial_num=4898
> -------------------------------------------------------------------------
> 
> Subject: g.proj -p segfaults because of missing datum name
> 
> Platform: GNU/Linux/x86
> grass obtained from: CVS
> grass binary for platform: Compiled from Sources
> GRASS Version: cvs_head_20060724
> 
> Trying to use the "Use georeferenced file" for new location definition in the
start-up screen I get a segfault.
> Searching for the cause, I find that it's in the call to g.proj, as calling
g.proj -p on the file gives the following:
> 
>> g.proj -p UrbAdm_Mu.shp
> Trying to open with GDAL...ERROR 4: `UrbAdm_Mu.shp' not recognised as a supported
file format.
> 
> Trying to open with OGR......succeeded.
> WARNING: Datum 'unnamed' not recognised by GRASS and no parameters found.
>          Datum transformation will not be possible using this projection
>          information.
> Segmentation fault
> 
> The warning comes from GPJ_osr_to_grass() which is in lib/proj/convert.c. I
don't know why it segfaults, though.
> 
> Do we absolutely need a datum name as the information contained in the .prj
file seems to be sufficient to create a location ?
> 

I tried introducing the datum name into the prj file and now I get:

A datum name bel72 (Reseau_National_Belge_1972) was specified without 
transformation parameters.
Note that the GRASS default for bel72 is 
towgs84=-99.1,53.3,-112.5,0.419,-0.830,1.885,-1.00.
Segmentation fault

Moritz


Mon, Jul 24 2006 16:07:46    Mail sent by guest  
Hello Moritz
The problem was in fact related to opening a file with OGR (nothing
datum-related). I think there was excessive freeing of memory going on and
have fixed it now - please test.

Paul
Mon, Jul 24 2006 16:21:45    Comments added by pkelly  
P.S. Thanks for the bug report!
Mon, Jul 24 2006 16:51:18    Mail sent by mlennert@club.worldonline.be  
Return-Path <mlennert@club.worldonline.be>
Delivered-To grass-bugs@lists.intevation.de
Message-ID <44C4DE71.8080103@club.worldonline.be>
Date Mon, 24 Jul 2006 16:51:29 +0200
From Moritz Lennert <mlennert@club.worldonline.be>
User-Agent Thunderbird 1.5.0.2 (X11/20060516)
MIME-Version 1.0
To guest user via RT <grass-bugs@intevation.de>
Cc grass-dev@grass.itc.it
Subject Re: [GRASS-dev] [bug #4898] (grass) g.proj -p segfaults
References <20060724140746.0D5421005C5@lists.intevation.de>
In-Reply-To <20060724140746.0D5421005C5@lists.intevation.de>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Virus-Scanned by amavisd-new at intevation.de
X-Spam-Status No, hits=-3.546 tagged_above=-999 required=3 tests=[AWL=1.454, BAYES_00=-5]
X-Spam-Level
guest user via RT wrote:
> Hello Moritz
> The problem was in fact related to opening a file with OGR (nothing
> datum-related). I think there was excessive freeing of memory going on and
> have fixed it now - please test.

Yes, now it works ! Thanks.

Moritz

> 
> Paul
> 
> 
> -------------------------------------------- Managed by Request Tracker
> 
> _______________________________________________
> grass-dev mailing list
> grass-dev@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev


Mon, Jul 24 2006 17:25:37    Status changed to resolved by msieczka  
Mon, Jul 24 2006 17:25:37    Mail sent by msieczka  
OK, closing it.

Maciek
Comment | Reply | Take | Open

You are currently authenticated as guest.
[Show Configuration] [Login as another user]

Users Guide - Mail Commands - Homepage of RequestTracker 1.0.7 - list any request