Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

shp2vec polys or lines?

Featured Replies

Guys,I have some shapefiles that I used to create terrascene stuff for Fly2. I'm trying to create roads at this point only. I read the sdk docs but I'm getting errors. The shapefiles that I'm working with contains "lines" only...not dots or polys. I wonder whether the tool only works with polys.Polygon not added (shapefile C:Program FilesMicrosoft GamesMicrosoft Flight Simulator X SDKSDKEnvironment KitTerrain SDKVector ExamplesPRSourceDatardx6666.shp)Error adding poly from rdx6666.shpShp2Vec.exe version 10.0.60905.0 - VectorQuad 6Copyright © 2006 Microsoft Corporation. All Rights Reserved.Processing rdx6666.shpWriting vector data to C:Program FilesMicrosoft GamesMicrosoft Flight Simulator X SDKSDKEnvironment KitTerrain SDKVector ExamplesPRSourceDatacvx6666DONE (0 shapes)Compression statistics Type Count Bytes in Bytes out Null (raw data) 0 0 0 Predictive Delta 0 0 0 Quantization 0 0 0I added UUID and GUID to the DBF plus updated the UUID to {560FA8E6-723D-407D-B730-AE08039102A5} and GUID to {1B6A15BB-05FB-4401-A8D1-BB520E84904C}Any ideas?Juan

Hola Juan,How is everything in la isla linda?Just wondering about your shapefile - how many shapes (lines) are in it? What kind of road have you chosen to depict? And what is your GUID {1B6A15BB-05FB-4401-A8D1-BB520E84904C}? I cannot find any terrain element with that GUID.The GUID refers to the terrain element that you are creating. These GUIDs can be found in the terrain.cfg file, or for a more convenient list:http://forums.avsim.net/user_files/161530.zipThe GUID must be one of the entries from this list. The UUID can be any number in Registry Format. Each shape must have its own UUID.Best regards.Luis

do.png Hot, humid Caribbean paradise!
  • Author

Thanks Luis,I'm currently living in NYC. My mother is gonna send me some pasteles and morcillas...I love that food!Well, I have the entire island in shapefiles, roads, streams, LULC, rivers, utilities, etc...I'm gonna keep playing with this...hopefully I can add all those missing main roads at some point.If you want the data, let me know. I'll be glad to share it, after all I got it free!Juan

Like Luis was saying:I added UUID and GUID to the DBF plus updated the UUID to{560FA8E6-723D-407D-B730-AE08039102A5} and GUID to{1B6A15BB-05FB-4401-A8D1-BB520E84904C}That GUID is the one that is needed in the xml file. The ones in the DBF file have to come from terrain.cfg (one for each road segment shape).The road shapes _are_ lines, not polygons.scott s..

  • Author

So...the .xml specify the column attributes of the dbf? I had around 10 columns in the dbf in addition to UUID and GUID. I removed those columns except for UUID and GUID to see if that worked.Those "Bad UUID" errors are because I didn't give a GUID to them since I don't want them imported.However the ones that I want to import were updated to {1B6A15BB-05FB-4401-A8D1-BB520E84904C} in the GUID column. I made the UUID unique as well to all regardless of whether I want them imported or not.Still I'm getting:Polygon not added (shapefile C:Program FilesMicrosoft GamesMicrosoft Flight Simulator X SDKSDKEnvironment KitTerrain SDKVector ExamplesPRSourceDatardx2727.shp)Error adding poly from rdx2727.shpI don't get it!Juan

Let's see. For roads, the xml should always look like this:<?xml version="1.0"?>The dbf should only have 2 fields and they are - the UUID (the unique identifier for each shape) - the GUID (the terrain element identifier from the terrain.cfg) for example, 140 Concrete 1 Lane Undivided Median {C288FEA7-B981-44EF-9C3D-EEEFE5A069A6}Make sure that your shapefile only has the roads in it, nothing else.(If you want to create other terrain, like streams, or water, they should be in separate shapefiles.)Then, you should have 4 files: - rdx6666.dbf - rdx6666.shp - rdx6666.shx - rdx6666.xmlIf you still have problems compiling, then please post the contents of your dbf and xml, and also show an image of your shapefile, if you can.The process can be very confusing at first, but don't worry, we all will get through this great confusion.I used to live in NY, Juan (well, New Jersey, but I don't brag about it!) Brrr, glad to get away from the cold and damp - I am still in a t-shirt at the moment. But, you know that, sorry to remind you.I love your package for Puerto Rico for FS 9 - it really changes everything. Please do release everything when you make the FS X version - a lot of us will be very happy.Just curious, how big are the source files? If not too massive, I would be happy to have them.That is a very impressive project - I could never take on something so big.Best regards.Luis

do.png Hot, humid Caribbean paradise!

Just one note: It won't hurt for the dbf file to have additional fields - they'll just be ignored by Shp2Vec.-Doug >The dbf should only have 2 fields and they are >> - the UUID (the unique identifier for each shape)>> - the GUID (the terrain element identifier from the>terrain.cfg)>> for example, > 140 Concrete 1 Lane Undivided Median>{C288FEA7-B981-44EF-9C3D-EEEFE5A069A6}>

  • Author

Luis,Thanks for your kind words. The data all together compressed is 70 mb. http://68.199.117.86:33000/pr_data.rarI did an experiment with the roads of the town of Carolina. I made them all "{698E20FC-1C69-4876-AF34-A6E9F531CCA5}" and I'm still getting the damned error.The data can be downloaded athttp://68.199.117.86:33000/rdx2727.rarLet's see who can spot the problemThanks guys,Juan

Hola Juan,I am no expert on this, but from what I could examine, it seems that your dbf and xml files are fine - it is the shapefile (shp, shx) that is being rejected by Shp2Vec.All FS terrain must be in the WGS84 datum with "Geographic" projection. I tried loading your shapefile (over 4000 shapes!) in GlobalMapper and it seems to think that the file is in the NAD83 (basically the same as WGS84) datum, but in UTM projection. Is this so? Have you re-projected your data to FS requirements?Thanks for the offer of the source - too large for me to download, unfortunately. I shall wait for you to release the finished scenery (let you do the hard part!)Best regards.Luis

do.png Hot, humid Caribbean paradise!
  • Author

Luis,That datum issue never crossed my mind. In Terrascene we used nad83 I believe. I'm going to reproject the data to wgs84, I hope it will fix the problem!Thanks again!Juan

  • Author

Success at last!Like Luis said, it was the datum. I was using NAD83 and UTM 20 instead of WGS84.Looks like I might have to redo all the shorelines as well. I took a look at cvx3025.bgl in the 0303 folder and it has a lot of stuff in there. It won't be easy!Thanks Luis!Regards,Juan

Hi Juan, I really hope you can update puerto rico! I was wondering about the roads myself. by any chance are you working on putting the teodoro moscoso road and bridge?? and the roads around sju ??It would be fantastic to approach rwy 10 or 8 with some road traffic and also some on tjbq Im really looking forward to your work on enhancing puerto rico !! Almost forgot to mention luis, Juan, I live now in new jersey 10min from nyc please keep up the great work !:)

Cesar Martinez
AMD 7800X3D  RTX5080 NZXT N7 B650E | G.Skill 32GB DDR5  
Samsung 980 Pro 2TB | Crucial MX500 (2×) | Crucial P3 Plus  
Monitor: Philips Evnia 34M2C6500 QD-OLED

Wow, Cesar, that's exactly where I grew up. Bergen County, pretty nice place, close to the city, but out of it.Glad that was the solution, Juan, as I wasn't sure at all. Now we know that Shp2Vec will reject any source files that are not in the correct projection. Thanks for finding that out.Best regards.Luis

do.png Hot, humid Caribbean paradise!

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.