Jump to content

GeoJSON Importer


Wooshum

Recommended Posts

Hi All,

If you need to work with Geo-Spatial data on a regular basis like I do, you might be interested in the GeoJSON Importer (SOP HDA) that I have started developing. You can grab it from here:

https://github.com/danleesmith/HOU_GeoTools

Some basic Info on the Importer:

Houdini Geographic Tools

Custom Python GeoJSON importer Digital Asset for Houdini (HDA). This importer reads GeoJSON files only. GeoJSON is quickly becoming the standard geo-spatial interchange format and can store point, line and polygonal features with associated attributes. The GeoJSON standard can be found here:

http://geojson.org/

Limitations

This importer only works with projected coordinate systems. An explanation of the difference between projected and geographic coordinate systems can be found here:

http://tech.ced.uga.edu/kb/articles/difference-beteween-projected-and-geographic-coordinate-system

The importer also requires that any NULL or EMPTY attributes, which are allowable in many GIS systems, are mapped to -9999. This will ensure that when the attributes are written in Houdini they can be stored as either 0 for numbers and '' for strings.

NOTE: Polygon/Primitive Holes (known as donuts in GIS) have not been implemented in the importer at this stage.

Data Prep

To prepare you data and convert your spatial files to GeoJSON I recommend using QGIS:

http://www.qgis.org/en/site/

OR if you can get your hands on a licence give FME a go:

http://www.safe.com/

Usage

This HDA is a SOP based asset.

'GeoJSON File channel' is used to point to the desired GeoJSON File for importing.

If you want to import many GeoJSON files in the right location relative to each other just drop down a new Import GeoJSON node, toggle on 'Use Reference Features' and point the 'Reference Features' channel to the desired Import GeoJSON node.

The attached images show the Importer in action.

I hope you find this useful and please send through any suggestions you have!

GeoJSON_Prims.PNG

GeoJSON_Points.PNG

Edited by Wooshum
  • Like 3
Link to comment
Share on other sites

  • 4 weeks later...

Very generous of you... looks great and knowing how obscure and convoluted GIS is this surely wlll be a great asset. Thanks... I hope I have a bit of time to play with geospatial data soon.

Any resource you recommend to get some sample data? thanks

Edited by jordibares
Link to comment
Share on other sites

  • 3 years later...

A note to all, the original GitHub repo has been removed due to inactivity. I have dumped the underlying python import script into a GIST here:

https://gist.github.com/danleesmith/8a7d5b07f604c471f02d24ae51ed97ea

From a production point of view I moved to using a custom transformer in FME that writes out the geometry and attributes to a Houdini .geo file directly. The benefit of this process is that FME can ingest pretty much any GIS format (and more). This simplifies the process on the Houdini end. You can check this out here:

https://github.com/danleesmith/fmehougeo

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...