simone04 wrote in Fri Jun 05, 2020 2:55 pm:-I am not sure how lon1,2 and lat1,2 works... Also because I am having some doubts, like the two coordinates are there because they need to create a rectangle shape? How precise do the coordinates needs to be(for example 4 numbers after the decimal point) etc..?
Yes, shapes are rectangles. Precision (i.e.: numbers after the decimal point) is not that important: only the tile center is checked against the rectangles.
Also, notice you have lat1 and lat2 switched arround: lat1/lon1 must be the lowest number, lat2/lon2 the highest. This is why your rectangle doesn't seem to work.
I am a little puzzled about this, because when I click Ctrl+Alt+LeftClick I get more than one landclass name. Here is some example:
- Code: Select all
[ALRT]:nasal lat:38.9397 lon:16.2839 alt:80m class(es): IrrCropPastureCover IrrCrop Orchard Olives Vineyard Rice MixedCropPastureCover MixedCrop Crop ComplexCrop
Right. The Ctrl+Alt+LeftClick method outputs materials, and a material may apply to several landclasses. In your example, all these landclasses are assigned to the same material, defined like this:
- Code: Select all
<material>
<name>IrrCropPastureCover </name>
<name>IrrCrop</name>
<name>Orchard</name>
...
</material>
how do I determine the right landclass name? As you can see here I have more than one landclass...
The high level API only manages materials, not landclasses. I'm not aware of any method to learn the exact landclass for an area in FlightGear, apart from mapping 1:1 landclass to materials in your regional texture (not recommended)
Since you hardly want to change a very specific spot in your area but all IrrCrop areas at once, your best bet is using a very obvious texture and fly around to check what have you changed.
I also wrote this to Materials.xml file:
Be aware the
LAST files in materials.xml have preference: if you define a material in your region, and there is already another region defining the material for this landclass later in materials.xml, it will take precedence.