How to embed a map into Netlogo using GIS extension? - gis

The format of the map imported should be preferably ".shp" file.Also please tell how to create such a file. I have tried KML but it didn't work.

Yes, vectors need to be .shp to be imported. You can create vector files in most GIS programs (ArcGIS, QGIS, etc) and export to .shp. Or there's online tools for converting KML to .shp (eg http://www.zonums.com/online/kml2shp.php)
Raster files need to be saved as .ASC or .GRD for use as a dataset in Netlogo.

Related

How can I export a .dwg file from the Forge Viewer that also includes MarkupsCore markups?

I'm working on a javascript application that uses the MarkupsCore extension to create markups on a floor plan in the Autodesk Forge Viewer. I want to export a .dwg file from the viewer, but I also want the file to contain those markups. I basically know how to export the .dwg file, but I don't know how to combine the svg markups with the file before exporting. Is this even possible? If so, how?
The markups as stored/saved as SVG files, which is a XML-based format to describe geometry. And I believe you know that :-) I did a quick search and found a few articles about SVG to DXF conversion, where DXF can be imported and converted into DWG via AutoCAD engine (or Design Automation API).
So a route would be: show DWG model, add markups, save as SVG, convert to DXF, convert again to DWG, merge into original DWG. I don't have such a sample nor can guarantee it will work and be accurate, sorry.

How to create b3dm from kml or json

What is the process of making b3dm files from the kml or json file?
I want to use https://cesiumjs.org, it used b3dm files but i have kml and json.
I found 3D Tiles Tools that convert glb to b3dm, is there any way to convert kml to b3dm?
I searched a little bit and I found this conversation on Google.
https://groups.google.com/forum/#!topic/cesium-dev/3tCx3CkL-3U
This Guy goes from kml to gltf to glb to b3dm. He had a problem with falty b3dm data.
Maybe this will help you aswell.
Greetings Doggo

Open Street Maps - using .osm file with GMap.net

I have downloaded India.osm file. I have a windows application written in C#.net. I would like to use GMap.net to plot routes/pin heads etc using offline data from India.osm file. But I do not have any information on how to use GMap.net with .osm files. Please advice.
You need parse osm file and add routes/points/etc to the map

Best way to overlay an ESRI shapefile on google maps?

