New answers tagged

-1

I had the same issue. Switching from WGS84 (EPSG:3857) to WGS84 (EPSG:4326) solved the problem.


1

If you add the CSV to QGIS (doens't need geometry or coordinates to do this) then you could use the Vector general > Join attributes by field value tool in the Processing Toolbox to join the SHP and the CSV by road name. Wherever it doesn't work is where you need to correct one or the other.


1

Solved! The problem was that I should be passing these particular option(s) to the function that creates the layer, and not to the function that creates the data source. Eg, like this: let options = ["GEOMETRY=AS_XYZ", "CREATE_CSVT=YES"] var cOpts = options.map { strdup($0) } cOpts.append(nil) let ogrLayer = GDALDatasetCreateLayer(ds, ...


0

You can put a list inside the list csv_fields = ['1', '2', '3', '4'], doint some like this: csv_fields = [['1', '2', '3', '4'], ['5','6', '7', '8']] and put a for outside of the principal loop: out_dataset = 'Data' arcpy.Sort_management(points, out_dataset, [[fields[11], 'ASCENDING']]) arcpy.management.CreateFolder('C:\\Users\\Me\\Desktop', '...


0

You can also use this official GDAL recipe if you prefer command line ogr2ogr -f CSV -dialect sqlite -sql "select AsGeoJSON(geometry) AS geom, * from input" output.csv input.shp


5

You need to set Layer Options > GEOMETRY to any option except <Default> in Save Vector Layer as... window.


4

You may choose: to use GDAL using ogrmerge.py like here but with setting a destination target not a file but your database compare to this example https://twitter.com/ThomasG77/status/1362118505819176966 See ogrmerge doc looping with bash doing something like below (not exact as it depends from your own table structure) psql -c "CREATE TABLE ...


3

You could use Miller (https://github.com/johnkerl/miller). Starting in example from this example input.csv lat/lon 12 14 15 13 38 5 37 4 2 3 35 4 4 3 38 7 8 6 and running mlr --csv reshape -r "[0-9]" -o item,value \ then filter -x -S '$value==""' \ then label y,x,value ./input.csv >./output.csv you will have y,x,value 38,14,5 ...


3

Your problem is that, that is not a CSV file - which is a series of features one per row. What you have is more like an ASCII grid file, so with some editing you might be able to import it that way. You need to create a header block: ncols 4 nrows 6 xllcorner 0.0 yllcorner 0.0 cellsize 0.25 NODATA_value -9999 where you can fill ...


0

yikes, so the above is fine. the code was throwing "NaN" due to inconsistencies (capitalisation) in the 'covid' field in df. Sorry if I have wasted anyone's time.


4

It's hard-coded and you cannot change the default value until developers add an option to change the default value. This is the related source code of Layer Options: Link ... layerOptions.insert( QStringLiteral( "SEPARATOR" ), new QgsVectorFileWriter::SetOption( QObject::tr( "Field separator character." ), ...


0

I wasn't able to identify what exactly was going wrong but below was my rough workaround by pulling the CSV into and out of R first before uploading to GEE. The problem must lie in the way some of the data is stored in this particular CSV. Making sure I could do numerical operations on the coordinates in R and removing a few of the unnecessary columns would ...


0

I finally found the solution: I imported my KML file to Excel opening it as a XML Table type file (the import made Excel load for a long time, but didn't crash). Then I could extract latitude and longitude data. I put them in a blank KML file that I created with Google Earth so this file was correctly formatted. Then I edited the "description" ...


0

You should focus your question as much as possible. I this case, I suppose that you actually want to know how to calculate EVI? Also, make sure you have a fully functional script, ideally with a link to the Earth Engine Code Editor script (use the Get Link button). Here, UStracts is undefined, so I cannot execute your script. Here's one way to calculate EVI: ...


0

Without any screenshot is hard to help you, but if you have i.e. Notepad ++ you can try to Replace all blank names with the name you want. I guess, your .XML code looks now as: <Placemark> <name></name> Then after Crtl+F click toggle Replace and replace it with name you want, like below: Thereafter each point will have a ...


0

You need to bring in the data as you say in "cartesian" coordinates. Most likely your data is in British National Grid, so EPSG:27700. But you want to check this in the source data. Once it is in QGIS, you need to reproject the data (convert to a different projection). This can be done with Vector> Data Management Tools> Reproject layer. And ...


5

Loop through a list of field names perhaps: fields = ['field1', 'field2', 'etc...', 'field12'] # Or fields = [f.name for f in arcpy.ListFields(out_dataset)] fms = arcpy.FieldMappings() for field in fields: #Define field mapping objects fm = arcpy.FieldMap() # ***NOTE: 'field1, field2, etc, are actual fields that have different names*** ...


3

When you open a csv file, with GeoPandas it automatically adds a geometry field, empty here gdf = gpd.read_file('myFile.csv') print(r) GEOMETRY name geometry 0 MULTIPOLYGON (((-53.753618620372258 -16.815490... Greens None 1 MULTIPOLYGON (((-53.762200546706367 -16.803172... Tomas ...


3

You will need to learn how to use field calculator. See this section of the manual to start. Then, your field is a string (text) field from which you need to extract the relevant substrings for the x coordinate and y coordinate and convert them into numbers. The expression substr(string,startpos,length) will let you extract length characters starting at ...


0

It looks like you imported your layer correctly, however there is a problem with your OSM Layer. The display shows coordinates in the millions, but the display CRS is 4326, which makes no sense. My guess is that the CRS of the OSM Layer was wrongly set to 4326 previously. So, reset the CRS of the OSM Layer to EPSG:3857 / Web Mercator, and everything should ...


3

Select rows Copy selected rows to clipboard Paste in Excel


Top 50 recent answers are included