[mapserver-users] Georeferencing a raster without worldfile

Trond Michelsen trondmm-mapserver+2017 at crusaders.no
Mon Dec 4 04:52:36 PST 2017


On Fri, Dec 01, 2017 at 10:55:34AM -0700, Richard Greenwood wrote:
>>> In theory, if I added easting and northing to the projection definition,
>>> like this:
>>   PROJECTION
>>>     "+init=epsg:32633 +units=km +x_0=-75000 +y_0=6450000"
>>>   END
>>>
>>> It should position itself properly, but proj does not allow easting or
>> northing to the UTM projections.
> You can specify the full proj style definition instead of the
> "init=epsg:xxxx" format. So maybe something like:
> 
> PROJECTION
>   +proj=tmerc
>   +lat_0=0.0
>   +lon_0=15    # not sure this is correct long0 is for zone 33
>   +x_0=-75000
>   +y_0=6450000
>   +a=6378137.0
>   +b=6356752.3141403
>   +datum=WGS84
>   +units=km
> END

Thanks! That did the trick. I had already tried "+proj=utm +zone=33
+ellps=WGS84 +datum=WGS84 +units=km +no_defs", without success, but 

I just needed a couple of minor changes. First of all, my example I
got my signs mixed up, so easting/northing should be 75000 and
-6450000. I also had to add the shifting UTM33 uses, so the correct
easting is 575000. Finally, by adding the scale factor of 0.9996, the
image positioned itself exactly where I want it.

So, my final projection block is:

  PROJECTION
    +proj=tmerc
    +lat_0=0.0
    +lon_0=15
    +x_0=575000
    +y_0=-6450000
    +a=6378137.0
    +b=6356752.3141403
    +datum=WGS84 
    +k_0=0.9996
    +units=km
  END


This is a workaround I can live with. Thank You.

-- 
Trond Michelsen


More information about the mapserver-users mailing list