What is the best way to overlay a shapefile in Google Maps?
After some reading suggests that, converting shapefile into KML and overlaying KML in Google map is an option. If that is the case, how do I convert a shapefile into KMLs?
I believe there would be a few open source tools available for this conversion. Can anyone point to a tool to covert a shapefile to KML without any loss of data?
I like using (open source and gui friendly) Quantum GIS to convert the shapefile to kml.
Google Maps API supports only a subset of the KML standard. One limitation is file size.
To reduce your file size, you can Quantum GIS's "simplify geometries" function. This "smooths" polygons.
Then you can select your layer and do a "save as kml" on it.
If you need to process a bunch of files, the process can be batched with Quantum GIS's ogr2ogr command from osgeo4w shell.
Finally, I recommend zipping your kml (with your favorite compression program) for reduced file size and saving it as kmz.
as of 12.03.2019 FusionTables is no more...
Import the Shapefile into Google FusionTables ( http://www.google.com/fusiontables ) using http://www.shpescape.com/ and from there you can use the data in a number of ways, eg. display it using GoogleMaps.
I would not use KML. Instead, use GeoJSON which you can natively consume in Google Maps API now. It is a newer feature that didn't exist from the original responses.
In any case, simply open the SHP file in Quantum GIS, and then you can output it in any format you like (KML, GeoJSON).
If you are using Google Maps for Work, I found a premium extension that handles loading shapefiles directly where you can just connect direct to the shapefile that you generate from ESRI. I did a search on the CMaps site and found this snippet which loaded US by state shapefile: https://gmapsplugin.net/cmapsanalytics/assets/shapes/usstates.shp
var cMap = new centigon.locationIntelligence.MapView();
cMap.key([your_api_key]);
cMap.layerNames(["Basic Shapes"]);
cMap.dbfKeys([['Alabama','Alaska','Arizona','Arkansas','California','Colorado','Connecticut','Delaware','District of Columbia','Florida','Georgia','Hawaii','Idaho','Illinois','Indiana','Iowa','Kansas','Kentucky','Louisiana','Maine','Maryland','Massachusetts','Michigan','Minnesota','Mississippi','Missouri','Montana','Nebraska','Nevada','New Hampshire','New Jersey','New Mexico','New York','North Carolina','North Dakota','Ohio','Oklahoma','Oregon','Pennsylvania','Rhode Island','South Carolina','South Dakota','Tennessee','Texas','Utah','Vermont','Virginia','Washington','West Virginia','Wisconsin','Wyoming']]);
cMap.userShapeKeys([['Massachusetts','Minnesota','Montana','North Dakota','Hawaii','Idaho','Washington','Arizona','California','Colorado','Nevada','New Mexico','Oregon','Utah','Wyoming','Arkansas','Iowa','Kansas','Missouri','Nebraska','Oklahoma','South Dakota','Louisiana','Texas','Connecticut','New Hampshire','Rhode Island','Vermont','Alabama','Florida','Georgia','Mississippi','South Carolina','Illinois','Indiana','Kentucky','North Carolina','Ohio','Tennessee','Virginia','Wisconsin','West Virginia','Delaware','District of Columbia','Maryland','New Jersey','New York','Pennsylvania','Maine','Michigan','Alaska']]);
cMap.labels([['Massachusetts','Minnesota','Montana','North Dakota','Hawaii','Idaho','Washington','Arizona','California','Colorado','Nevada','New Mexico','Oregon','Utah','Wyoming','Arkansas','Iowa','Kansas','Missouri','Nebraska','Oklahoma','South Dakota','Louisiana','Texas','Connecticut','New Hampshire','Rhode Island','Vermont','Alabama','Florida','Georgia','Mississippi','South Carolina','Illinois','Indiana','Kentucky','North Carolina','Ohio','Tennessee','Virginia','Wisconsin','West Virginia','Delaware','District of Columbia','Maryland','New Jersey','New York','Pennsylvania','Maine','Michigan','Alaska']]);
cMap.polyDataSources([centigon.locationIntelligence.CMapAnalytics.DATA_PROVIDERS.SHAPE_DATAPROVIDER]);
cMap.layerTypes([centigon.mapping.Layer.TYPE.POLY]);
cMap.locations([["https://gmapsplugin.net/cmapsanalytics/assets/shapes/usstates.shp"]]);
cMap.panTo("USA");
cMap.zoomLevel(3);
Do you mean shapefile as in an Esri shapefile? Either way, you should be able to perform the conversion using ogr2ogr, which is available in the GDAL packages. You need the .shp file and ideally the corresponding .dbf file (which will provide contextual information).
Also, consider using a tool like MapShaper to reduce the complexity of your shapefiles before transforming them into KML; you'll reduce filesize substantially depending on how much detail you need.
Free "Export to KML" script for ArcGIS 9
Here is a list of available methods that someone found.
Also, it seems to me that the most efficient representation of a polygon layer is by using Google Maps API's polyline encoding, which significantly compresses lat-lng data. But getting into that format takes work: use ArcMap to export Shape as lat/lng coordinates, then convert into polylines using Google Maps API.
Just to update these answers, ESRI has included this tool, known as Layer to KML in ArcMap 10.X. Also, a Map to KML tool exists.
Simply import the desired layer (vector or raster) and choose the output location, resolution, etc. Very simple tool.
2018 already... I've found this fantastic online tool http://mapshaper.org/ to convert from ESRI shapefiles to SVG, TopoJSON, GeoJSON.
Here is the explanation of how to use it https://www.statsilk.com/maps/convert-esri-shapefile-map-geojson-format
Fast and straightforward! :)

Converting a CAD file to a shape file

Thanks for the assist on my previous question.... I was able to complete my project
This time I have a CAD file created with Autodesk that I need to convert to a shape file.
Couple of questons:
An open source application (can't afford ESRI) that can convert the CAD file to a shape file?
Is that a better file format I can use other than the shape file (shp) format?
Any suggestions would be greatly appricated
Regards
Chris
I would also suggest to use OGR but in only works with dwg/dxf version 2000 or prior; you could use Teigha (http://www.opendesign.com/) to convert the files to 2000 version and then you can use OGR.
I've done tons of conversions from dwg to shp what I usualy do is convert the dwg to a dwg version 2000 using Teigha, then convert that dwg-200 to a shape file; once a shapefile you'll see that this file contains all the layer in order to separate each layer into a different shape file I use this command
ogr2ogr new_map_from_layer_X.shp -where "LAYER = 'X'" shape_converted_from_DWG_lines.shp
You should use OGR
Link
It is the main program for converting between geographic formats. It is written in C++ but there are also python bindings. It is compiled and runs on almost every major OS.
Check out what ODA has:
http://www.opendesign.com/