Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

New answers tagged

1

This is an old questtion but I got here trying to find a solution to a similar problem so I'll share my solutions: I have two solutions for this problem. Option 1: add SRID to the table One is adding an srid to the table that is missing one, or removing the srid from the one that has an srid. Basically make sure the SRID of the two tables match. Option ...


0

You will need to specify an opacity as a CssParameter <sld:Fill> <sld:CssParameter name="fill-opacity">0</sld:CssParameter> </sld:Fill>


2

How to find out how far a county is from the nearest coastline: Install the NNJoin plugin. Run the NNJoin plugin, using the county layer as the first input, and the coastline as the second input. It will create a duplicate of the county layer, with an additional 'distance' field that tells how far the nearest coastline is. How to create a field that tells ...


2

You can use Field Mapping (bottom part of your "Merge Inputs" screenshot) to merge all FIDs into the same column. But if you dont need the FID values it is easier to delete the columns after merge. A quick way of deleting them is to use arcpy. List all fields with name starting with 'FID' then pass the list to Delete Field. Execute in python window of ...


0

If you can handle a tiny bit of inaccuracy on the boundaries defined by existing lines, you could use the following method. Note that the boundaries defined by existing polygons would remain perfectly accurate. There is also some potential to "fix" the inaccuracies afterwards (see the note at the bottom). Create a feature class containing all of the ...


0

Google Earth does not have the kind of analytical tools to create a precise buffer for you. If you need it to be exact, then you'll probably want to try some GIS software like QGIS. That said, if you only need it to be roughly accurate, and your line isn't too complex, then you could use a combination of the measuring and drawing tools in Google Earth Pro....


7

This solution might be not the best one in terms of time consumption and performance because of the data size (calculating for the whole world). However, if you want to achieve a "rapid" result (here you do not need to set up anything) IMHO this is what you need. Nevertheless, handling large data sets will be much more efficient by means of PostgreSQL with ...


1

Does not sound like you want to Clip. Instead try Spatial Join to only transfer attributes: Joins attributes from one feature to another based on the spatial relationship. The target features and the joined attributes from the join features are written to the output feature class. The geometries will not be modified


1

Contradicting my own comment, here are a few suggestions (not recommendations) I found by some quick searches. I tried the websites but not the apps. Websites: GPS Visualizer: website that lets you draw points and lines (but not polygons) on a map and export it as a gpx http://geojson.io/ : website that lets you draw points, lines and polygons and export ...


1

Frame Challenge: This is not a good method for what you're trying to achieve. Labels are always rendered on top of all the features on the map. So you'll never be able cover up the labels with a polygon. Instead, try replacing the labels with a font marker symbol. When you put a polygon on top of a point, all parts of the point symbol that fall underneath ...


2

You could use refFunctions plugin together with the expression geomwithin('polygon','$geometry') is NULL for that: Replace 'polygon' with the name of your polygonlayer. Just set the expression as filter and lables of points covered by the polygon will no longer be shown.


1

I got the answer by applying Cyril's query. SELECT ST_ExteriorRing((ST_Dump(ST_Union(geom))).geom) as geom FROM geo_gem_05; or SELECT ST_Boundary((ST_Dump(ST_Union(geom))).geom) as geom FROM geo_gem_05; The resultant output is given below


1

