extracting CSV data - google-maps

I am trying to build a custom map in Tile Mill and am new to programming in general so I apologize is if comes off as uninformed. I've done research but I'm not sure if I'm looking in the right place.
My basic question: this is an embedded map of restaurants in the SF area. Is there a way for me to extract the data for the locations to use in building a custom map of my own?
http://www.sfgate.com/food/top100/2012/map/
It seems that if the location markers exist on a map, that meta data is somewhere, I just don't know how/where to access it....I believe the raw formats for inputting location into a map are CSV or KML and wondering if there is a way to extra these data types from embedded maps.
Thanks!!

View the source of the page in question, look for the data (it's under the variable mapLocs, copy it from the page, and write a little script to convert their format to CSV.
^ this is likely against at least 2 different copyrights (newspaper's & geocoder's), so proceed at your own risk.

Related

How to load longitude and latitude information into cesium kmlDataSource?

I want to display the kml file in cesium globe, and as described in the cesium's workshop code, we need to load the file by passing it with the file location (or URL). The following line of code is the specific line of code that cesium loads the kml.
var geocachePromise = Cesium.KmlDataSource.load('./Source/SampleData/sampleGeocacheLocations.kml', kmlOptions);
The entire code is available here
My question is: I have the longitude, and latitude, (and height) information saved in variables and instead of always saving them into .kml file and then load them via folder, I want to pass this information to cesium kmlDataSource (the code above) directly.
It would be great if anyone has any solution to this.
Please let me know if further information or code snapshot is required. Thanks
If you already have the information you need stored in JavaScript variables, there's no need to export to KML and import it back into Cesium. You can directly add the indicators you need as Cesium Entities, which is what the KML loader is creating when it reads a KML.
Typically, a KML-like pin is represented by a Cesium Entity containing either a point or a billboard, and optionally an associated label.
Here are some relevant demos that show how this is done:
Billboard demo
Map Pin demo
Label demo
Each of these demos calls viewer.entities.add({ ... }) along with a position for the Entity and some sort of graphical indication(s) to display to the user. You may place one of each on an Entity, for example a billboard and a label are often both defined when adding a typical KML-like Entity.
If your data is stored on the server however, you will need some mechanism to stream it to the browser. CZML is Cesium's native format for doing so, but KML is also available as an alternative for certain kinds of graphics. You may also use any API of your own design, and create Entities when the data becomes available in JavaScript.

How to extract text from a Google drawing?

I am given a Google drawing containing an application component architecture. The drawings contain text used to manually populate a fairly long parameter file. The parameter file is then used to create an AWS database instance. I'm hoping to automate this tedious and error prone process by extracting the desired values from the drawing and populating the parameter file.
I'm using Python and just getting started with this effort. I've been able to download the file using the mime type "image/svg+xml" but it appears the text is rendered as a vector drawing. I've also downloaded the file as a PDF, but I still can't seem to get the text.
I'm not a master of Google drawings. From what I've read the drawings are very simple and don't support anything like a tag that one might use to find important data. I suspect I'm barking up the wrong tree.
Is it possible to extract text from a Google drawing? If so, what would be the general process flow and what mime type would I use?

Get a .tmx file from its .json

I've been using Tiled to create .tmx maps for one of my projects, maps that I export to JSON before using with Phaser.js.
Problem is, a few months ago I mistakenly deleted the .tmx file for the game first map. It's still working fine but now I can't change anything on the first map layout with Tiled because I only have the JSON for it.
I've been looking for an answer with no success so far, but is there a way to convert a .json Tiled map exported from a .tmx file, back to its original format ?
You should be able to simply open the JSON exported map in Tiled, and save it again as a TMX file. To be able to select the file, you may need to change the file type in the Open File dialog.
Btw, you should consider committing your project to a version control system (Git is a popular one), so that such mistakes will not generally lead to loss of data. You don't always get lucky.

extracting data in csv or excel form from an interactive map

I'm not a programmer but i was wondering if it would be possible to extract a list of zipcodes and median income in either csv or excel form from this interactive map.
http://www.wnyc.org/story/174508-blog-census-locates-citys-wealthiest-and-poorest-neighborhoods/
Data used from the map is coming from this website:
http://factfinder.census.gov/faces/nav/jsf/pages/index.xhtml
You can find also here some data related:
http://www.census.gov/quickfacts/map/RHI225214/36
About your map, i recommend you to find another way to extract those data, like a database or a tool available on a website, or use links provided.

Is it possible to export geometry data from a shapefile to CSV from QGIS?

I'm trying to get geometry data from a large quantity of shapefiles into a database (Google Datastore). The thing is, I don't need to work with maps, I just need the coordinates, so I would like just the numerical coordinates. Ideally I'd like to use CSV, but any plain text would be workable. I have a Mac and have been able to get QGIS installed (I also tried udig but the interface was baffling). While it is easy to load a shp file into QGIS as a vector layer, I'm lost as to how to export the geometry, or even if it is possible.
Does anyone know how to extract plain text geometry from a shp file? Ideally with QGIS, but any method would be appreciated.
The "You can simply right-click the layer entry in QGIS and select "Save as"" approach was right
But the "GEOMETRY=AS_WKT" in the OGR layer option was missing.
I may also be a good idea to convert the coordinate system to WGS 84, as CSV are usually expected not to be projected (and shapefile sometimes are)
You can simply right-click the layer entry in QGIS and select "Save as".
In the dialog, there's an option to save as "CSV".
There are plenty of options to refine the format of the generated CSV file, as well as there are many other file formats to choose from.
Update:
See here for a solution: https://gis.stackexchange.com/a/8846
Outdated Response:
It is possible, in a sort of roundabout way...
Open the attribute table for the layer you want to save.
Select all rows.
Copy the rows
Paste into a spreadsheet
Save the spreadsheet as a csv.
Unfortunately there is no way to do this directly in QGIS.
See here for more details:
https://gis.stackexchange.com/questions/8844/get-list-of-coordinates-for-points-in-a-layer/8911#8911