Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Get any piece of Google Earth as a single normalized glTF 3D model (github.com/omarshehata)
177 points by OmarShehata 10 months ago | hide | past | favorite | 30 comments
Google released an API in May to get fetch 3D Tiles of anywhere on Earth. Using this in standard 3D engines like Blender is tricky because (1) the tiles are in a geographic coordinate system (2) you get a lot of little tiles at varying quality levels

I wanted to simplify this so all you need to do is get an API key, select a map region and a zoom level, and get one combined glTF file that you can throw into any engine. Especially if you're just prototyping and want to see how this data looks in your engine before investing in figuring out all the nuances of the API & coordinate system.

(Note that the API prohibits offline use, as in you can't distribute a processed glTF file like this. But you can do this preprocessing in memory whenever you're fetching tiles).




Super cool that it includes high(ish)-resolution buildings! Folks interested in using this data may also be interested in OpenTopography[0], which is a repository of topographical datasets (some very high resolution) with possibly more friendly licensing terms. I used some data from them to make a physical topographic map of a mountain peak. The tooling is a little opaque from a newcomer's standpoint, so I wrote up a quick howto[1]. In short you go from GeoTIFF to an STL surface with phstl, then extrude into a volume using Meshmixer (could use something else).

0: https://opentopography.org/start 1: https://giferrari.net/blog/2023/1/2023-1-13-printing-lidar-t...


HA!

I have been following your tutorial for the past couple of days. I run into a major nightmare with GDAL not being seen in python. Its installed in pip list - I have OSgeoNW, GRASS GIS etc - and no matter what I do, I cant get GDAL to work, thus the phstl conveter for mesh cant be run and I get stuck.

I was inspired by that exact same user when that was posted to /r some time ago - and I went down this path then - and got just as frustrated.

This is a nice tool, along with its desktop friend:

https://github.com/potree/PotreeConverter


Nice write-up! I wish there was a place where I could have a piece like printed _and_ painted.


If you're willing to make the textured 3D model yourself there are services that can 3D print in color.

https://www.shapeways.com/materials


A couple of years ago Troy Hunt printed a map of where he lives in Gold Coast[0], using a separate piece of plastic underneath to show off the canal running by his house. I spent a while trying to replicate this and eventually gave up as I was missing way too many skills (as well as a printer). I might have another bash at it using this project - thanks!

As an aside, has anybody in the UK used a 3D printing service that they would recommend?

0: https://twitter.com/troyhunt/status/1460146136514134021


https://www.3dprint-uk.co.uk Great people to deal with and prices are usually excellent, especially if you don't need fast turnaround.


If you want to replicate a 3D print of that scale, buying your own printer is likely more cost effective. You can get a good printer for only a few hundred dollars.


It will cost you less just to buy a 3D printer. Online 3D printing is very expensive. I would only recommend it for small parts that can't be done with FDM.


It might be worth it to some people to avoid having to learn a new process involving bespoke software and hardware and have someone else do it with a guaranteed outcome.


If you do sort it out it needs a blog post!


Looks like there's a blender plugin that lets you import glTF and output something a 3d printer would accept.

Would be cool to have a framed wall hanging of a bas relief portrait of your hometown. Maybe then print a satellite image onto a hydrographic film and apply it? (or just paint it to match?)


Yeah, BlenderGIS. It's the shiznit. I use that thing for basically all my terrain now; there's no tergen as good as ol' Planet Earth..

If you're doing visualizations or interactive stuff, it's also FAR better than just importing DEMs and displacing a subsurf plane, for the precisely same reason you can't have a perfectly accurate map on a 2d plane. The BlenderGIS stuff, meanwhile, will always be correcting for those sphere hijinks, so when fresh data comes in it isn't progressively more and more off. Which is precisely what happened to me when I tried to re-create FDR (flight data) on terrain generated from DEMs. The track kept deviating more . . and more . . and more . . even though the latlons were correct. BlenderGIS set me straight, and looked better.

Dang, I'd give my left nipple to do this stuff professionally full time, but whatcha gonna do.


my home town was just a bunch fields upon fields full of cows. i could probably just buy the toys from amazon and glue them to a piece of fake grass. would probably look 10x better than some 3D printer output.

