Re: ps2raster offset with world file

Joaquim Luis <[email protected]>
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
Brent,

It must be pscale. For the same reason we must use BASEMAP_TYPE=inside 
we cannot have other drawings outside the map frame. This will trick the 
coordinates-from-pixels algorithm that assumes all pixels of the 
rasterization belong to the map.

and yes, you need to repeat the inline setting for all the commands. The 
idea of the inline is that it works only on the command where it is invoked.

What was the error when you tried to default basemap type to "INSIDE"?

Joaquim

> Hi,
>
> I have a problem with a png + worldfile image by ps2raster 
> georeferencing correctly. I figured I'd ask here before submitting a 
> bug report in case I'm the bug...
>
> The map is generated by a script - as below. A small part of the 
> output image is attached. The red coastline shows the actual vector 
> coastline opened in QGIS, overlayed on the GMT image which includes 
> the same (rendered/pixellated)coastline.
>
> As shown in the image, the ps2raster coastline appears to be offset 
> from the vector coastline. About a 1km offset in real world distances. 
> This offset is worse towards the top of the map.
>
> I note that I can't set the default basemap type to "INSIDE" - this 
> results in an error - and using the inline approach as for the 
> psbasemap command below does not reset the gmtdefaults4 file - this 
> remains set to "plain". Do I need to include the inline setting for 
> all the commands?
>
> Any advice appreciated...
>
> Brent Wood
>
>
>  # generate lat/lon png with world file
>   psbasemap -R$REG -JX5i -P -K -B/::wesn --BASEMAP_TYPE=inside > $PS2
>   psxy nz_shelf.gmt -R$REG -JX -W1 -m -K -O -G210/240/245 >> $PS2
>   psxy nz_50m.gmt -R -JX -W1 -m -O -K -G230/255/255 -W1/230/255/255 >> 
> $PS2
>   # psxy nz_coast.gmt -R -JX -W1 -m -O -K -G200 >> $PS2
>
>   # overlay with specific data
>   echo "175 -52.5 10 0 1 ML Species/year" | pstext -R -JX -W -O -K >> 
> $PS2
>   echo "175 -53.2 10 0 1 ML All spp   $YR" | pstext -R -JX -W -O -K >> 
> $PS2
>
>   echo "adding scale"
>   psscale -D10/3.2/3.0/0.3 -C$CPT -A -L -O -K -B::/:: >> $PS2
>   echo "175.5 -45.1 10 0 1 ML Tows/cell" | pstext -R -JX -W -O -K >> $PS2
>
>   #plot cells
>   echo "plotting cells"
>   # with clip path
>   psclip nz_shelf.gmt -R -J -m -O -K >> $PS2
>   cat $FILE | psxy -R -JX -O -K -Ss$SYM_SIZE -C$CPT >> $PS2
>   psclip -C -O -K >> $PS2
>
>   # draw coast
>   psxy nz_coast.gmt -R -JX -W1 -m -O -G200 >> $PS2
>
>   # generate png with world file
>   ps2raster -Tg -Au -E600 -W $PS2
> To unsubscribe, send the message "signoff gmt-help" to 
> [email protected] 


To unsubscribe, send the message "signoff gmt-help" to [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.