• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

With Windows 7 64bit, Unable to load shapelib.dll

Messages
121
Country
us-california
Arno,
I am trying to test out ScenProc to generate some trees and buildings. I downloaded the monaco shapefiles from GEOFABRIK and selected the buildings.shp file. My SPC file looks like the following:
____________________________________________________________

#
IMPORTSHP|monaco_buildings.shp|NOREPROJ
#
SPLITGRID|0.0146484375;0.010986328125
#
#CREATEAGNPOLYVEG|type=forest|{e8b937fd-a1f2-4bd5-8548-2c80d30102af}
CREATEAGNGENBUILD|shpfile=monaco_buildings.shp|{00000000-0000-0000-0000-000000000000}
#
WRITEAGNFILES
____________________________________________________

When I run it, I get the following:
scenProc version 1.0.0.0 - Arno Gerretsen

Initializing processing steps...
> found AddAttribute
> found AssignUuid
> found CreateAGNGenBuild
> found CreateAGNLibObj
> found CreateAGNPolyBuild
> found CreateAGNPolyVeg
> found CreateAGNRectVeg
> found CreateAGNRowHouse
> found ImportSHP
> found CreateMaterial
> found CreatePolygon
> found CreateTestData
> found ExportBGL
> found ExportSHP
> found ExtrudeLine
> found FilterGeoLocation
> found FilterLineOnPolygon
> found ImportDXF
> found LocalProjection
> found SetAGNBuildingTexture
> found SetAGNBuildingHeight
> found SetAGNRowHouseTexture
> found SplitGrid
> found WriteAGNFiles

Parsing apProc configuration monaco.spc
Reading SHP file monaco_buildings.shp


Unhandled Exception: System.DllNotFoundException: Unable to load DLL 'shapelib.dll'
: The specified module could not be found. (Exception from HRESULT:0x8007007E)

at MapTools.ShapeLib.SHPOpen(String szShapeFile, String szAccess)
at ASToFra.scenProc.ImportSHP.ReadSHPFile(String filenam
at ASToFra.scenProc.ImportSHP.Process(List`1 cells, Stri
at ASToFra.scenProc.SceneryProcessor.Process()
at ASToFra.Launcher_scenProc.Program.Main(String[] args)

Is it maybe because I am using Windows 7 64-bit?
(I did make sure that shapelib.dll is in the same directory as scenProc.exe

Thanks

Dave
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,853
Country
netherlands
Hi Dave,

I am also using Windows 64 bit and I do not have this problem.

I assume you just extracted the development release in a folder. Out should then have all the files you need.

Let me double check the latest release to be sure nothing is wrong.

Send from my phone using Tapatalk, so excuse the short sentences and possible typos
 
Messages
121
Country
us-california
ScenProc doesn't have any problems loading shapelib.dll with Windows XP

Arno,
Thanks for responding so quickly!!

I don't have any problem getting shapelib.dll to load under Windows XP. However, now I get an error that seems to indicate that it can't find or read the "shp" file. Maybe I could try a shapefile that you send?? All my files are in the same folder as the executeable files. Again, I downloaded the shp files from GEOFABRIK.

Parsing apProc configuration monaco.spc
Reading SHP file buildings.shp
Failed to open files
Reading SHP file buildings_schier.shp
Failed to open files
Splitting features in 0.0146484375 x 0.010986328125 grid...
Features divided in 0 cells
Setting autogen building heigth...
Setting autogen building texture...
Creating autogen generic buildings with filter shpfile=buildings.shp...
Writing AGN files to folder F:\FlyitClientScenery\Utilities\AutogenFromOSM\Execu
te\monaco_dir
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,853
Country
netherlands
Hi,

If your send me your shapefile and the configuration you use, I'll take a look.

Send from my phone using Tapatalk, so excuse the short sentences and possible typos
 
Messages
121
Country
us-california
Here are my spc and shp files

Arno,
Attached are my spc and shp files that I have in the same directory as my executable and dll files (under XP - not W7). I did modify the spc file to use the FROMFILE in the CREATEAGNGENBUILD instead of shpfile= and I added a subfolder name to the WRITEAGNFILES but
I still get the message "Failed to open files" right after the "Reading SHP file monaco_buildings.shp".

Thanks much for taking a look at this. I use a lot of MegaScenery photoreal scenery that has few, if any, added buildings or trees and I believe ScenProc will make a great improvement! I also like the ORBX scenery because it has such dense trees and buildings but then it isn't photoreal in most areas.

whitav8r@hotmail.com
 

Attachments

  • monaco_buildings.zip
    97.7 KB · Views: 379
Messages
121
Country
us-california
Tried using shapelib from OSM2SHP-0.2

Arno,
I downloaded a freeware tool to convert from OSM to SHP called OSM2SHP-0.2 and it has a shapelib.dll with the executable OSM2SHP.exe. For experimentation, I copied that into your Sceneproc.exe directory (replacing the one you provided in the latest_dev_rel_pack.. ) and I don't get the "couldn't load DLL file" error anymore. Obviously, I don't know if it does what you want it to do though.

Dave
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,853
Country
netherlands
Hi,

Your shapefile is not complete. It should have three files, shp, shx and dbf. Together that is one shapefile.

I'll check the dll, apparently there is a newer version. I probably need to update mine.

Send from my phone using Tapatalk, so excuse the short sentences and possible typos
 
Messages
121
Country
us-california
I'm getting AGN files now!

Arno,
Sorry that I didn't understand about having ALL the various pieces of a SHP file. I now get the same AGN files with the new "shapelib.dll" that I found with the OSM2SHP-0.2 - both for XP and W7. I will experiment with the Monaco area.
Should I try the openstreetmap.org site and the above mentioned OSM2SHP (I don't think it makes all the separate SHP file pieces??) or is there another approach that you recommend? Also, it seems that there is very few, if any, houses/buildings in the North American streetmap data - don't I need to see gray rectangles for houses/bldgs and green areas for trees?

Thanks very much for this tool!!

Dave
 
Messages
121
Country
us-california
SnapScreen of Monaco ScenProc results

Arno,
Progress is being made! Here is a snapshot of a Photoreal (quickly made from FSEarthTiles) Monaco with JUST Autogen (Set at MAX density) from the GeoFABRIK monaco buildings.shp
Some buildings make good sense and other - mostly very large - don't just yet. Also, I'm not sure why no buildings higher up the slope.
Anyway, the process works and I will test some other areas. Thanks much!

Dave
 

Attachments

  • ScenProc1.jpg
    ScenProc1.jpg
    619.1 KB · Views: 554
  • ScenProc2.jpg
    ScenProc2.jpg
    334.7 KB · Views: 622
  • ScenProc3.jpg
    ScenProc3.jpg
    584 KB · Views: 631
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,853
Country
netherlands
Hi Dave,

That looks quite nice. Some of the big buildings look weird indeed. You can do a few things about that:

  • Use the filter to remove building with an area bigger than a certain value. Because these are more likely to look weird.
  • If they are long, but not so wide, there is an option to split the polygon into a number of smaller buildings. For example with a row of houses that sometimes looks better.

I do also have some plans to improve the way the autogen buildings are placed, because they are always rectangular. So with a weird footprint that does not always work. But I haven't had the time yet to implement that.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
31,853
Country
netherlands
Hi Dave,

I have updated the shapelib.dll in my development release now. So I hope from the next version it will work out of the box for you.
 
Top