Re: orthophoto over dem

Bill, thanks for that. The lightbulb in my head finally lit up.

I made a small adaption to the GIFAdaptor to take care of the
positioning in the geographic space.
At that point the combining of the FlatFields worked flawless.

I put the result and the code here:

There will be need for optimization of the code, but it works.

I found that image is read flipped against the geographic position, so I
did a workaround on the colorarrays.
Has anyone a better solution for the flipping?


> The CoordinateSystem (CS) maps in both "to" and
> "from" directions, so in theory this should not
> matter. However, there is a problem in VisAD: you
> cannot display data defined in the reference (x, y)
> coordinates in a Display defined by ScalarMaps of
> the (easting, northing) coordinates. If your CS
> has reference coordinates (x, y) and you want to
> display data defined in (x, y), then your ScalarMaps
> must be defined in terms of x and y.
> If you cannot define your Display in terms of
> ScalarMaps of x and y, then you will need to extract
> the numerical arrays from imageField (read by the
> method) and use them to construct
> a new Field defined in terms of a new RealTupleType
> (xnew, ynew) with a CS with reference (easting, northing).
> > I try explain better throught some code how I tried to follow you
> > suggestions:
> You failed to follow my suggestion because your
> GeoToImageCoordinateSystem iCord has reference
> (RealType.XAxis, RealType.YAxis) (which should not
> be confused with Display.XAxis and Display.YAxis),
> but then RealType.XAxis and RealType.YAxis have no
> relation to x and y, the domain coordinates of
> imageField. Because of this lack of a relation,
> the system has no information about how to combine
> imageField with domain (x, y) and demField with
> domain (easting, northing).
> Also, the statement:
>   Field newDemfield = demField.resample(imageDomainSet);
> is unnecessary. This operation will be implicit in
> FieldImpl.combine() if there is a CS that defines a
> relation between (x, y) and (easting, northing).
> Good luck,
> Bill

HydroloGIS - Environmental Safety Modelling
Siemens Str. 19 via Siemens
I-39100 Bozen - Bolzano

Andrea Antonello
Environmental Engineer
tel.     +39 0471 068065  
mobile:  +39 328 8497722
fax:  +39 36 328 8497722
email:   andrea.antonello@xxxxxxxxxxxxxx

"Let it be as much a great honour to take as to give learning,
if you want to be called wise."
Skuggsja' - The King's mirror - 1240 Reykjavik

To unsubscribe visad, visit:

  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: