No texture display for 3D models in Google-Earth Pro when using KMZ with networklink to other KMZ (including the model) - kml

I face a very strange issue in Google-Earth Pro (desktop client) when I try to display a 3D model "indirectly". Let me explain a bit more.
I try to make life easier for our users by creating a KMZ (=zip of KML) containing only networklink (to other KMZ file in a S3 bucket with presigned links).
These KMZs are very simple (mostly polygons) but one is containing a 3D model, in COLLADA format from Google SketchUp 8 (compatible with GE Pro), including textures files (png) beside. The whole pack (KML + collada + textures) is zipped to a KMZ file.
If I use a KMZ pointing to local KMZ files through the networklink flag : no problem at all. But in my case where I use S3 links, all is working but the textures. The 3D model itself is fine otherwise.
Any idea about how GE Pro is parsing / caching networklinked files to solve this issue ? I guess it is a problem of local path since the content of the file is displayed.

Related

Convert SVG file to Autodesk Viewer svf format

We are looking at using the Forge Viewer for a project to display and markup plans, etc. (for now just 2D, 3D may be added in the future). For some of these items we will have DWG Files that we can convert using model derivative API so no problem there. However, the client also has quite a few existing drawings saved in svg format from their legacy system.
The question is if there is a good way to convert those base svg files into svf that we can display as the 'main' drawing/view in Forge Viewer. I have found things about creating a markup layer from an svg file, but that's not really what we want. We would be using markups to have the user draw on top of the plan with their own tools and place markers, etc. but the main drawing should be from the svg file that they have.
Forgive me if this is simple but I'm fairly new to the viewer and model derivative API so I'm not figuring out how to make this work.
There is no translation support for SVG, to generate an SVF model out of it.
You could either
a) use the SVG inside a format that we support (e.g. DWG - perhaps place the SVG in it using Design Automation API) and translate that to SVF
b) load a dummy model as shown here, and then add the SVG as e.g. markup

Save Openstreetmap, Openlayers output as .png or .svg, server-side

I'm currently building a web application with Openlayers that draws routes en points of interest on a map. This map needs to be saved to a file on the server (.png of .svg), so it can be embedded in a .pdf file. The route and POI information is available as KML file.
What is the easiest way to do this?
You have several options:
Directly export your OpenLayers map to a PNG or even a PDF on the client-side (see these two examples: png export and pdf export).
Use wkhtmltopdf to export a HTML page containing an OpenLayers map to a PDF (on the server-side).
Use MapFish Print 3 which is a print server to generate PDF reports containing maps. You would create a report template and configuration and then send a print request containing the geo-data that you want to print (e.g. tile layers or GeoJSON data).

how to display 3D bulidings with texture in Cesium?

I'm working on 3D web-GIS of an urban area. 3D buildings (with texture) were created in Arcgis and I'm looking for the best solution to display this 3D model on the web. I tried Cesium but I couldn't convert the KML file to CZML. What should I do to convert KML to CZML? Is there any other solution to display 3D buildins on the Web
You could use the gltf format, which basically is JSON.
A converter script can be found on the gltf github page. Also you can convert files online on the cesium webpage.
Cesium provides a function to load gltf files named "Model.fromGltf" as described in their documentation.
Three.js offers the possibility to render gltf as well. You can find an example on the gltf github page as well.

Loading photos in KML/KMZ files

I am going to develop a mechanism to export as many as approx. 100 photos with their position information to a KML/KMZ file.
Just wondering what is the best practise to do this. My initial quick options are:
1. use html img tag in the description of a placemark to internally reference the actual photos wrapped in the internal "files" folder in the KMZ;
2. use html img tag in the description of a placemark to reference the URL of a photo (publicly accessible).
Option one involves writing all photos in the internal "files" folder of a KMZ. This would make it a massive file. Meanwhile, all photos would have to be loaded in memory during the loading of the KMZ file.
My question is with the option 2, if a particular photo would not be loaded until the user clicks on the placemark to open the popup balloon OR all the photos are loaded like the option 1?
Thanks!
Cheers,
Alex
You can think of Google Earth as a specialized web browser and the HTML within a given placemark as being handled same way HTML in a web browser is handled. In option 2 the images are not downloaded until user clicks the placemark and the description balloon is selected and starts to render.
Option 1 you have a huge KMZ file as you describe that must be downloaded entirely to the client and unpacked locally. The file may be too large to download in a mobile device if you want Google Earth mobile users to view it. The Google Earth essentially unpack the KMZ then access images as in the case of option 2 when the placemark with that image is selected. Only difference is that the entire collection must be downloaded in one shot so the initial startup time is slower and depends on network speed.

App / script for cleaning up SVG files?

I'm looking for an app or a script (web service) that can clean up SVG files, by that I mean removing possible copious data such as metadata. When creating the SVG file I've used standard settings in Adobe Illustrator. Upon export the paths look like this -
M 678.567,252.999 c-0.546-1.307-3.898-3.118-5.005-4.007c-1.596-1.276-1.42-3.375-3.09-4.381c-4.297-2.571-9.604-3.125-13.746-5.916
While I need them be cleaned up and reordered in way like this -
M 600.375,693.40625 598.75,695.03125 596.125,694.34375 594.57422,700.50391 592.25,700.16406 591.875,702.59375 593.875,705.53125 592.75,706.40625 593.9375,710.53125 592.75,710.65625 590.3125,712.90625 589,711.96875 587.1875,712.90625 586.8125,711.40625 584.125,710.53125 581.9375,711.03125
Fairly new to working with SVG. What I need these paths for is drawing up a map with Raphael JS and it seems only to take the paths in that particular way.
I tried Scour (http://www.codedread.com/scour/) but with no success unfortunately (the web service isn't working and there were problems running the procedure with Terminal).
To me it looks like Raphaël should support all of the path syntax in SVG 1.1.
Anyway, ReadySetRaphael.com is a site that provides conversion of a subset of SVG to Raphaël code.
Convert .ttf (or other format) to .svg: https://everythingfonts.com/ttf-to-svg .
Convert the svg. to icons separated icomoon.io/app/#/select,
-Import icons'
-Select the icons that you want export
-Click en 'Generate SVG, PNG, PDF'

Resources