I do not understand your question a little and therefore I will offer you two possible answers, use the one that answers your question Option 1 - to find all boundaries, run the query: SELECT ST_ExteriorRing((ST_Dump(geom)).geom) as geom FROM geo_gem_05; Option 2 - to find only a common external boundary, run the query: SELECT ST_ExteriorRing((ST_Dump(...


1

Tested on QGIS 2.18 and QGIS 3.4 I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer... Let's assume we have 10 features in "buildings" and 16 in "roads" accordingly, see image below. With the following Query, it is possible to find out the distance between a given building e.g. WHERE b.propertyid = '1' and the ...


1

If you read the documentation for spCircle, specifically the Value section: Value: A list with the following components... spCircle : The "‘SpatialPolygons’" polygon object. location : The "‘SpatialPoints’" point object. you'll see it returns a list with two components. It looks like you want the polygon object. In your loop make a ...


0

An alternative approach would be to convert the building polygons to lines, or nodes. Then multi buffer the roads, probably in increments of 1 metre. Spatial join the two files and export the attribute table to Excel. That way you could select the closest wall of a building. Bit of a clunky method, but is one way of handling large buildings.


1

Read the help for SpatialPoints, specifically the arguments: Arguments: coords: numeric matrix or data.frame with coordinates (each row is a point); in case of SpatialPointsDataFrame an object of class SpatialPoints-class is also allowed So a simple two-column matrix (here with four rows) can be a set of four points: > ...


2

What do you mean by "The function doesn't work"? It does work for me. SELECT ST_AsText(ST_Boundary(ST_GeomFromText('MULTIPOLYGON ((( 340 520, 400 460, 200 420, 340 520 )), (( 420 420, 520 300, 340 320, 420 420 )))'))); Result: MULTILINESTRING((340 520,400 460,200 420,340 520),(420 420,520 300,340 320,420 420)) The result is a multilinestring with two ...


1

For qgis 3.8 and later you can use "join by nearest" from the processing toolbox.


5

While in general this would be better handled in PostGIS, there are plug-ins which do the heavy lifting for you: NNJoin MMQGis Hub Distance. NNJoin This is the preferable and correct way, however could be slow on large datasets. It has the non trivial advantage to compute the correct polygon-to-line distance, without converting buildings into points ...


0

For automization purposes one could also get a combination of city names and ZIP codes by using the Python console (QGIS2.18): from qgis.utils import * import csv CITY_name_list=[] ZIP_id_list=[] cities_list=[] layer = iface.activeLayer() for field in layer.pendingFields(): if field.name() == 'CITY_NAME': idx_CITY_NAME = layer.fieldNameIndex(...


0

Thank you for your detailed response. I should have included some pictures to help show some examples of what I was hoping to achieve. I guess I will just continue to add these manually in print layout. This first image I have pasted below shows compartment No.4 has two sections and there is visual link indication showing they are both compartment No.4. ...


1

This workflow will create mid points of edges between polygons and delete outer ones called "LINKS": arcpy.FeatureToLine_management(in_features="PGONS", out_feature_class="C:/SCRATCH/OUTLINES.shp", cluster_tolerance="", attributes="NO_ATTRIBUTES") arcpy.Dissolve_management(in_features="OUTLINES", out_feature_class="C:/SCRATCH/edges.shp", dissolve_field="", ...


0

It sounds like you're talking about multi-part polygons. This is when a single polygon feature contains more than one part. To distinguish which features have multiple parts, use the num_geometries() function. Use the Field Calculator to add a field called "num_parts", with the expression num_geometries($geometry) Now you can use the "num_parts" field ...


0

I went back to the original shapefile and removed the .lock file, this solved the problem. I guess it corrupted the data when I converted it to geojson.


0

Tested on QGIS 2.18 and QGIS 3.4 I can suggest using a "Virtual Layer" through Layer > Add Layer > Add/Edit Virtual Layer.... Let's assume we have five line features in "lines", see image below. With the following Query, it is possible to achieve the result. SELECT l.id, l.NAME, MakePolygon(AddPoint(l.geometry,StartPoint(l.geometry))) FROM lines AS ...


2

The geopandas.sjoin function only supports the 'intersects', 'within' and 'contains' predicates, and not a "nearest" one. You can write a custom function to find the id of the nearest linestring for each polygon, and then merge on that. This could look like: def nearest_linestring(polygon, df_lines): idx = df_lines.geometry.distance(polygon).idxmin() ...


1

For QGIS3, there is a simpler way to do this using the aggregate expression. Add a new field with the following expression. Assuming your layer name is 'polygon' aggregate( layer:= 'polygon', aggregate:='count', expression:=$id, filter:=touches($geometry, geometry(@parent)) ) See more at https://spatialthoughts.com/2019/05/23/neighbor-polygons-...


0

NDVI Time Series can be done with LandViewer via built in interface. 1.You would need to locate an area of your interest and mark it with AOI tool Hit “time series” analysis icon on the left and set parameters needed Once done you will be able to export the data wherever needed as multiple formats are support such as KML, geoJSON, CSV, SHP, WMS and more


2

One quick way would be to use the Grid Index Features tool to create a rectangle of the size you need and divide it into the quadrants you like. Adjust the parameters polygon_width and polygon_height to match your need (1 hectare) and number_rows and number_columns as well (16). Of course then you'll need to move the resulting layer by hand with the ...


1

You want ST_ENVELOPE as in SELECT 'place1', st_asText(ST_Envelope(ST_GeomFromText('POLYGON((-71.1776585052917 42.3902909739571,-71.1776820268866 42.3903701743239, -71.1776063012595 42.3903825660754,-71.1775826583081 42.3903033653531,-71.1776585052917 42.3902909739571))',4326))); Gives POLYGON((-71.1776820268866 42.3902909739571,-71.1776820268866 42....


0

I use Global Mapper for this type of conversion.


6

If it's for specific cities and regions, you can use Overpass Turbo to create queries like admin_level=6 to find border ways. You'll want to consult the Tag:boundary=administrative wiki page to make sure that you're using the right admin level for the country you're looking at. If, however, you want to just extract those borders for the whole planet, you'll ...


2

In the first graph you have selected only the NDVI band using l5.select('NDVI') While in the second graph you do not do that, and then the band defaults to the first band values. That's why the values differ. Try: //Create a graph of the time-series. var graph = ui.Chart.image.seriesByRegion({ imageCollection: l5.select('NDVI'), regions: col, reducer: ...


Top 50 recent answers are included