mapbox / mapbox-studio-classic

https://www.mapbox.com/mapbox-studio/
BSD 3-Clause "New" or "Revised" License
1.14k stars 229 forks source link

Point data from csv file not visible in data preview (following steps from Mapbox Studio Source Quickstart) #1307

Closed stevemcf closed 9 years ago

stevemcf commented 9 years ago

Hello,

I am trying to create a webmap of point data on U.S. universities. I followed the tutorial at https://www.mapbox.com/mapbox-studio/source-quickstart/ with no trouble using the linked Earthquake data. However when I try to follow the same steps using my own csv (which has point data with x/y coordinates in columns headed "latitude" and "longitude"-- these are the third and fourth columns-- do they need to be the first and second?), the points do not appear in the data preview window, nor do they appear when I upload the source, associate it with a style, and attempt to style the points in a similar way as done in the tutorial. The column names do appear in the field descriptions area for the layer.

The csv is one that I've used in QGIS and ArcGIS with no problem- it shows about 1000 points of university locations in the US.

The MapID for the source layer is stevemcf.d8b362ba

Some screenshots are below.

Thanks in advance for any suggestions! Steve

nopointsscreenshot nopointsfields

amyleew commented 9 years ago

@stevemcf - What happens when you click the 'Zoom to extent' icon? image

stevemcf commented 9 years ago

@amyleew - it's same as in the pictures above-- a black rectangle.

amyleew commented 9 years ago

Add this data's Configure panel screenshot @stevemcf

stevemcf commented 9 years ago

Here it is @amyleew

configurepanel

wilhelmberg commented 9 years ago

@stevemcf Is it possible to share your csv file that we can have a look? If you want to share privately send to wilhelm@mapbox.com

wilhelmberg commented 9 years ago

@stevemcf another thing: Are you using the latest version of Mapbox Studio? The path to your csv looks a bit strange with forward / and backward \ slashes. This shouldn't happen with the latest 0.2.7. Try removing C: and replacing \ with /. Does this help?

stevemcf commented 9 years ago

@BergWerkGIS thanks! I'll send the csv along to you just now. I assume I have the latest version as I just downloaded it two days ago. I just tried taking out the c: and switching the slash, but it didn't seem to change anything. Might it work better if the file wasn't parked in a google docs folder?

wilhelmberg commented 9 years ago

@stevemcf thanks, got it. Looks the same (black in black) on my machine. Will investigate.

wilhelmberg commented 9 years ago

@stevemcf

If you remove the colum the_geom it works.

Mapbox Studio gets confused because of latitude/longitude and the_geom. When Mapbox Studio loads the csv it also looks for a column that has geom in its name and prefers that one over lat/lng fields. It expects to find a WKT string in the geom column, which isn't the case with your file, and cannot display any data.

stevemcf commented 9 years ago

Aha! Splendid! Thanks for sussing that one out Wilhelm. @BergWerkGIS

Best, Steve