Tag Info

New answers tagged

0

I'm not sure if there's a csv parser implemented yet but if not you could parse the csv yourself to geojson, for example with php... or you could test http://mapbox.github.io/csv2geojson/ https://github.com/mapbox/csv2geojson If it doesn't have to be csv then just get the layer in kml : ...


1

This is a process that takes several stages. 1) You need to turn the coordinates into shapes. Any good GIS can do this; in the case of QGIS just add the data using the "Add delimited data". Tutorial: http://maps.cga.harvard.edu/qgis/wkshop/import_csv.php 2) Then you need to turn it into a 3d model. This is more problematic. QGIS has poor/no real 3D ...


2

You could run your script, convert the csv and then read the converted data with the OpenLayers.Text-format. But I also think that it's more straightforward to change the way the csv is read if you can't change the csv (on the server side) before you read it with OpenLayers. I just gave it a quick try and it works. I just made a copy of the file "Text.js" ...


1

Why not take a look on the OL.Format.Text code (not a big class) and see if you can extend it to use your own parser? I mean, creating a new OL.Format class that has your own logic on how your data is structured, that is, basically changing some bits on the read method.


0

I've tried that code, didn't help. I've also tried with strategies: strategies: [new OpenLayers.Strategy.Fixed()], no good. The problem that might be is: i recieved excel file with csv extension and in that file, values are separated with comma. That file was downloaded from geoserver. Also csv is Comma Separated Values, and i guess i'm not supposed to ...


0

yes it does. as John Barça mentioned correct your map.addLayer section. here a working example of mine: var layer = new OpenLayers.Layer.Vector("POIs", { strategies: [new OpenLayers.Strategy.BBOX({resFactor: 1.1})], protocol: new OpenLayers.Protocol.HTTP({ url: "data/textfile.txt", ...


1

I just realized that one of my column headers was solely a number -- which I thought I'd fixed. Sorry about that! If you're ever having this problem, please make sure none of your column headers are numbers; it makes QGIS assume it's a value instead of a header.


1

Use the Add Delimited Text Layer add option. It has much better handling of CSV then what OGR has via the Add Vector Layer add option.


0

I got what I need and I want to sum up two possible solutions: First one was the link posted by @Vince in the upper comments: How to convert geometry to WKT using ArcPy? It uses Python in connection with arcpy. Thx for the find Vince. Another solution, using python only is script called shapefile.py. It can be found here: https://code.google.com/p/pyshp/ A ...


1

Seems to be easy, you just need to create the XY coordinate field in your polygone table and later in the script use the arcpy.da.SearchCursor(Poligone.shp,"FieldXY")in something similar to this. Hope this works for you ^^ with arcpy.da.SearchCursor("Poligone.shp",'Field') as Buscador: with open(nombarch2,"a+")as c: for row in Buscador: ...



Top 50 recent answers are included