EnjShape

EnjShape is a pure Ruby plugin for Sketchup that allows you to import ESRI Shapefiles.

Download: version 0.2

enjshape_button

click here to browse source

Usage:
1) Make sure enjshape.rb and the enjshape directory are in your Sketchup plugins directory.
For me this is:
Windows -

C:\Program Files\Google\Google SketchUp 7\Plugins

Mac OS X -

/Library/Application Support/Google SketchUp 7/SketchUp/plugins

2) Go to Preferences -> Extensions and activate the plugin ENJ’s Shapefile Importer
3) Go to Plugins -> EnjShape -> Import Shapefile
4) Open a Shapefile!

Functionality:
Currently supported Shapefile types:
Point
Arc (PolyLine)
Polygon

If your shapefile is in WGS84 (LatLong) it is flattened (to a 2d plane) and converted to inches (but still georeferenced)

If your shapefile is already projected to a 2d coordsys you can just specificy whether the units are in feet/meters

Shapefile -> Google Earth
1. Open Google Earth
2. Open SketchUp
3. Import (latlong) shapefile into SketchUp using EnjShape
4. Use the “place model” tool to put the model in Google Earth
5. Click on the model in the Google Earth navigation to zoom to the model
6. In SketchUp click the “get current view”
7. Now you can use the “toggle terrain” tool to accurately edit the imported shape for use on Google Earth

Testing:
I don’t have use cases for a lot of the shapetypes. They are implemented according to the shapefile spec, but may have bugs. If you run into one please contact me and give me sample data so I can debug.

Shoutouts:
Props to SwaJime for swa.rb which taught me a lot and gives the latlong converting functionality through his LLAtude class.

Thanks to the one who pointed out I could write this myself instead of waiting.

-Ian Johnson
enjalot@gmail.com

4 Responses to EnjShape

  1. Andreas Wulf says:

    Dear Ian,

    I have a question regarding your EnjShape SketchUp plugin. I try to import a shapefile into SketchUp 7.1 Pro at my MAC. But after pressing the button “Render” nothing happens. I found this question already at some internet forums, but without solution.
    Do you meanwhile know why the import ends without result and error message?

    Your help is highly appreciated.

    With best regards from Germany (only 3rd place, NL is 2nd: congratulations!),
    Andreas

  2. enj says:

    Andreas,
    Thanks for your comment, I think I may have fixed the problem. I found 2 bugs, so hopefully the updated code will work for you. Let me know!

  3. Mark Springate says:

    temporary comment:
    this looks promising but the zip file does not seem to be valid with any zip tools – is it possible that since your recent update the zip has problems – or maybe its just at my end? – thanks in advance – Mark

  4. enj says:

    Hi Mark,
    I just rezipped the code manually (instead of using the github.com zip file)
    The link should hopefully work now
    Thanks
    Ian

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>