New answers tagged

0

Look I deleted the line I do not need. When I select Vertex Tool it appears the line I deleted earlier. I think this is the main problem but I do not know how to remote it well..


0

I found it but is is not the result I wanted to get. :D Look I want to this from 2 Polygons: I want that new polygons that is circled with red:


2

Copy both polygons to the same layer as you did. Than use Menu Processing / Toolbox / Minimum bounding geometry. In the dialog, select Minimum Oriented Rectangle as geometry type. Screenshot: orange - input polygons; blue: result


1

I found a solution by changing URL to URI and then doing a toURL(). See below: URI sourceFile = new ClassPathResource("PoliticalSubdivisionBoundaries.shp").getURI(); FileDataStore store = FileDataStoreFinder.getDataStore(sourceFile.toURL()); featureSource = store.getFeatureSource(); GeometryDescriptor geomDesc = featureSource.getSchema()....


1

I created a simple model in ArcMap ModelBuilder that adds the shapefile name as a new field in the shapefile. I assumed that your shapefiles are all in the same folder (Test) and not in sub-folders. If they are also in sub-folders, make sure to set "recursive" in the iterator tool. For the add field tool: make sure the field type is set to TEXT, ...


2

Use ogrinfo. However, it does not know if the editing software has been updating the last update metadata in the .dbf file. GDAL and QGIS do update it. ogrinfo test.shp -al -so INFO: Open of `test.shp' using driver `ESRI Shapefile' successful. Layer name: test Metadata: DBF_DATE_LAST_UPDATE=2020-11-24 See also https://gdal.org/drivers/vector/...


2

A bash solution for this purpose. As stated by other in comments, this recipe considers that dates on your file system/OS can be trusted # Clean to be able to repeat the script multiple times rm *_meta.txt rm summary.txt # Double loop to get basename for shp then from this basename # get all files as your shp various files dates may differ # Sort by date ...


0

One method is to import it to Assets, after zipping the shapefile; as mentioned here.


1

At least one row of your roads is causing this error when SpatialLinesNetwork tries to get its length: > SpatialLinesLengths(l[65403,]) Error in FUN(X[[i]], ...) : non-finite line lengths This row appears to have zero length, which is messing up the length calculation when it is using lat-long coordinates: > l[65403,] class : ...


1

There is an option called Symbology export when you choose "Save as the layer as..". Look at the picture.


1

Assuming you have put your stacks into a list stacks_list, looping in R can be done either using the regular for structure: for (stk in stacks_list) { # Calculate NDVI here } Or with lapply from the apply family: ndvis = lapply(stacks_list, FUN = function(s) { # Calculate NDVI for stack s here }) I would add that if you convert the stacks to a stars object ...


0

The simplistic view that works 90% of the time is that vectors are optimal for categorical data and rasters are optimal for continuous data. So you should think twice before converting your data if you you have continuous values in your rasters. That being said, based on the few information provided, I can guess that the problem of conversion is because you ...


0

Although you only pass the .shp filepath to geopandas.read_file(), geopandas requires the corresponding .dbf and .shx files to exist and determines their paths relative to the .shp.


1

I found that it was an issue with the zip file. The first time I unzipped it I guess something went wrong, the content was only 1kb but then I did it again and the content increased a lot so was unzipped properly. Thankyou for your answers!


3

Here are things I do when I don't see data from a layer: Right click the layer and Zoom to layer to see if it is just located elsewhere, or at a much different scale (your scale in the bottom right is a rather high number) Double click on the layer and choose the information icon (i first from the top). Check that CRS is specified (and correct), and that ...


2

You haven't provided a complete example to test against, but it sounds like the problem is that you're trying to process features in a collection but as written your code is operating on the collection itself. Earth Engine does not support working with feature properties in “array programming” fashion where an entire column is manipulated as a value; you ...


0

It's late, but it might help some people in the future.. You can install this package to create wedge-shaped buffers/geometries as sf objects in R. Use library(buffeRs) buffer_wedge(point, radius, degree) https://cran.r-project.org/package=buffeRs


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 ...


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 ...


0

EUREKA for feature in shape: #geom = feature.GetGeometryRef() geom = feature.geometry() json_geom = feature.ExportToJson() geom = json.loads(json_geom) poly=(geom['geometry'] ['coordinates']) poly_a=(poly[0]) print(point_inside_polygon(x,y,poly_a)) print ("------")


0

Why not use the contains methods on the polygon (geom)? p1 = Point(-90.2, 14.3) for feature in shape: geom = feature.geometry() if geom.contains(p1): print(geom)


0

To get attribute in your svg just label your feature with that field and export that. It will label the feature in svg too.


1

I have found a solution that worked for me: I used Fix Geometries from the Processing Toolbox to repair invalid/damaged polygons I used Polygon Union from the Processing Toolbox to join the shapefiles without error message


0

fatih_dur's answer worked for me but I had to change: f=open(''.join(new_kml),'wb') with f=open(''.join(new_kml),'w')


1

Based on the comments the features which have the line through them are multipart features. These are single features with multiple geometries. If the different parts of the multipart features are touching perfectly then using the Vectory geometry > Fix geometries should merge them together into a singlepart feature. EDIT: If that doesn't work then go to ...


0

Shapefiles in GEE are registered as tables, if you want it to be a geometry just add the following (I named it studyArea but you can keep the name table if that suits you): var studyArea = ee.FeatureCollection(table).geometry()


0

Ref Hong Ooi's answer in https://stackoverflow.com/questions/42059378/cant-use-operator-on-s4-objects-stored-in-a-list-in-r, I've worked out that the area value for individual Polygons in this object can be accessed via: > xfile@polygons[[1]]@Polygons[[1]]@area [1] 9.642906 > xfile@polygons[[1]]@Polygons[[2]]@area [1] 1.854405 Now I just need to ...


Top 50 recent answers are included