New Zealand Cultivation

  • Thanks to Phil Spit40, it's now possible to cultivate the UK to a very high standard using Ordnance Survey (OS) data. Full instructions are available in the relevant thread. My attention has recently turned to other countries: is it possible to get the same quality of data elsewhere? One place that interests me is New Zealand. I've never been there myself but I know that it has a good variety of spectacular scenery.

    After a bit of research I discovered that it is possible to download SHP files from the NZ equivalent of the OS. The link below is to the map CG10 (Invercargill, in the south). The download link is at the bottom.

    https://www.linz.govt.nz/land/maps/linz…-chooser---cg10

    The first thing I tried was the most recent version of Phil's instructions, whereby you simply load the SHP files directly into ScenProc. For the NZ data there is a folder "CG10" which seems to have similar contents to the folder called "data" in the case of the Ordnance Survey, so I used that folder in place of "data". Unfortunately it didn't work - ScenProc didn't read anything from the SHP files. (I did change the names of the files BTW. The NZ data uses filenames of the form "tree_pnt.shp" rather than "TQ_Woodland.shp" etc.)

    The next thing I tried was Phil's previous method, whereby you open the SHP files in QGIS and save the "layer" as a KML file. When the SHP files are opened in QGIS the maps have a rather different appearance from that of the OS maps, which did make me wonder whether it would work. And indeed it didn't work - ScenProc read nothing from the KML files either.

    So that's the stage I'm at. The whole thing looks tantalisingly similar to the UK Ordnance Survey situation - and I will defintely keep on trying. I'm far from being an expert or experienced at this sort of thing however, so I may well have made a silly mistake or it could be that I'm simply out of my depth. Anybody else who's interested in NZ might want to run with it and see if they can take it further!

  • Interesting. Not sure if its a projection issue (co-ordinate system is not understood) or what seems more likely is that the data is simply different. In QGIS you need to work out the codes they use as I suspect the simple FEATCODE field is not used.

    See this link for how to open the attributes table in QGIS.

  • Interesting. Not sure if its a projection issue (co-ordinate system is not understood) or what seems more likely is that the data is simply different. In QGIS you need to work out the codes they use as I suspect the simple FEATCODE field is not used.

    See this link for how to open the attributes table in QGIS.

    OK thanks Phil - I'll investigate that. One thing I did notice is that, when you open the SHP files in QGIS, the map/layer simply consists of points for the woodland rather than polygons. I suppose the clue is in the filename "tree_pnt.shp". That must make a difference. The roads look pretty much the same as OS but you have two types of SHP for buildings: "building_pnt.shp" and "building_poly.shp". I haven't actually tried the "poly" one yet. I used the same save option in QGIS as for OS - viz the 3rd one. I could try one of the others.

  • BTW I also noticed that one of the download options for the maps on the NZ site was "GeoTiff". I mention this because I was looking at a YouTube video on using ScenProc to generate cultivation from aerial images .....

    External Content youtu.be
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    The video recommends GeoTiff as a suitable format for the images if you want to use them for this purpose. (Maybe the FSET generated images would also work? However I don't think the video mentions FSET.)

  • Yes I'm interested in that. Its why I started the thread about making autogen from photoscenery.

    Yes - it was your thread that alerted me to this possibility and made me seek out the video. One thing I did notice was that when I opened the NZ GeoTiff in Gimp it isn't actually an aerial image - it's an image of a map. A lot of the first part of the ScenProc video is about trying to pick out areas of woodland (say) on photographic images, which is obviously quite difficult to automate. Maybe I'm being too simplistic here but wouldn't it be a whole lot easier if you had a GeoTiff of a map? One shade of green would definitely be woodland, with no confusion whatsoever. I appreciate that a map isn't going to be quite as precise as an aerial image because there are compromises made to render it legible. The scale would also need to be as large as possible. However it would still be way better than some of the alternatives.

    EDIT: Of course if the data on the map is obtainable (and extractable) anyway from the SHP files, there's no need to bother with this - so maybe it isn't such a brainwave! Actually the more I think about this the more I realise that I'm being a bit daft. It would almost certainly be easier to figure out a way of reading the SHP files than figure out a way of reading the map! (On the other hand, if you had a GeoTiff map but no accompanying data it could conceivably make sense.)

    Edited 5 times, last by Ian C (January 15, 2018 at 5:43 PM).

  • I had success using the Vegetation Detection capability in ScenProc on an FSET BMP file (just load it by using the INF file which georeferences it) - I actually used the Histogram filter - just clicking on a bunch of trees and forest areas and then saving the filter as a TFC file - then asking for the detection and it generated a SHP file OK. I ended up loading that into JOSM (had to add the opendata plugin) so I could view it with an imagery backgound. It seemed fairly good but I corrected a few of the polys that bordered any highways since the trees were so close sometimes. And then I merged it with my normal OSM data and output that for ScenProc to generate the TOC file. Don't make your area too big in ScenProc or JOSM while testing.

    Here is my ScenProc file which outputs a SHP file - I don't know if the GRID stuff is required at all:

    ===============================================================================================

    ImportINF|AreaFSInfo_Lp1_SnapOff_N033152098_N033092748_W117232243_W117151779.inf

    SplitGrid|0.25|*|building="*"

    DetectFeatures|FTYPE="RASTER"|ScenProc_VegDet_1.tfc|String;veg|trees|NONE

    MergeGrid

    ExportOGR|FTYPE="POLYGON" |ESRI Shapefile|veg_trees.shp|veg_trees

    ==================================================================================================

    Dave W.

    P.S. Arno of fsdeveloper.com (author of ScenProc) is working on a building detection filter for those of us who have lightly populated OSM areas

  • whitav8

    Many thanks Dave - that's something I can try next. Useful to know that you can use the FSET BMPs.

    I haven't had any success with the SHP files from the NZ map site yet. Phil's right - there are no FEATCODEs in the data, so I tried using one of the other column headings in the data table with values such as "NULL", "SCHOOL" etc - but that didn't work. In fact ScenProc doesn't even get past first base (reading the data).

    Taking on board your experience of "Detect Features" in ScenProc, and having now viewed Arno's video right through, maybe using the Geotiff map isn't such a bad idea after all. In theory even the histogram filter should give 100% accurate results on a map image? I guess there's only one way to find out .....

    Edited once, last by Ian C (January 15, 2018 at 9:48 PM).

  • Going back to the original post, the 'default' projection for LINZ data is NZGD2000, so you would need to reproject to WGS84 to get it to work. Luckily you can download in a choice of projections, via the LINZ Data Service.

    According to Arno, if there's a valid PRJ file which i think there is (needs to be checked), then Scenproc Autodetect mode works without converting projection beforehand.

  • According to Arno, if there's a valid PRJ file which i think there is (needs to be checked), then Scenproc Autodetect mode works without converting projection beforehand.

    There are indeed PRJ files along with the SHP files.

    Using the "detectfeatures" function of ScenProc I'm currently trying to create an "forest" SHP file from the green areas on the map (which is a GeoTiff). However this is also going to suffer from projection issues I guess - so maybe it's doomed to failure. Would the same projection problems arise if I created the SHP file from a FSET BMP image? Dave whitav8 was successful with this, so maybe not. Thinking about it, this is probably why I have to do it from an aerial images rather than a map. Either that or get ScenProc to work with the SHP and PRJ files as we've done with the OS data.

    Edited once, last by Ian C (January 15, 2018 at 11:38 PM).

  • There are indeed PRJ files along with the SHP files.

    Using the "detectfeatures" function of ScenProc I'm currently trying to create an "forest" SHP file from the green areas on the map (which is a GeoTiff). However this is also going to suffer from projection issues I guess - so maybe it's doomed to failure. Would the same projection problems arise if I created the SHP file from a FSET BMP image? Dave whitav8 was successful with this, so maybe not.

    I spotted there were PRJ files. The question is whether they are "valid" and ScenProc can extract the necessary projection conversion data from them in the way it was able to with OS data. If you are first able to get this working through a QGIS conversion then, if projection remains the only complication, we can ask Arno for help. Even of the PRJ is not formatted well, once we have the projection conversion formula there's no need to do prior conversion you can just enter that conversion formula to the scenproc import line and scenproc will do it on input.

  • I spotted there were PRJ files. The question is whether they are "valid" and ScenProc can extract the necessary projection conversion data from them in the way it was able to with OS data. If you are first able to get this working through a QGIS conversion then, if projection remains the only complication, we can ask Arno for help. Even of the PRJ is not formatted well, once we have the projection conversion formula there's no need to do prior conversion you can just enter that conversion formula to the scenproc import line and scenproc will do it on input.

    OK thanks - I'll concentrate my efforts on the QGIS/KML route and see if I can get that to work.

  • I have geoconverted a lot of the South Island, and have been disappointed at the lack of detail in the OSM data to bring some 3d to it via Scenproc. If any of you guys do end up with really good .TOC files based on other sources, I would love to have a copy of them.

    - Regards

    Kenneth

  • I have geoconverted a lot of the South Island, and have been disappointed at the lack of detail in the OSM data to bring some 3d to it via Scenproc. If any of you guys do end up with really good .TOC files based on other sources, I would love to have a copy of them.

    - Regards

    Kenneth

    Yes, the OSM data is very hit and miss - especially having experienced the UK cultivation and knowing how good it can potentially be. There are vast areas of forest in NZ (according to the images) but these are poorly represented in the OSM data. Having looked at it a bit more I'm also rather disappointed with the aerial images. They're OK, but not really quite good enough for conversion at level 15. The UK images are typically much better. I'll continue to try to get the TOC working but the image quality has discouraged me slightly.

  • Ian,

    I fear several of us will find (or are finding) initial "development enthusiasm" coming face to face with the brick wall of sparse available data. BUT... That means we might even find time to fly AFS2 again!

    It is so funny, what attracted me to the sim in the first place was the notion of just getting in and flying (as opposed to the massive amount of tweaking and add-on organizing from the other sim!)... And yet, when I review my almost three months with AFS2, I have learned how to change pilots in aircraft, make TSCs, use and implement FSET, Geoconvert, and Scenproc, and..... logged a lot less flying hours than I intended!

    Hmm.... What's wrong with this picture?

    - Kenneth

    ADDITION:- I've just been looking at this post. I would support that work. New Zealand (done properly, at a good price point), would be a great project. It would be better than I can achieve through my amateur efforts, so let's encourage the designer.

    Edited once, last by KJKsimmer (January 17, 2018 at 5:31 AM).

  • Hi Kenneth,

    I can completely copy your statement. In the beginning I flew around and tried to master the aircraft.

    Then I started the first repaint attempt, followed by geoconvert, FSET, AC3D, OSM, cultivation , airports, runways, decals....

    And even more tools wait to be tested and adapted.

    I hardly find the time to fly because there is still sooo much to try.... ;):D

    Rodeo

  • Kenneth

    Yes - that's true - I spend more time developing scenery than flying in it, that's for sure. My excuse to myself is that I need a "critical mass" to fly in before I can really enjoy it. Not "fear of missing out" (FOMO) but "fear of running out" (FORO)! Also I'm kind of hoping that some means of taking in the scenery very slowly will come along (eg hot air balloon). It's almost like I don't want to zoom around seeing too much of it at once since it's taken me so long to create it! My way round that problem at the moment is to fly very low and slow so that my horizons are limited. I'm quite weird and unusual in the way I use flight simulators!

    And yes the New Zealand project is very worthwhile. I've noticed with my UK scenery that full cultivation (especially of trees) can compensate to a large extent for shortcomings in the aerial images. This would definitely be true for large areas of forest.

    Edited once, last by Ian C (January 17, 2018 at 11:00 AM).