not sure that's the image you had in mind.


haha, mileage may vary based on which miles you're talking about! but my town's topography is distinctive enough that I'd recognize it. and if you paint satellite imagery onto it, even more so.


I created an API key, because I've been interested in creating a 3D map of Acadia National Park (Mt Desert Island) for a while.

On the website, I put in the coords (44.3386,-68.2733) and hit Fetch Tiles and get

    Fetching tiles at (44.3209 -68.2635, 9, sse: 7)
    Failed to fetch 3D Tiles! 

    Failed to load resource: the server responded with a status of 403 () index.f704be55.js:3623
    Error: Failed to fetch resource https://tile.googleapis.com/v1/3dti...
        at CS (index.f704be55.js:3605:16501)
        at async Tb (index.f704be55.js:3605:33883)


I'm getting

  ==== No tiles found for screen space error 8. Getting tiles 
  that are within 2x of 64 ===
  Fetching glTF 0/2
  Fetching glTF 1/2
  Normalizing & stitching together 2 glTF's
for these coordinates. Make sure you have enabled retrieving these 3D tiles in Google's console.


> Make sure you have enabled retrieving these 3D tiles in Google's console.

D'oh, thank you.


Can someone explain the API situation? I have a dev account and I created a project, and I put a credit card in the billing info, and it gave me a maps api key which doesn't seem to work in the app (says 'failed to fetch resource).

When I go into the project it tried to get me to sign up for a monthly service which was unclear what it does and was not 'escapable' (I had to leave the page or choose a paid plan).

I really don't want to hit 'accept' on something and find out a month later I have a bill from google. Is there something simple I am missing?


  > Is there something simple I am missing?
Yes. Last year's Google Maps API. We all miss it.


Anyone aware of a search engine for DEM and LIDAR?

Australia has ELVIS which makes it fantastically easy for the whole country

Every other country seems to have a very fragmented approach to elevation data though

I’m aware of OpenTopography but they are extremely coarse compared to the precision of point cloud LIDAR


In the U.S., a great place to start is the USGS Lidar Explorer: https://apps.nationalmap.gov/lidar-explorer/#/

This site provides access to lidar point clouds (and DEMs, etc) collected by many agencies.

Additional lidar data is often available from individual state agencies, which is sometimes not aggregated into the national-scale services. A good search term is "[state abbreviation] gis" for the state of interest.

AFAIK, OpenTopography merely aggregates the data available at the above sources and similar. Unfortunately, OpenTopography has relatively restrictive access terms (e.g., free access only for those with .edu addresses), even though the same data accessed directly from USGS or other federal agencies has no such restrictions.


This would be very cool, if it worked for me. I tried this in firefox first and it downloaded something according to the log, but nothing was displayed and the downloaded gltf file was 800 bytes and seemed to contain only a "sun" object, no mesh.

In chrome instead, nothing gets downloaded at all, it hangs at

> Fetching glTF 0/10

In the console, one can find

  Uncaught (in promise) TypeError: Failed to fetch
    at ha.load (index.f704be55.js:3581:132050)
    at index.f704be55.js:3581:208771
    at new Promise (<anonymous>)
    at ev._loadLibrary (index.f704be55.js:3581:208749)
    at ev._initDecoder (index.f704be55.js:3581:209106)
    at ev.preload (index.f704be55.js:3581:208814)
    at new Hx (index.f704be55.js:3581:181131)
    at Tx.parse (index.f704be55.js:3581:165923)
    at Object.onLoad (index.f704be55.js:3581:164332)
    at index.f704be55.js:3581:133292


Very cool! I'm surprised that Google doesn't offer this functionality. If you keep this project going you could make something extraordinary in this space.


They license most of their data and surely those license terms would be far more expensive if they allowed for this kind of export and offline use. Or they just couldn't license it at all.


Does this imply that I cannot make commercial product using this models?


Their lawyers have an infinite supply of dark glasses and sandwiches for the ensuing mexican standoff, compared to you... :/


The viewer app for the Sony 3D monitor imports glTF files without any processing, and I can confirm that it displays effectively in actual 3D.


Here you can get terrain to STL: https://jthatch.com/Terrain2STL/


What a legend. Thank you, this is really cool and useful.


Very cool!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: