sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Importing ESRI shapefiles

    Scheduled Pinned Locked Moved Google Earth
    sketchup
    1 Posts 1 Posters 7.8k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M Offline
      mozzie
      last edited by

      Hi,
      I've spent a bit of time investigating this, as i can get quite good terrain information (1 or 2m elevation data) from local sources. I've been using QGIS (3.6) to overlay KML files provided to me with road design and other info and have been quite impressed with the results.
      I use Sketchup Pro 8 with Toposhaper (Fredo6) to produce terrain surfaces and SuperDrape (TIG) to overlay satellite or other client images and to allow some modelling - so I need a good way to get from QGIS to SU8.

      I found a plugin by Jim Hamilton works best - spirix_shapefile_importer - there are a number of others but his is reliable and allows the elevation data to be imported from the DBF file that is a component of the shapefiles.

      It has one limitation, however; it does not deal with model units except inches (the internal SU standard) and I need meters. The code is public (with acknowledgement), so I have hacked together a quick modification to provide a units dropdown with some basic options.

      In case this is useful to someone, here is the hack /modifications.

      1. Replace lines 172 & 173 with
      
              prompts = ["Name; ","Number of PolyItems; ","X (min); ","Y (min); ","X (max); ","Y (max); ","Scale Units; ","Height; ","Database; ","Display BB; ","Geolocate; "]
              defaults = [@@name,@@imax,@@bbox[0],@@bbox[1],@@bbox[2],@@bbox[3],"m","0.0","No","No","No"]
              list = ["","","","","","","m|cm|mm|in|ft","","No|Yes","No|Yes","No|Yes"]
      
      
      1. Replace line 181 with this case statement.
      
      #---------------------------- Replaces @@scale = input[6].to_f -------------
              @@scale = case         # this value needs to reflect the base shapefile units converted to inches
                when input[6]=="m"
                  100/2.54
                when input[6]=="cm"
                  1/2.54
                when input[6]=="mm"
                  1/25.4
                when input[6]=="in"
                   1.0
                when input[6]=="ft"
                   12.0
              end
             #-----------------------------------------
      
      
      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Buy SketchPlus
      Buy SUbD
      Buy WrapR
      Buy eBook
      Buy Modelur
      Buy Vertex Tools
      Buy SketchCuisine
      Buy FormFonts

      Advertisement