Ticket #43 (closed defect: worksforme)

Opened 4 years ago

Last modified 3 years ago

Some Srid not supported.

Reported by: yangyong Owned by: warmerdam
Priority: major Milestone:
Component: default Version: 4.6.1
Keywords: Cc:

Description (last modified by warmerdam) (diff)

I tested out that 2 problems exists: 1) The Srid 28992 is sopposed to be supported in the latest PROJ.4  http://www.spatialreference.org/ref/epsg/28992/ But when it will throw exception when I use it through proj4. Similar problem will happen to all the following "sterea" projects:

<28992> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs  <>
<2036> +proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
<2171> +proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5647000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  <>
<2172> +proj=sterea +lat_0=53.00194444444445 +lon_0=21.50277777777778 +k=0.9998 +x_0=4603000 +y_0=5806000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  <>
<2173> +proj=sterea +lat_0=53.58333333333334 +lon_0=17.00833333333333 +k=0.9998 +x_0=3501000 +y_0=5999000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  <>
<2174> +proj=sterea +lat_0=51.67083333333333 +lon_0=16.67222222222222 +k=0.9998 +x_0=3703000 +y_0=5627000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  <>
<2200> +proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=300000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs  <>
<2290> +proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=700000 +y_0=400000 +a=6378135 +b=6356750.304921594 +units=m +no_defs  <>
<2291> +proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +a=6378135 +b=6356750.304921594 +units=m +no_defs  <>
<2292> +proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs  <>
<2953> +proj=sterea +lat_0=46.5 +lon_0=-66.5 +k=0.999912 +x_0=2500000 +y_0=7500000 +ellps=GRS80 +units=m +no_defs  <>
<2954> +proj=sterea +lat_0=47.25 +lon_0=-63 +k=0.999912 +x_0=400000 +y_0=800000 +ellps=GRS80 +units=m +no_defs  <>
<3120> +proj=sterea +lat_0=50.625 +lon_0=21.08333333333333 +k=0.9998 +x_0=4637000 +y_0=5467000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  <>
<3328> +proj=sterea +lat_0=52.16666666666666 +lon_0=19.16666666666667 +k=0.999714 +x_0=500000 +y_0=500000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs  <>
<22780> +proj=sterea +lat_0=34.2 +lon_0=39.15 +k=0.9995341 +x_0=0 +y_0=0 +a=6378249.2 +b=6356515 +units=m +no_defs  <>
<28991> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=0 +y_0=0 +ellps=bessel +units=m +no_defs  <>
<28992> +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs  <>
<31600> +proj=sterea +lat_0=45.9 +lon_0=25.39246588888889 +k=0.9996667 +x_0=500000 +y_0=500000 +ellps=intl +units=m +no_defs  <>
<31700> +proj=sterea +lat_0=46 +lon_0=25 +k=0.99975 +x_0=500000 +y_0=500000 +ellps=krass +units=m +no_defs  <>

2) The Srid 7415/7402 are not supported in latest proj4. I want to make sure it will supported or not.

 http://www.spatialreference.org/ref/epsg/7415/

 http://www.spatialreference.org/ref/epsg/7402/

Any hints will be appreciated.

Attachments

ProjectionApplication.zip Download (95.3 KB) - added by yangyong 4 years ago.
Test App in VS2008

Change History

Changed 4 years ago by warmerdam

  • priority changed from critical to major
  • description modified (diff)
  • milestone 4.7.0 deleted

I tried:

warmerda@gdal64[113]% ../src/cs2cs +proj=latlong +datum=WGS84 +to +init=epsg:28992
5 10
106221.92       -4432619.53 0.00

and things seem to work ok. This was with trunk, not 4.6.1. Could you be more specific about how you trigger the exception?

Changed 4 years ago by yangyong

Test App in VS2008

Changed 4 years ago by yangyong

warmerda,

Thanks for your attention. I think you are talking different projection with mine.

My taking projection is 28992, the string is " +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs":

and your talking projection is 28992, but the projection string is "+proj=latlong +datum=WGS84 " which is not correct.

I also build the DLL in the attachment with the latest brunch code, it still cannot work.

Thanks.

Yang

Changed 3 years ago by warmerdam

  • status changed from new to closed
  • resolution set to worksforme

Yang,

Sorry for neglecting this so long.

I did test with epsg:28992 in my example. You may have to scroll to the right to see the whole cs2cs command. In order to ensure the init file lookup isn't causing any problems I just tried:

cs2cs +proj=latlong +datum=WGS84 \
  +to +proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 \
                   +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs
5 10 
106221.92       -4432619.53 0.00

I'm not sure why you are getting an exception, but I'd suggest first trying it at the commandline as I suspect the issue something about how you are calling PROJ.4.

Please reopen if you can reproduce this problem via the commandline tools.

Note: See TracTickets for help on using tickets.