Custom Wkt projection: bad datum

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Custom Wkt projection: bad datum

Rémi Cresson
Hi,

I'm new to OSSIM, but I noticed something not working when using a particular custom wkt projection:

Situation:
-I have some MODIS product (MOD13Q1 to be more specific) which has a custom wkt projection (here it is http://pastebin.com/U9qqMEcJ)
-I want to use OSSIM to deal with this custom projection

Problem:
-OSSIM does not handle correctly the datum: instead of using the custom spheroid, which has a zero-flattening parameter (i.e. a sphere), it uses a WGS84 ellipsoid (i.e. an ellipsoid)...

I have noticed it from code, but it can be quickly showed with the ossim-info application.
Here is (part of) the output of ossim-info:

[...]
image0.datum:  WGE
[...]
image0.ellipse_code:  WE
image0.ellipse_name:  WGS 84
[...]
image0.major_axis:  6378137.000000000000000
[...]
image0.minor_axis:  6356752.314199999906123
[...]


So obviously, OSSIM does not use correctly this wkt. As I said first, I don't know well OSSIM, but it should be able to handle this kind of wkt?
Should I file bug on your tracker? I wonder to fix this.

Thanks in advance,
Cheers

Rémi

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Custom Wkt projection: bad datum

David Burken
Hi Rémi,

Currently no way to add a custom ellipsoid to ossim.  We should add but not in code right now that I know of.  You're not the first to asks.    As for the ossim info return, it should not of given you a projection at all.  Did it?  Just curious.

// Example from ossim-info -p <image>:

image0.geometry.projection.type:  ossimEquDistCylProjection

Take care,
Dave

On 11/26/2014 09:05 AM, Rémi Cresson wrote:
Hi,

I'm new to OSSIM, but I noticed something not working when using a particular custom wkt projection:

Situation:
-I have some MODIS product (MOD13Q1 to be more specific) which has a custom wkt projection (here it is http://pastebin.com/U9qqMEcJ)
-I want to use OSSIM to deal with this custom projection

Problem:
-OSSIM does not handle correctly the datum: instead of using the custom spheroid, which has a zero-flattening parameter (i.e. a sphere), it uses a WGS84 ellipsoid (i.e. an ellipsoid)...

I have noticed it from code, but it can be quickly showed with the ossim-info application.
Here is (part of) the output of ossim-info:

[...]
image0.datum:  WGE
[...]
image0.ellipse_code:  WE
image0.ellipse_name:  WGS 84
[...]
image0.major_axis:  6378137.000000000000000
[...]
image0.minor_axis:  6356752.314199999906123
[...]


So obviously, OSSIM does not use correctly this wkt. As I said first, I don't know well OSSIM, but it should be able to handle this kind of wkt?
Should I file bug on your tracker? I wonder to fix this.

Thanks in advance,
Cheers

Rémi


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Custom Wkt projection: bad datum

Rémi Cresson
Hi David,

You can see the complete output of ossim-info -p <myfile> here: http://pastebin.com/LxtHB9Rw
As you can see there is no image0.geometry.projection.type field... is that what you mean by "it should not of given you a projection at all" ?

As far as I understand, the WGS84 ellipsoid is used by default when there is a custom one... Is that it?

Many thanks,

Rémi


On 30/11/2014 00:07, David Burken wrote:
Hi Rémi,

Currently no way to add a custom ellipsoid to ossim.  We should add but not in code right now that I know of.  You're not the first to asks.    As for the ossim info return, it should not of given you a projection at all.  Did it?  Just curious.

// Example from ossim-info -p <image>:

image0.geometry.projection.type:  ossimEquDistCylProjection

Take care,
Dave

On 11/26/2014 09:05 AM, Rémi Cresson wrote:
Hi,

I'm new to OSSIM, but I noticed something not working when using a particular custom wkt projection:

Situation:
-I have some MODIS product (MOD13Q1 to be more specific) which has a custom wkt projection (here it is http://pastebin.com/U9qqMEcJ)
-I want to use OSSIM to deal with this custom projection

Problem:
-OSSIM does not handle correctly the datum: instead of using the custom spheroid, which has a zero-flattening parameter (i.e. a sphere), it uses a WGS84 ellipsoid (i.e. an ellipsoid)...

I have noticed it from code, but it can be quickly showed with the ossim-info application.
Here is (part of) the output of ossim-info:

[...]
image0.datum:  WGE
[...]
image0.ellipse_code:  WE
image0.ellipse_name:  WGS 84
[...]
image0.major_axis:  6378137.000000000000000
[...]
image0.minor_axis:  6356752.314199999906123
[...]


So obviously, OSSIM does not use correctly this wkt. As I said first, I don't know well OSSIM, but it should be able to handle this kind of wkt?
Should I file bug on your tracker? I wonder to fix this.

Thanks in advance,
Cheers

Rémi


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Custom Wkt projection: bad datum

David Burken

On 12/01/2014 04:50 AM, Rémi Cresson wrote:
Hi David,

You can see the complete output of ossim-info -p <myfile> here: http://pastebin.com/LxtHB9Rw
As you can see there is no image0.geometry.projection.type field... is that what you mean by "it should not of given you a projection at all" ?
Line 28:

image0.geometry.projection.type:  ossimSinusoidalProjection


As far as I understand, the WGS84 ellipsoid is used by default when there is a custom one... Is that it?
It's used by default because the ellipsoid factory could not make your custom one.

The only way to fix is with code...
Dave


Many thanks,

Rémi


On 30/11/2014 00:07, David Burken wrote:
Hi Rémi,

Currently no way to add a custom ellipsoid to ossim.  We should add but not in code right now that I know of.  You're not the first to asks.    As for the ossim info return, it should not of given you a projection at all.  Did it?  Just curious.

// Example from ossim-info -p <image>:

image0.geometry.projection.type:  ossimEquDistCylProjection

Take care,
Dave

On 11/26/2014 09:05 AM, Rémi Cresson wrote:
Hi,

I'm new to OSSIM, but I noticed something not working when using a particular custom wkt projection:

Situation:
-I have some MODIS product (MOD13Q1 to be more specific) which has a custom wkt projection (here it is http://pastebin.com/U9qqMEcJ)
-I want to use OSSIM to deal with this custom projection

Problem:
-OSSIM does not handle correctly the datum: instead of using the custom spheroid, which has a zero-flattening parameter (i.e. a sphere), it uses a WGS84 ellipsoid (i.e. an ellipsoid)...

I have noticed it from code, but it can be quickly showed with the ossim-info application.
Here is (part of) the output of ossim-info:

[...]
image0.datum:  WGE
[...]
image0.ellipse_code:  WE
image0.ellipse_name:  WGS 84
[...]
image0.major_axis:  6378137.000000000000000
[...]
image0.minor_axis:  6356752.314199999906123
[...]


So obviously, OSSIM does not use correctly this wkt. As I said first, I don't know well OSSIM, but it should be able to handle this kind of wkt?
Should I file bug on your tracker? I wonder to fix this.

Thanks in advance,
Cheers

Rémi


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Custom Wkt projection: bad datum

Oscar Kramer
Remi,

I'm confused when you say you are not seeing an image0.geometry.projection.type field. Your output does have this field defined to "ossimSinusoidalProjection". I ask because in fact OSSIM is currently not handling that projection type from a WKT spec so I wonder how you got it to recognize that output using the WKT you posted. Did you do something special (like define a geom file)?

Oscar


From: David Burken <[hidden email]>
To: Rémi Cresson <[hidden email]>; [hidden email]
Sent: Monday, December 1, 2014 7:51 PM
Subject: Re: [OSSIM] Custom Wkt projection: bad datum


On 12/01/2014 04:50 AM, Rémi Cresson wrote:
Hi David,

You can see the complete output of ossim-info -p <myfile> here: http://pastebin.com/LxtHB9Rw
As you can see there is no image0.geometry.projection.type field... is that what you mean by "it should not of given you a projection at all" ?
Line 28:

image0.geometry.projection.type:  ossimSinusoidalProjection


As far as I understand, the WGS84 ellipsoid is used by default when there is a custom one... Is that it?
It's used by default because the ellipsoid factory could not make your custom one.

The only way to fix is with code...
Dave





Many thanks,

Rémi


On 30/11/2014 00:07, David Burken wrote:
Hi Rémi,

Currently no way to add a custom ellipsoid to ossim.  We should add but not in code right now that I know of.  You're not the first to asks.    As for the ossim info return, it should not of given you a projection at all.  Did it?  Just curious.

// Example from ossim-info -p <image>:

image0.geometry.projection.type:  ossimEquDistCylProjection

Take care,
Dave

On 11/26/2014 09:05 AM, Rémi Cresson wrote:
Hi,

I'm new to OSSIM, but I noticed something not working when using a particular custom wkt projection:

Situation:
-I have some MODIS product (MOD13Q1 to be more specific) which has a custom wkt projection (here it is http://pastebin.com/U9qqMEcJ)
-I want to use OSSIM to deal with this custom projection

Problem:
-OSSIM does not handle correctly the datum: instead of using the custom spheroid, which has a zero-flattening parameter (i.e. a sphere), it uses a WGS84 ellipsoid (i.e. an ellipsoid)...

I have noticed it from code, but it can be quickly showed with the ossim-info application.
Here is (part of) the output of ossim-info:

[...]
image0.datum:  WGE
[...]
image0.ellipse_code:  WE
image0.ellipse_name:  WGS 84
[...]
image0.major_axis:  6378137.000000000000000
[...]
image0.minor_axis:  6356752.314199999906123
[...]


So obviously, OSSIM does not use correctly this wkt. As I said first, I don't know well OSSIM, but it should be able to handle this kind of wkt?
Should I file bug on your tracker? I wonder to fix this.

Thanks in advance,
Cheers

Rémi


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk


_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer




------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk

_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer



------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer
Reply | Threaded
Open this post in threaded view
|

Re: Custom Wkt projection: bad datum

Rémi Cresson
 Hi Oscar,

Sorry, I didn't check properly the output... Of course there is a image0.geometry.projection.type field !
Attached is the discussion I had with David (I guess I forgot to reply to the mailing list!)

Rémi

------------------------------------------------------------------------

Hey good luck...

On 12/2/14, 12:55 PM, Rémi Cresson wrote:

> Hi David,
>
> I will try this little hack! I will take a closer look to the code now.
> Maybe I will come back to you if I encounter too many difficulties,
> but let's say it should be OK.
>
> Thank you for the support !
>
> Rémi
>
> On 02/12/2014 16:40, David Burken wrote:
>> Hi Rémi,
>>
>> On 12/2/14, 5:23 AM, Rémi Cresson wrote:
>>> Hi David,
>>>
>>>>
>>>> On 12/01/2014 04:50 AM, Rémi Cresson wrote:
>>>>> Hi David,
>>>>>
>>>>> You can see the complete output of ossim-info -p <myfile> here:
>>>>> pastebin.com/LxtHB9Rw
>>>>> As you can see there is no image0.geometry.projection.type
>>>>> field... is that what you mean by "it should not of given you a
>>>>> projection at all" ?
>>>> Line 28:
>>>>
>>>> image0.geometry.projection.type: ossimSinusoidalProjection
>>> Oops. I guess I had something stuck in my eye yesterday...
>>>
>>>>
>>>>>
>>>>> As far as I understand, the WGS84 ellipsoid is used by default
>>>>> when there is a custom one... Is that it?
>>>> It's used by default because the ellipsoid factory could not make
>>>> your custom one.
>>> So ossim does not parse ellipsoid parameters in the wkt string, and
>>> it deals only with existing EPSGs isn't it?
>>> (I take a look to ossimEllispoidFactory.cpp, and AFAIK, ellipsoid
>>> parameters are not passed to ossimEllipsoidFactory::create(): only
>>> the EPSG code is?)
>>>>
>> Correct. Ossim currently does not have custom ellipsoid support.
>>>> The only way to fix is with code...
>>>> Dave
>>>>
>>>
>>> Could a workaround be:
>>> 1. Add a custom ellispoid in ossim factory (ossimElipsoidFactory.cpp?)
>>> 2. Modify the ellipsoid string in the wkt before projection
>>> instanciation, in order to make it understandable by the ossim
>>> ellipsoid factory
>>> This is more a hack than a proper fix..
>>> If I am wrong with my previous assumption (about
>>> ossimEllipsoidFactory::create()), maybe a general solution for
>>> custom ellipsoid (i.e. no EPSG corresponding) could be well coded..?
>>> (i.e. ellipsoid parameters parsing)
>> You could add a new line to the ellipsoid factory. That is a hack!
>> Long term we should add custom support. Then you would need a datum
>> that owns your ellipsoid. It's a little messy but you could do for
>> short time.
>>
>> Take care,
>> Dave
>>
>>>
>>> Thank you very much for your answers, if you have any suggestions, I
>>> am ears-open !
>>>
>>> Rémi
>>
>



 
----------------message d'origine-----------------
De: "Oscar Kramer" [hidden email]
A: "David Burken" [hidden email] , "Rémi Cresson" [hidden email] , "[hidden email] " [hidden email]
Date: Tue, 2 Dec 2014 20:06:55 +0000 (UTC)
-------------------------------------------------
 
 

> Remi,
> I'm confused when you say you are not seeing an
> image0.geometry.projection.type field. Your output does have this field
> defined to "ossimSinusoidalProjection". I ask because in fact OSSIM is
> currently not handling that projection type from a WKT spec so I wonder how you got
> it to recognize that output using the WKT you posted. Did you do something special
> (like define a geom file)?
>
> Oscar
>
> From: David Burken [hidden email]
> To: Rémi Cresson [hidden email] ;
> [hidden email]
> Sent: Monday, December 1, 2014 7:51 PM
> Subject: Re: [OSSIM] Custom Wkt projection: bad datum
>
>
> On 12/01/2014 04:50 AM, Rémi Cresson wrote:
>
>
> Hi David,
>
> You can see the complete output of ossim-info -p <myfile> here:
> http://pastebin.com/LxtHB9Rw
> As you can see there is no image0.geometry.projection.type field... is that
> what you mean by "it should not of given you a projection at all" ?
> Line 28:
>
> image0.geometry.projection.type: ossimSinusoidalProjection
>
>
>
> As far as I understand, the WGS84 ellipsoid is used by default when there is a
> custom one... Is that it?
>
> It's used by default because the ellipsoid factory could not make your custom
> one.
>
> The only way to fix is with code...
> Dave
>
>
>
>
>
> Many thanks,
>
> Rémi
>
>
> On 30/11/2014 00:07, David Burken wrote:
>
>
>
> Hi Rémi,
>
> Currently no way to add a custom ellipsoid to ossim. We should add but not in code
> right now that I know of. You're not the first to asks. As for the ossim info
> return, it should not of given you a projection at all. Did it? Just curious.
>
> // Example from ossim-info -p <image>:
>
> image0.geometry.projection.type: ossimEquDistCylProjection
>
> Take care,
> Dave
>
> On 11/26/2014 09:05 AM, Rémi Cresson wrote:
>
>
> Hi,
>
> I'm new to OSSIM, but I noticed something not working when using a particular
> custom wkt projection:
>
> Situation:
> -I have some MODIS product (MOD13Q1 to be more specific) which has a custom wkt
> projection (here it is http://pastebin.com/U9qqMEcJ)
> -I want to use OSSIM to deal with this custom projection
>
> Problem:
> -OSSIM does not handle correctly the datum: instead of using the custom
> spheroid, which has a zero-flattening parameter (i.e. a sphere), it uses a WGS84
> ellipsoid (i.e. an ellipsoid)...
>
> I have noticed it from code, but it can be quickly showed with the ossim-info
> application.
> Here is (part of) the output of ossim-info:
>
> [...]
> image0.datum: WGE
> [...]
> image0.ellipse_code: WE
> image0.ellipse_name: WGS 84
> [...]
> image0.major_axis: 6378137.000000000000000
> [...]
> image0.minor_axis: 6356752.314199999906123
> [...]
>
>
> So obviously, OSSIM does not use correctly this wkt. As I said first, I don't know
> well OSSIM, but it should be able to handle this kind of wkt?
> Should I file bug on your tracker? I wonder to fix this.
>
> Thanks in advance,
> Cheers
>
> Rémi
>
>
>
> --------------------------------------------------------------------
> ----------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ost
> g.clktrk
>
>
> _______________________________________________
> www.ossim.org
> Ossim-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/ossim-developer
>
>
>
>
>
> --------------------------------------------------------------------
> ----------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ost
> g.clktrk
> _______________________________________________
> www.ossim.org
> Ossim-developer mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/ossim-developer
>
>
>

--

 


------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
www.ossim.org
Ossim-developer mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/ossim-developer