texts: How to insert random points with weight?

texts: I have a polygon shp divided in 5 regions. I want to fill it with 1000 random points but not to be so random :). I want 300 points to fill one region 100 another...for the moment the one tough decision I think about is to cut the regions in separate shp files and then to insert the amount of random points I want. After that i can unite all the shp files in one which will have all the random points. Is there another quicker way?


texts: Automatic calculation of line orientations in QGIS

texts:
I was able to see the types of cables ("* TYPE " in my data table) entered manually and the length of these cables (automatically calculated using the " Slength *" function with the name LONG in the field calculator). this whole info on the same label

("*TYPE||'\n'||LONG||'m'*").

It is now impossible to make visible the orientation of the cables (Shape of line type) in gradians (between 0 and 400), with the origin reference in the Eastern direction.


texts: How can I conceal peoples' precise locations in ArcGIS Pro?

texts:
I work in public health and I will be displaying positive infection cluster data to the public.
For the safety of the public and those infected, I want to somehow conceal their precise location.
I have thought of a couple possibilities.
Is there some way I can distort the streets' shapes in my shapefile?
Is there a basemap that's entirely vague? Pro does not have one vague enough for what I need.
How can I move the basemap so that it isn't representing my actual points' locations?
Any other techniques or practices?


texts: qgis feature classification of filegdb datasource bug?

texts:
When I am trying to create a symbol classification from a filegdb datasource in qgis the list of unique attribute values is not being populated when I hit the 'Classify' button. It loads a single color block and and empty space for value.
If I convert this dataset to a .shp and try to classify it, it works as expected. This is happening when the datasource is loaded with both the openfilegdb driver and the ESRI Filegdb driver. Is this a bug?
after hitting 'classify' with the gdb:

after hitting classify on the .shp version:

I'm using qgis 2.14.0 on Mac OSX 10.11.4, GDAL 1.11.4


texts: GeoServer WMS correct WFS wrong coordinates for line features?


texts: Using the Range input parameter in QGIS Processing Model

texts:
I have built a model which requires a range of integers between 0 - 13 as an input. I am using two different Number parameter inputs, Minimum and Maximum, which works, but is somewhat awkward because the Number input is not an integer.

I have seen that there is a Range input available, which looks like a better fit, but I do not seem to be able to access the values of the input from algorithms.

Examples below, showing behaviour of Number vs Range parameter inputs

Input GUI of Number parameters vs Range parameter

Model builder - can't choose a Range value as input, only the Minimum and Maximum Number inputs


texts: Drawing lines for every row from a table

texts:
I would like to make a map showing all the train trips made by different users. I know how to make the difference between a single trip on a traject and many trips by using opacity.

For now I have data of every user between which stations they travelled and which route they took (Dijkstra's algorithm doesnt apply as some users take longer routes). The route is now an array but if it's easier to use in another format, feel free to say so. The core of the date I would like to use looks like this:

User | Route
Tim  | 1,2,5
Max  | 2,3,4
Ann  | 3,5,6
Jane | 4,3,2
...  | ...

Each number corresponds to a traject between 2 stations which the user travelled on. (see image) I would like to plot every time a traject is used by a user, a line on the map showing that traject. Of course the shape (a polyline) of each traject is available.

How can I get from this table and list of shapes to a map which shows all trips made in QGIS?


texts: Google Earth Engine. How to get cloud cover score for each image in image collection?

texts:
I want to estimate cloud cover of each image in an image collection + would like to print out results for every image. I can see that cloud cover estimates are available for each image in their properties. But how to extract them to one table?

I am using this data:

//Load data collection
var l7r = ee.ImageCollection("LANDSAT/LE7_L1T")
.filter(ee.Filter.eq('WRS_PATH', 144))
.filter(ee.Filter.eq('WRS_ROW', 51));


texts: Select all features from current map extent ArcGIS JavaScript 3.29

texts:
I am trying to select all the features which are present in the current extent of map i.e which are visible on screen. I find this link helpful but it iterates through all the graphics and check if that graphic is present in the current extent and adds to result set as shown in code below
dojo.forEach(map.graphics.graphics,function(graphic){
      if (extent.contains(graphic.geometry)) {
        graphic.setSymbol(highlightSymbol);
        results.push(graphic.getContent());
      }

The feature layer of my map consists of thousands of features and I might need selecting very few based on map extent and zoom level. I feel the above code takes lot of time as it needs to iterate through thousands for the few features. I am trying to update the result set whenever the user drags the screen as the map extent change.
Is there any other better way to select features based on the map extent?


texts: Is Geoenrichment a trademarked Esri term?

texts: I've recently seen the term "Geoenrichment" turning up on ArcGIS Online.  Is this a term Esri invented, or are other organizations using this terminology? Are there other synonyms for Geoenrichment?  Does Esri have a trademark on this term?


texts: Installing eccodes with conda install windows

texts:
I am trying to install eccodes using conda forge, following the advice on https://anaconda.org/conda-forge/eccodes, on a windows 10 computer.

I keep getting an error message:

failed with initial frozen solve. Retrying with flexible solve.
failed with repodata from current_repodata.json, will retry with next repodata source.

Has anyone had difficulties with this before?

Edit: I found a work around by reinstalling conda-forge, and making a new virtual environment


texts:
I have a road network with StreetName and min/max address ranges for each segment (ie- StreetName = 'Main St', Min = 100, Max = 199).  I also have individual address points with similar information (ie- StreetName = 'Main St', HouseNumber = 115).

I would like to assign the featureid (gid) of road segments to each address point that has matching StreetName and falls within the min/max range of the road segment.  In ArcGIS I would probably write a searchcursor for the roads and that would look cycle through each road segment, get the gid, name, min, & max values, and then do a query statement to find all address points with HouseNumbers that fall within the given segment range (ie- select AddressPoints where StreetName = 'Main St' and min >=100 and max <=199), calculate the gid of the road segment into a field for the selected points in the Address Point layer, then move on to the next road segment and repeat.

How would I write a similar cursor in postgres/postgis or
Is there a more efficient way of doing this?


texts: How to transfer aerial archives from USGS earth explorer onto GoogleEarth?


texts: Digitizing parcel data and adding attributes to create interactive map

texts:
I am quite new to mapping and am attempting to learn by taking on an arbitrary little project (I also don't know how to code hope that's not going to be a problem). I want to create an interactive map that shows the residential parking permit zone along with relevant info such as time limit and enforcement details. Currently everything is static.

Data I have obtained:

City-wide RPP zone map in pdf (http://www.ci.berkeley.ca.us/uploadedFiles/Public_Works/Level_3_-_Transportation/RPP_R(1).pdf)
Parcels by RPP Area in gif (http://www.ci.berkeley.ca.us/Public_Works/Transportation/Residential_Parking_Permits.aspx)
Parcel data from the City's Open Data portal. I can export them into shapefile to be imported to either qgis or CartoDB (?)
All relevant info associated with each RPP Area such as time limits and enforcement hours.

So my questions are:

Is there a way to merge these data together effectively?
It looks like I can overlay the zone map (in pdf) over the parcel layer?
If so, what tools do I use?
Do I have to digitize the pdf first?
How do I actually merge them and keep all the attributes?

Ideally I would want to have one layer for each zone, color coded, so I can turn them on and off.

I know how to create new layers by selecting features in ArcGIS (learned how to do that a long time ago in college), is it going to be similar in QGIS or in the other tools that you recommend?

My goal is for users to toggle over a location and know instantly the nearby parking restrictions.


texts: How to combine stacked polygons within a shapefile?

texts: The image below shows my shp-file. Every polygon has the same transparent color. So a darker blue means, that several polygons are stacked! How do I cut every polygon with each other so no polygons are stacked anymore?


texts: QGIS 3 won't open in Windows 10 pro, how to fix?

texts:
I have installed QGIS 3 in Windows 10 pro 64 bit, but it won't open the GUI. This is the error:

And then this:

Some specifications:

I had installed QGIS 2.18, and it ran perfectly.
I had installed the latest QGIS 3 under "Program Files" folder and also in the root C:.
I installed with OSGeo4W software and with QGIS desktop .exe, load to QGIS web page.
I run other software like PostgreSQL, GeoServer, GeoNetwork and ArcGIS  on the PC.


texts: Distinctly color world map by language in QGIS 2.4

texts:
For a map of Wikipedia language prefixes, I need to color a map by a country's value in the 'language' column. I. e. all countries with the same language worldwide should share a color, which they should share with no group that is directly adjacent to them on land.

For a visual explanation of what I want to do, here's a map where I tried the same in GIMP (missing kk.wikipedia.org; warning, 5 MByte):

I would now like to do the same in QGIS for easier handling, plus fully coloring a country in a raster map seems to be impossible (especially for islands).

Unfortunately, QGIS does not even seem to include a plugin to color adjacent polygons differently any more, not to mention such complex shapes. I found the plugin topoColour from QGIS 1.0, which seems to be exactly what I want, but it is of course extremely outdated.

Is there any kind of work flow to achieve the same half-manually? Manually applying the four-color theorem (or six- or eight-color in this case) is quite a daunting task, especially as QGIS doesn't seem to be meant for that. Note that I do want to keep countries separate so I can easily change their data when their language changes or a new Wikipedia is created.

I would not mind an outside tool like the standalone version of topoColour, but that one only colors by adjacency, not shared values like the plugin did. I only have Linux available, though. (Debian unstable.)


texts: Finding and loading global population density raster data into R?

texts:
I am using the Bioclim dataset for a maxent project right now, but I want to add demographic predictors along with climatic ones. I have the 19 layer raster data from Bioclim and I'm hoping to use the raster::addLayer function to add the demographic data (population density, etc). I'm having a hard time finding a dataset (I've found this one on gridded population density but I'm not sure how to use it) and if I did find one, I'm not sure how to integrate it into R (what I'm using now is a saved .Rdata file which has it loaded in already). This type of project is completely foreign to me.

My concern with any dataset is mismatching spatial resolutions between the layers when using maxent from the dismo package. Is this valid? Here's what I have from the Bioclim:

class       : RasterBrick
dimensions  : 900, 2160, 1944000, 19  (nrow, ncol, ncell, nlayers)
resolution  : 0.1666667, 0.1666667  (x, y)
extent      : -180, 180, -60, 90  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +ellps=WGS84
data source : in memory

It looks like the resolution is 10 arc-minutes, and I see other datasets that are more fine grain. Can I convert from the fine to this coarse? The other problem is the extent of this dataset, it's a little larger than others, can I pad other raster data with blank cells to fit the -60:90 extent?


texts: Loading a shapefile into PostgreSQL using shp2pgsql and outputting geographical coordinates using Django to draw a polygon in Leaflet

texts:
I have been trying to put a shapefile into a PostgreSQL database. I then want to query the database with Django and output coordinates that I can use to draw a polygon in Leaflet.

So far I have the data in the database and the geometry field is formatted as a MultiPolygon. The shapefile has the geometries of a couple of zipcodes in Iceland. When I output the file earlier to geojson the coordinates were familiar and I could draw the polygons with leaflet.

Example coordinates [-21.7240265318041,64.1164542988339]

In the database after the import using shp2pgsql the geometry field looks like this
SRID=4326;MULTIPOLYGON(((-2418307.5715 9379398.2617,-2418549.5059 9379779.3083,-2418962.0811 9380031.9054,-2419644.0931 9380225.5631,-2420662.9013 9380629.7184,-2421471.2119 9380924.415)))

I have tried using GeoDjango functions to convert it to the original coordinates so I can draw the polygons but without luck.

I guess there is some really simple trick that I am just not figuring out.

Here is the Django code

zipObject = Zip.objects.get(zip=zipCode)
zipObject.geom.coords

This outputs the coordinates like this.
((((-2440522.3707000017, 9384385.061399996), (-2440762.8805, 9384356.614), (-2441141.111299999, 9384328.246699996)...

What am I missing here?


texts: Can I download a layer displayed on the google api?

texts: Given the google api displaying a map on some site with layer 'A' on top of it. How can I create a GIS file for layer A (as simply as possible of course)?


texts: Autofill attributes in QGIS based on locations

texts: So I have a polygon layer (admin boundaries); what I want is when I create a point inside any of the polygons, some attributes are auto filled in the point inherited from the polygon it is in. I looked for similar questions, but one was using a deprecated plugin (Auto fill) which doesn't seem to work in QGIS 3.0 or later.


texts:
I am trying to add multiple symbols to my SLD using the bulk ttf marks.
However it does not work, it always returns a blank mapview.

This is part of my code and lets say I would like to add a little diamond:

    <Rule>
      <Title>diamond</Title>
      <ogc:Filter>
        <ogc:PropertyIsEqualTo>
          <ogc:PropertyName>symbool</ogc:PropertyName>
          <ogc:Literal>Diamond</ogc:Literal>
        </ogc:PropertyIsEqualTo>
      </ogc:Filter>
      <PointSymbolizer>
        <Graphic>
          <Mark>
            <WellKnownName>ttf://Arial#0x2666</WellKnownName>
            <Fill>
             <CssParameter name="fill">
               <ogc:Function name="Recode">
                 <ogc:Function name="strTrim">
                   <ogc:PropertyName>kleur</ogc:PropertyName>
                 </ogc:Function>

                 <ogc:Literal>Blue</ogc:Literal>
                 <ogc:Literal>#6495ED</ogc:Literal>

                 <ogc:Literal>Green</ogc:Literal>
                 <ogc:Literal>#B0C4DE</ogc:Literal>

                 <ogc:Literal>Yellow</ogc:Literal>
                 <ogc:Literal>#00FFFF</ogc:Literal>
               </ogc:Function>
             </CssParameter>
           </Fill>
          </Mark>
        </Graphic>
      </PointSymbolizer>
    </Rule>

The data consists of a few points which have two columns to declare how they should be visualized. One is containing a symbol code (Symbool) and another a color code (Kleur). (It is partly in Dutch)

I am only a geography student (so also a beginner and not a real ITer) and we might have limited rights (I'm not 100% sure).
I thought maybe I couldn't use the font Arial, but when I did a quick test by adding a label, this does work.

Do I make another mistake?


texts: mysql foreign data wrapper for postgres with parameter substitution

texts:
I have created a mysql_fdw for my postgres and when i try to run the one with a subquerry that has parameter substitution it does create a table but on querying the foreign table it throws an error:
 CREATE FOREIGN TABLE overtime_2010 (
    id integer,
    employee_id integer,
    hours integer)
    SERVER mysql_svr
    OPTIONS (query 'SELECT id, employee_id, hours FROM hr.overtime WHERE year =     ?year;');

The sql creates the foreign table but executing a select query yields The following error: connection to the server was lost. Attempting reset: Failed.

Also trying to create a local table also fails with the above error
Create table local as select * from overtime_2010;


texts: Creating custom tiles from information of a node-link graph?

texts:
For my thesis I want to visualize node-link graph in form of a Web GIS. The graphs consist of up to 30.000 nodes and edges. I am new to GIS, completely overwhelmed by the tools and techniques and do not know how to progress.

What I already have:

Plane coordinates X,Y for points (represent the nodes of the graph) and lines/streets (represent the edges of the graph)
X, Y coordinates of polygons as "countries" (represent the clusters of the nodes)
Layer level Z for all elements (should indicate which elements will be shown at which zoom level)

What I want to achieve:

Responsive slippy map (similar to http://gmap.cs.arizona.edu/map/9895/) but with highlight and search functionality
Also (and most important) the map should realize a kind of "map generalization" (Show in the layers only elements with a certain zoom value Z or lower)

I am able to create one big SVG or GeoJSON from my data. My plan is to use this files to create tiles (or even vector tiles?) that I want to visualize via tools like Leaflet or OpenLayer.

Question

How can I create tiles for the different layers from my data?
Exist better approaches to achieve my goal?

Any recommendation of appropriate literature or tutorials is also welcome.


texts: Using eVis to launch AutoCAD with relative path

texts:
I found How to link to external files with relative path in QGIS actions? , which leads me towards what I need.

Now, I'm trying to use the eVis plugin to open .DWG and .DXF by launching AutoCAD from the Event Browser. I've tried to configure the external application as shown in my screen capture. The file name is now highlighted in green under the Display tab, but nothing happens when I double click on the file pathname. I'm using relative paths. I've tried modifying the extension to not include the '.' and it doesn't work either. There are issues with opening the pdfs in Foxit as well.


texts: Resizing rectangle by dragging one side and retaining all right angles using QGIS

texts:
I cannot resize a rectangle polygon feature in QGIS in a way that retains right angles on all the vertices.
There does seem to be an “intent” for this capability to exist via the “snap to common angle” setting in the advanced digitizing settings.  But it does not work as I think it’s intended i.e. the “snapping” doesn’t happen.
Here’s what I want to do: I’m in QGIS 3.10-8-A Coruna, running on my MacBookPro (macOS Catalina 10.15.7).  I have a vector shape layer selected (type polygon).  I “toggle editing”, which activates my “shape digitizing toolbar” and “advanced digitizing toolbar”.  I click the “enable advanced digitizing tools”.  In the Advanced Ditizing settings menu (gear button), I select 90, 180, 270, 360 for snapping to common angles.  Finally, I draw a rectangle: On the “shape digitizing toolbar”, I select “add rectangle from 3 points”, and make a rectangle using the “add rectangle from 3 points (distance from 2nd and 3rd point)”.  For drawing the initial rectangle, everything works fine, including the snapping to 90-degree angles.  I then try to resize the rectangle, by first clicking on the “vertex tool”, then mousing over a side of the rectangle (which highlights as red), clicking, and moving it to make the rectangle bigger.  Although the readout indicates snapping when I’m within 8 degrees of 90.0, if I click again to set the position, it doesn’t  snap to 90 degrees, but moves the rectangle side over to wherever my mouse was, leaving a rhomboid instead of a rectangle.
To me, this almost seems like a bug, because I’m pretty sure the intent was that the angle would snap to 90 degrees when the read-out has snapped to 90 degrees.  But I'm not sure.
Can anyone confirm this behavior and, does anyone have a tried and true method for resizing a rectangle that preserves all 90-degree angles?


texts:
After setting up a tile server accordingly this instruction https://switch2osm.org/serving-tiles/manually-building-a-tile-server-20-04-lts/ my offline tile server working nicely.
And after helping of ThomasG77 in this question How to create a map to PNG file with specific box coordinates by Mapnik? now I can generate PNG file with specific region (box) by this code on Python:
import mapnik

mapnik_xml = "openstreetmap-carto/mapnik.xml"
map_output = "region_map_mapnikXml.png"

# Create a map object
m = mapnik.Map(600,300)
mapnik.load_map(m, mapnik_xml)
bbox = mapnik.Box2d(5034980.57, 5062621.68, 5146300.06, 5347045.97)
m.zoom_to_box(bbox)
mapnik.render_to_file(m, map_output)
print(f"Rendered image to {map_output}")

But now I am facing the following problem: I need to generate PNG file of specific region with marker (something like small image e.g. green pin) in center of this region.
How I can do that?


texts: How to replicate gdalwarp -cutline in Python to cut out tif image based on the extents.kml file

texts:
In my python code I run the following command:

command = 'gdalwarp rgb.tif rgb_output_cut.tif -cutline extent.kml -dstnodata 0 -q'
os.system(command)

This cuts rgb.tif based on the extents specified in extent.kml and outputs a file called rgb_output_cut.tif. I would like to run this command without gdalwarp but instead with Python bindings. Is anyone familiar with this? Also, for the purposes of my task, having -dstnodata 0 is optional, it is just nice to have.

I found similar examples, however, they are just using gdalwarp for reprojection. For my case I'd like to cut out an extent.

Here, in my extent.kml file it is just a series of LinearRing Polygons, for example:

  <Placemark>
<Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
  <Polygon><altitudeMode>clampToGround</altitudeMode><outerBoundaryIs><LinearRing><altitudeMode>clampToGround</altitudeMode><coordinates>-104.959386510378,39.7075208980859 -104.959394642483,39.7020277743643 -104.968738431214,39.7020465443243 -104.968779091739,39.7075083857725 -104.959386510378,39.7075208980859</coordinates></LinearRing></outerBoundaryIs></Polygon>

Not, I must use gdal version 1.10.1.


texts: Grid polygon generation by converting meter to degree using Python

texts:
When given a shapefile as below as an Input, I would like to generate a 100x100 meter polygon grid using python.

I went through  Creating a regular polygon grid over a spatial extent, rotated by a given angle and  Creating grid polygons from coordinates using R or Python but still am not able to achieve the end result.

Based on Creating polygon grid using Geopandas my code is as below (similar to the post), grids are not created within polygon extent but is created somewhere outside.

Which part have I made a mistake?

import geopandas as gpd
from shapely.geometry import Polygon
import numpy as np
poly = gpd.read_file('point.shp')
xmin,ymin,xmax,ymax = poly.total_bounds
print(xmin,ymin,xmax,ymax)
#-118.77194444444446 38.61038888888889 -118.66961111111112 38.78205555555555
length = 100
wide = 100
cols = list(range(int(np.floor(xmin)), int(np.ceil(xmax)), wide))
rows = list(range(int(np.floor(ymin)), int(np.ceil(ymax)), length))
rows.reverse()
polygons = []
for x in cols:
    for y in rows:
        polygons.append( Polygon([(x,y), (x+wide, y), (x+wide, y-length), (x, y-length)]) )

grid = gpd.GeoDataFrame({'geometry':polygons})
grid.to_file('grid.shp')


texts: How do I get a list of coordinates from a polygon?

texts:
I have a table with polygon geometries and need to get a list of polygon vertices. Using select sde.st_astext(geometry_column) from table_name; I can get the WKT representation of the polygon but I'd prefer a list of x, y values as it's easier  to read.

This question is about getting the desired result from Oracle / SDE but for reference, in PostgreSQL / PostGIS I would likely use a combination of ST_DumpPoints and ST_X or ST_Y to create this list. However, I don't see how to perform the same task in Oracle / SDE.

How do I generate a list of X,Y values from a polygon geometry in Oracle / SDE?


texts:
I am new to QGIS, so be patient with me if this is rather basic. (And I am still learning the terminology as well.)

I have a very nice, and detailed vector map in an Adobe Illustrator format. I can, of course, save this as an SVG, EPS, or PDF file.

What I would like to do is add this as a vector layer in QGIS and then georeference it. Once complete, I would then like to use it as a base to add other features, etc. and then export it as a PDF or SVG. (I have worked out how to use Map Composer, so that is fine.)

My questions are:

Is it possible to import this file? I have tried SVG, PDF, and EPS formats but with no luck.
If this is possible, how do I georeference it? Is there a QGIS plugin that will (for example) allow me to select reference points?


texts: How to display a bright and realistic GeoTIFF using GDAL?

texts:
I am using GDAL (gdal_merge) to put together some landsat photos using the proper bands.  When I open the GeoTIFF that is created using gdal_merge (in Windows), the GeoTIFF is super dark.  Now, when I open the same GeoTIFF in ArcMap, it's nice and bright and realistic looking.  I was wondering if there was a function in GDAL that would allow me to do what ArcMap is doing.
   I have tried using PIL (in python) to enhance the brightness, contrast, and color - and I have had some success, but certainly it's not as nice as what ArcMap is doing.

Does anyone have any ideas?  Just in case you are wondering, the gdal_merge command is as follows

gdal_merge.py -separate -ps 16 16 -co PHOTOMETRIC=RGB -o "merged_new.tif" "LC08_L1TP_046029_20180717_20180717_01_RT_b4.tif" "LC08_L1TP_046029_20180717_20180717_01_RT_b3.tif" "LC08_L1TP_046029_20180717_20180717_01_RT_b2.tif"

But I don't think the gdal_merge command is an issue, as I am opening the result of gdal_merge with arcmap and it looks nice.


texts:
On the QField documentation page I saw this

  Configure search in QGIS
  -Choose the layers which are searchable in Project > Project Properties‣> Identify Layers
  -Define the display expression for the concerned layers, this will be used for searching for features. This is configured under Vector Layer Properties‣> Display page

where do I find the "Identify Layers" and Vector Layer Properties options? Is it on QGIS Desktop or QField? Because on QGIS (I'm using version 3.4) there's no Identify Layer option.

PS: when exporting my QGIS project for QField (1.1.0) the search and measure tools are available, is this a fix or can it be customized?


texts: Are QGIS Intersect and Clip Tools Broken?

texts:
I was getting this problem with a complex map so I have created a simplified map with two layers.

Accessible greenspace contains a couple of hundred small, mostly isolated, polygons with one (name) data field.

Black Country 32 Towns has 32 larger contiguous polygons with three data fields.

They have the same CRS and physically all of the greenspace layer overlaps the towns layer.

I want to create a new layer the as as accessible greenspace, but with the appropriate town data appended to the polygons. Then I can use groupstats to find out how much accessible greenspace is in each town.

Intersect creates a new layer with all four data fields as I would expect, but it is empty. It should contain all the accessible greenspace polygons, with any overlapping different towns split into two.

Clips doesn't work either.

a test with buffer works, so the whole geoprocessing module isn't broken.

This sort of operation worked two weeks ago, but doesn't now.

Lots of questions here report a similar failure to create an output layer, but there seem to be not definitive answers, just requests for more detail or the suggestion to use GRASS (I find GRASS impenetrable).

My question is "Are the QGIS Intersect and Clip Tools Broken?" and is this an intermittent/random issue?


texts: Finding primary column in SQL Server table using QGIS?

texts:
I just created a SQL Server geometry columns table and a new table for testing in QGIS.  However, QGIS still won't find the primary column in the table.

I am creating the table this way:

CREATE TABLE gis.test (     OBJECTID INT IDENTITY NOT NULL,     Name VARCHAR(255),      Shape GEOMETRY,     CONSTRAINT [qgis_test] PRIMARY KEY CLUSTERED    (       OBJECTID ASC    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]    )ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

And creating Geometry columns table this way:

  CREATE TABLE geometry_columns (
    [f_table_catalog] [VARCHAR](256) NOT NULL,
    [f_table_schema] [VARCHAR](256) NOT NULL,
    [f_table_name] [VARCHAR](256) NOT NULL,
    [f_geometry_column] [VARCHAR](256) NOT NULL,
    [coord_dimension] [INT] NOT NULL,
    [srid] [INT] NOT NULL,
    [geometry_type] [VARCHAR](30) NOT NULL,
    CONSTRAINT geometry_columns_pk PRIMARY KEY CLUSTERED
    (
        [f_table_catalog] ASC,
        [f_table_schema] ASC,
        [f_table_name] ASC,
        [f_geometry_column] asc
    )
)

INSERT INTO geometry_columns (f_table_catalog, f_table_schema, f_table_name, f_geometry_column, coord_dimension, srid, geometry_type)
SELECT
    g.f_table_catalog,
    g.f_table_schema,
    g.f_table_name,
    g.f_geometry_column,
    g.coord_dimension,
    g.srid,
    CASE WHEN g.geometry_type = 0 THEN 'Geometry'
         WHEN g.geometry_type = 1 THEN 'point'
         WHEN g.geometry_type = 2 THEN 'curve'
         WHEN g.geometry_type = 3 THEN 'linestring'
         WHEN g.geometry_type = 4 THEN 'surface'
         WHEN g.geometry_type = 5 THEN 'polygon'
         WHEN g.geometry_type = 6 THEN 'collection'
         WHEN g.geometry_type = 7 THEN 'multipoint'
         WHEN g.geometry_type = 8 THEN 'multicurve'
         WHEN g.geometry_type = 9 THEN 'multilinestring'
         WHEN g.geometry_type = 10 THEN 'multisurface'
         WHEN g.geometry_type = 11 THEN 'multipolygon'
    END AS geometry_type
FROM
    sde.sde_geometry_columns g


texts: Remove multiple features from the vector by category

texts:
vectorSource.clear() will remove all features. I want to remove specific features by category:

I am adding the features on the vector. Data comes from json response.

data.forEach(device => {
    console.log(device)

    let feature_ = new ol.Feature({
        category: device.fields.category,
        id: device.pk,
        geometry: new ol.geom.Point([Number(device.fields.longitude), Number(device.fields.latitude)]).transform('EPSG:4326', 'EPSG:3857'),
    })
    feature_.setStyle(iconStyle('/static/applications/images/default.png'))
    feature_.setId(device.id)
    vectorSource.addFeature(feature_)
})


texts: Passing value from GetParameterAsText to row.getValue()?

texts:
I am trying to build a simple tool that concatenate values from two fields, and recording it in newly created field - everything within the same table. This tool should work with any shapefile, concatenate any type of fields and create a field (with name chosen by user). My problem is how to pass value of 'new_field_name" in to row.getValue()  (second last row of the code). Or any other ways of doing the same?

import time, arcpy
startTime = time.clock()

print "Start"

shapefile = arcpy.GetParameterAsText(0)
field_name_1 = arcpy.GetParameterAsText(1)
field_name_2 = arcpy.GetParameterAsText(2)
new_field_name = arcpy.GetParameterAsText(3)
new_field_length = arcpy.GetParameterAsText(4)
separator = arcpy.GetParameterAsText(5)
arcpy.env.workspace = shapefile
arcpy.env.overwriteOutput = True

arcpy.AddField_management(shapefile, new_field_name, "Text", "", "", new_field_length)

cur = arcpy.UpdateCursor(shapefile)
for row in cur:
    row.getValue() = (str(row.getValue(field_name_1)) + separator + str(row.getValue(field_name_2)))
    cur.updateRow(row)


texts: QGIS expression on legend for duplicated values

texts:
Having a building table, grouped by an id and its respective amount of apartments. I want to label every symbol id on map composer legend with the amount of apartments.

For a simple expression 'apartments', nothing appears regarding amount of apartments neither any field inserted on expression.
I think issue comes because table has building level and all values regarding symbol id are repeated for the buildings are grouped on each id.
Even for repeated amounts I have written the expression: concat( @symbol_label, ': ',apartments) which avoid any repeated value and is not working. Legend appears as in the image from above. Is weird because on expression window the expression returns value (178),


texts: Extracting pixels of raster1 that overlap with raster2 in ArcGIS for Desktop?

texts:
I have 2 partly overlapping raster datasets, would like to extract pixels of one dataset that overlap with another dataset.

Is there a tool in ArcGIS for Desktop to do this?


texts: Creating/drawing map (especially indoor)?

texts:
I'm currently developing an indoor map/room plan for an university project. I've already searched through Stack Exchange to figure it out but I couldn't find anything similar.

So what I currently do to create a indoor map/room plan is to use QGIS and draw points, lines and rectangles. It has a nice snapping feature and other stuff that makes the map creation slightly convenient. But I have problems when it comes to alignment, squareness etc. That's why I'm searching for a more convenient solution to draw maps, especially indoor maps.

What I'm not looking for is an app or business solution thats tracks my movement and creates a map with it. I really would like to draw the map on my own.


texts: Why get the first and the last point code from a multilinestring layer in PyQGIS 3 doesn't works?

texts:
I need to get the first and the last vertex from a multilinestring layer from PostGIS and create a memory point layer with them. The code below works for some line layers and doesn't for others in QGIS 3.6 and I can't figure out why. When I run it in QGIS 3.4 it simply doesn't work and don't get any error message.

line_lyr = qgis.utils.iface.activeLayer()
feat = QgsFeature()

point_layer = QgsVectorLayer("Point?crs=epsg:31984", "point_layer", "memory")
pr = point_layer.dataProvider()

for feature in line_lyr.getFeatures():
  geom = feature.geometry().asMultiPolyline()
    for line in geom:
      start_point = QgsPointXY(geom[0][0])
      end_point = QgsPointXY(geom[-1][-1])
      feat.setGeometry(QgsGeometry.fromPointXY(start_point))
      pr.addFeatures([feat])
      feat.setGeometry(QgsGeometry.fromPointXY(end_point))
      pr.addFeatures([feat])

QgsProject.instance().addMapLayer(point_layer)

I had missed something in the code? How can I improve this code for PyQGIS3?


texts: Recording frequency of names in the attribute table?

texts:
I have a question with ArcGIS 9.2. In an attribute table the column [name] includes the name of every place in this layer. Next to that (in columns [numbers]) there should be recorded how often a place of this name is in the map.

How can I calculate this values with VBA in the field calculator?


texts: Adding Radius Attribute to each Polygon in QGIS?

texts:
Is it possible to add the Radius for each Clipped Polygon to its Attribute Table?
So far I only have the Area (Fläche) in square metres but I also need the radius for each Hub in its own area/polygon


texts: Adding to signature list from ROI list does not work?

texts:
I'm trying out QGIS with SCP, but I've run into some problems

First of all, my setup is as follows:
QGIS version 2.10.1-Pisa
on Mac OSX Yosemite 10.10.5
compiled and running against

qt 4.8.6
GDAL/OGR 1.11.2
GEOS 3.4.2
PostgreSQL 9.4.4
QWT 6.0.2
QScintilla2 2.9
SpatiaLite 4.2.0
PROJ.4 491

I'm following the tutorials found at the following URL: https://semiautomaticclassificationmanual-v4.readthedocs.org/en/latest/Tutorials.html

My problems begin in the section on creating ROIs. The first issue (though I didn't notice it at first), is that when I create an ROI, it does not add it to the signature list despite "add sig. list" being checked! Not only that, but I don't seem to be able to create an ROI with the automatic region growing algorithm. When I try to do so, it gives me an error of the form:

  Error [29]: Edge error. Reduce the ROI width or draw a ROI manually (recommended installation of GDAL >= 1.10)

I worked around this by simply manually inputting the rest of the ROIs, and continued on with the tutorial, but it wasn't very long before I ran into the final problem, which is that I am unable to add the ROIs to the signature list at all. I've tried running QGIS from the command line, selecting an ROI, and hitting the add to sig list button, and it produces the following warning:

  Warning 1: Line 4: Attribute value should be single or double quoted. Going on, but this is invalid XML that might be rejected in future versions.

Since I am unable to get my ROIs added to the signature list, I am unsure of how to continue.


texts: gdal_calc equation results in error: divide by zero

texts: iIt is quite obvious to me that the rasterset A, B within the NDVI equation, --calc='"((A-B)/(A+B))"' with cell_value=0 will lead to the above error (division by zero). How can I avoid the error?


texts: Overlapping multiple images with cloud masked?

texts:
I am now using fmask algorithm to eliminate the cloud covered areas on Landsat images.

I choose a period of time (Jan 1st 2017 to Dec 31st 2017), and selected the study area (Florida). I want to get all of the Landsat 8 images under the above mentioned conditions, then apply the algorithm to mask the cloud.

I hoped the images taken for the same area but on different observation days could all get cloud masked, overlapped together and then I can do some statistical calculation.

However, I can only get the cloud masked images for Dec 31st 2017. I have tried a lot but still cannot overlap the images for the whole year.

My code is attached below

//Choose country using GEE Feature Collection

var region = ee.FeatureCollection('TIGER/2016/States')
    .filter(ee.Filter.or(
        ee.Filter.eq('NAME', 'Florida')));

//Add region outline to layer ‐ for selected states

//Map.addLayer(region,{}, 'Florida');

var landsat8 = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR');

// Fmask classification values var FMASK_CLEAR_GROUND = 0; var FMASK_WATER = 2; var FMASK_CLOUD_SHADOW = 3; var FMASK_SNOW = 4; var FMASK_CLOUD = 5;

var mosaic = landsat8 .filterBounds(region) .filterDate('2017-01-01', '2017-12-31') .mosaic();

var getQABits = function(image, start, end, newName) {
    // Compute the bits we need to extract.
    var pattern = 0;
    for (var i = start; i <= end; i++) {
       pattern += Math.pow(2, i);
    }
    // Return a single band image of the extracted QA bits, giving the band
    // a new name.
    return image.select([0], [newName])
                  .bitwiseAnd(pattern)
                  .rightShift(start);
};

// A function to mask out cloudy pixels.
var cloud_shadows = function(image) {
  // Select the QA band.
  var QA = image.select(['pixel_qa']);
  // Get the internal_cloud_algorithm_flag bit.
  return getQABits(QA, 3,3, 'Cloud_shadows').eq(0);
  // Return an image masking out cloudy areas.
};

// A function to mask out cloudy pixels.
var clouds = function(image) {
  // Select the QA band.
  var QA = image.select(['pixel_qa']);
  // Get the internal_cloud_algorithm_flag bit.
  return getQABits(QA, 5,5, 'Cloud').eq(0);
  // Return an image masking out cloudy areas.
};

var maskClouds = function(image) {
  var cs = cloud_shadows(image);
  var c = clouds(image);
  image = image.updateMask(cs);
  return image.updateMask(c);
};

var mosaic_free = maskClouds(mosaic);

var visParams = {bands: ['B4', 'B3', 'B2'],min: [0,0,0],max: [2000, 2000, 2000]};

Map.addLayer(mosaic, visParams, 'With clouds');
Map.addLayer(mosaic_free, visParams, 'Cloud free');

Could anybody help me to figure out what's wrong with that?


texts: segment lines according to point using pgRouting?

texts:
I'm working on postgresql and I am trying to create table to generate graphs. I have a table that contains all the objects of a city (points) and another contains the city street. My goal now is to segment the street in small segments that begins and ends with two objects (points).
I try with different PostgreSQL query but I can not create a table of links that restrained the source and destination of each seqments ST_pointN actually gives the first and last point in a linestring against me by I want to have all the object on a street with the order to which I may have small segments.
I want to see is what pgRouting can help me segment the streets and if so how? thank you


texts: Arcpy how to conduct addition in a script, function needed?

texts: I'm trying to work on my first arcpy script and am running into some troubles. The objective is to create a new field, check several existing fields (Cnt1,2,3 and Pop1,2,3) for missing data (-99 value) and if find missing data populate new field with a 0, if not then populate the field with the result from a simple calculation. From a separate related post I got some feedback that the problem was that I am concatenating the values, not adding them and this if-elif statement might need to be within a function and then called. Any advice greatly appreciated!


texts: Display only the features containing a name

texts:
I used QGis to open a shapefile with the rivers in my state (Rio Grande do Sul, Brazil).

I would like to know "the name of every river", but when I click on the rivers, most of the small ones don't have a name. Clicking them one by one would be monotonous, error-prone, and cumbersome.

So, my question is: How can I filter the display of rivers, so that only the ones containing a name would be displayed?

Disclaimer: I have no large experience with GIS concepts. I presume this is a trivial task, but I don't even know where to start figuring out how to do it.


texts: How to identify more than 500 features from closest facility analysis?

texts:
I am new to and using ArcGIS Desktop 10

I have done the closest facility analyst.
And there are many routes laying on my network.
I want to know how many routes use the road section(one feature in network layer), and so on for all of the network.
When I use identify, it can just return at most 500 features.

How can I get more?
I've google for this, I know I have to edit the "maxcount" but I can't find that!


texts: Uploading Google Earth historical Imagery to QGIS

texts: Is there any way that I could upload historical Google Earth imagery to QGIS, instead of saving them one by one and importing/Georeferencing them?


texts: Reclassify by remapvalue returns error 000622

texts:
I'm trying to reclassify a raster from a set of strings to a set of values. I'm doing this by first creating a RemapValue.

I've added the code I'm trying to run.

arcpy.env.workspace = r'C:\Users\...\Output\Raster.gdb'

rv = RemapValue([["A1BE", 2],["A1BR", 1],["A1EN", 2]])

reclass = Reclassify("flate2157", "q_type1", rv, "0")

When running reclassify it returns two errors:

  000622: Failed to execute (Reclassify). Parameters are not valid.
      ERROR 000628: Cannot set input into parameter remap.

I've tried to lookup the help page, but could not get it to work.


texts: Importing DEM in ASCII format into ArcMap and Projecting it?

texts:
I have been trying to import an ascii grid file into ArcMap.

However, I am battling to project the data.

Can anyone assist?

I've tried defining the projection but to no avail. The data should be located at roughly the following coordinates... 29. S 26. E.

See .asc header information below:

ncols         990
nrows         1140
xllcenter     -97500
yllcenter    -3237675
cellsize      25
NODATA_value  -9999


texts:
How often does Google update their Monthly Google Earth Imagery Updates ?
https://mapsengine.google.com/10446176163891957399-16022013078000482234-4/mapview/?authuser=0

I see that it is dated last May 2015 ?


texts: Clipping a tiff image using another tiff image using Python

texts: I am working on a code to clip a raster with another raster. I have a forestcover.tiff image and I want to clip it by using other image clip.tiff which extend lies within it. I don't want to use arcpy module because  it requires ArcGIS installed. My code should work for all users.


texts: How to manipulate spplot legend margins?

texts:
I have used the code below to get the displayed graph. However, there seems to be a class below 0 when considering the legend but in spite of setting the zlim at 0. How do I get rid of this?
I want to keep the values exceeding 80 of course.
(why i think this happens: the reflectance values are actually negative in some cases - Sentinel base map used for carbon mapping. But I still want to discard those values of course)
# PLOT Set Z-lim based on to MAX value
spplot(AGCmap1,main = "Carbon density per ha", zlim=c(0,80))```

[![enter image description here][1]][1]

  [1]: https://i.stack.imgur.com/NbbPq.png


texts: How to transfer POI layer from QGIS to OSMAnd?

texts:
I've got a POI layer (vector layer with single-point geometry) in QGIS and would like to import these points to OSMAnd under "My Locations" including the attributes (like name of the point). How can I do that?

I tried SQLite, GeoPackage and GeoJSON, but always got two errors:

Firstly, OSMAnd complains that the layer does not contain waypoints and asks if I want to import it as track.
If I confirm, it then shows an error message like "Unexpected token (position: TEXT ...".


texts:
I'm trying to do smoothing for .tif stack layer of 331 bands.
I used this code in R :

setwd("D:\\")

raster_dir <-   "D:\\Modis VI quality\\"

VI <- brick(paste(raster_dir,"laikipia_VI_quality.tif", sep=""))

timeInfo <- orgTime(VI, nDays=16, begin="2001001", end="2015145")

system.time(whittaker.raster(vi,timeInfo=timeInfo,lambda=5000,overwrite="true"))

But, it is not working and giving,

  Warning messages: 1: In min.default(numeric(0), na.rm = FALSE) :   no
  non-missing arguments to min; returning Inf 2: In
  max.default(numeric(0), na.rm = FALSE) :   no non-missing arguments to
  max; returning -Inf Errors: Error: dir.create(path, recursive = TRUE,
  showWarnings = showWarnings) is not TRUE

Any advice or help writing the correct code please?


texts: WMTS EPSG:4326 tilegrid with origins beyond the normal range of values for longlat (i.e. -180 to 180, -90 to 90)

texts:
Apparently such values do work in leaflet and openlayers (I assume they ignore the longlat implications and just treat the values literally to load the tiles properly), but is this considered a proper definition? Somehow I feel that it should have been declared as web mercator instead.
Example of one such origin: -1000, 800


texts:
So I'll start off by saying I'm still in the rookie stages of GIS work.

But I have a GPSMap 64S and for work I had to go out and collect waypoints of an area. No problem, all was good and well, got back to the office and dragged them into QGIS 2.18 and they displayed perfectly. The problem starts when I removed the waypoints from the legend and then when I tried again nothing showed up. I went to the attribute table and there was nothing. The I went into the GPS and the waypoints were no longer on the device either. They seemed to just disappear?


texts:
Why is feature extraction important?

Why do we have to reduce the feature space?

Is it only a computational problem when we use hyperspectral imagery or does this procedure improve the generalization ability of a classification system?


texts: Add an ESRI projected coordinate system to PostGIS

texts:
I was trying to add to PostGIS a new projected coordinate system, the ESRI World_Cylindrical_Equal_Area, 54034.  I have searched for it in epsg.io but it is not available there. I would have liked to use epsg.io to generate a copy/paste code I would have uses to enable the projection in PostGIS. So, I have imported in a PostGIS db a file gdb containing a feature class projected in 54034 and this coordinate system has been automatically added into the spatial_ref_sys table, with the srid=900914, auth_name=Esri, auth_srdid=54034.
Did I still a achieved my goal? Can I use now ST_Transform (geom, 900914) to project all the data in my db to the newly added coordinate system?


texts: ogr2ogr sql - returning points from one sqlite dataset that intersect with another

texts:
I am having great difficulty with the simple st_intersect command when applied to two datasets containing points, derived from the same source. I am using osgeo4w gdal 2.1.3 at command line.

My aim is simply to return in the output the point geometry features from sqlite table A where they intersect with sqlite table B (also point geometry). There are no other geometries present in the datasets. Whilst the command seems to work ok for most of the data (providing the expected output), for a small percentage of the data the st_intersect will not identify points which clearly do intersect upon visual scrutiny - i.e. after zooming to 1:1! These points do not appear in the output. I am puzzled. Might there be a precision issue here re. point geometry location, or is there some other reason for the omission of points? What method will achieve the desired result?

ogr2ogr -unsetFid -nlt POINT -f SQLite -dsco SPATIALITE=YES outfile.sqlite infile.sqlite -nln outtable -dialect sqlite -sql "SELECT A.* FROM 'intable1' A, 'intable2' B WHERE ST_Intersects(A.geometry, B.geometry)"


texts: Writing label expression in QGIS to remove end of string?

texts:
I am using QGIS 2.18.

I have a point shapefile showing ranger stations in a park.  The  attached image is the field I want to use to label my points.  I want to omit "Ranger Station" from showing in the label on the map.


texts: Why is my buffer being projected so large?

texts:
I have a single point that I would like to make a buffer around. The point CRS is NAD83 EPSG:4269 +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs.

When I created a Fixed distance buffer, at just 10 meters, the buffer is huge. And I know it is incorrect because it is larger than the size of Texas and Texas is not 10 meters wide I'm pretty sure.


texts: Automatically create Text/HTML annotations in QGIS on a Point Layer

texts:
How would one proceed to generate an HTML annotation or a Text annotation for all points in a shapefile? They are all points. What I want to do is load up a shapefile containing coordinates and values + absolute paths to Photographs and display them in an HTML Field.

It would allow all the main information to be available directly at a glance.

Since there are over 50 locations, I don't think it is viable to be done by hand.


texts: Getting shared distance of two parallel lines using ArcObjects?

texts:
I have 2 lines Line A, and Line B that share from point. The 2 lines at first share the same path and are parallel, then they split into different paths. I would like to calculate that segment in which they are parallel. Picture below further explains visually. Red part is the wanted part.

Note that the red segment might be multiple connected segments that make up the red path of each Polyline.
I doubt there is an interface in the arcobjects in which calculates this, which means I have to calculate it manually. I need some suggestions to get the best accurate result of the shared length.


texts: Feature selection on tiled map service using ArcGIS Javascript API 3.17

texts:
My feature class has around 80,000 point features. So I've used tiled map service and generated the cached tiles for fast rendering on client browser.  I'm using ArcGIS Javascript API 3.17. Now I want to add select features option on map. I feel that adding feature layer for selection option alone will slowdown the data rendering on client browser.

How can I implement feature selection in my application?


texts: OpenLayers - Features in cloned layer changes style with original feature

texts:
Please help!

My situation is that, I clone() a "newLayer" from an "oldLayer" with its features. Both of them seems correct at first. But then when I tried to change the style of "featureA" in the "oldLayer", the cloned "featureA" inside the "newLayer" changes too after redraw() is called. Is it possible to "unlink" them, they seems attached to the same style object and caused this problem.

I've been looked around for a whole day and tried all I've found, but still no luck. Anyone can help? Thanks a lot. And sorry for my poor english.


texts: Creating square buffers with v.buffer in GRASS GIS

texts:
I do not seem able to create a square buffer around a point feature with v.buffer in GRASS GIS v.7.4.4.

The documentation states that "Using -s with a point vector map as input data, square buffers are created instead of round buffers." However, below is the command I ran, and the resulting buffer. Am I missing something obvious?

v.buffer -s input=vectmap type=point output=test_buffer distance=1000


texts: Create routes when the measure source is not "length"?

texts:
I need to do some linear referencing work with a network of lines with specific beginning and endpoints. The first step is to take the network of lines and use the geoprocessing tool "Create Routes" in the linear referencing toolbox. This much I know.

However, I am unable to find anything online about how to create routes with a from-measure field and a to-measure field where the measure source is "Values from two fields". Every example online seems to use "length" and the ArcGIS help is not very helpful. If I have point features on the endpoints of my lines, is there a way to use those points to populate fields I can use as from- measure field and to-measure field? Apparently these fields have to be numeric, but honestly I do not know what kind of "numeric" values I need. Has anyone done this before?


texts: Reading a raster with window with overlap

texts:
I have a raster 50000x50000 pixels. I want to iterate a window of 1000x1000 pixel on it with some overlap and apply bilateral filtering. I want to save the resulting filtered patches into a mosaic without overlaps.
Is there a straight forward way to do that?


texts: Specifying rectangle symbol with height/length based on attributes values in mapfile?

texts:
I need to specify a rectangle symbol in a mapfile. The symbols should be of varying dimensions based on height/width values stored in a table's attributes. Is it possible to do something as with the ANGLE parameter (I imagined the parameters names HEIGHT and LENGTH for the example):

    CLASS
      NAME "myLayerName"
      STYLE
        SYMBOL "rectangle"
        HEIGHT [attr_height]
        LENGTH [attr_width]
        ANGLE [attr_orientation]
      END
    END


texts:
I don't understand JavaScript. Following the instructions, I made a beautiful animation with following code:
var geometry = ee.Geometry.Polygon(
        [[[21.171108568177974, 52.71072901884085],
          [21.171108568177974, 43.97825621993774],
          [40.66085466192797, 43.97825621993774],
          [40.66085466192797, 52.71072901884085]]], null, false);

// Fetch a MODIS NDVI collection and select NDVI.
var col = ee.ImageCollection('MODIS/006/MOD13A2').select('NDVI');

// Define a mask to clip the NDVI data by.
var mask = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017')
  .filter(ee.Filter.eq('country_na', 'Ukraine'));

// Define the regional bounds of animation frames.
var region = ee.Geometry.Polygon(
  [[[21.171108568177974,43.97825621993774],
    [40.66085466192797,43.97825621993774],
    [40.66085466192797,52.71072901884085],
     [21.171108568177974,52.71072901884085],
    [21.171108568177974,43.97825621993774]]],
  null, false
);

// Add day-of-year (DOY) property to each image.
col = col.map(function(img) {
  var doy = ee.Date(img.get('system:time_start')).getRelative('day', 'year');
  return img.set('doy', doy);
});

// Get a collection of distinct images by 'doy'.
var distinctDOY = col.filterDate('2013-01-01', '2021-04-01');

// Define a filter that identifies which images from the complete
// collection match the DOY from the distinct DOY collection.
var filter = ee.Filter.equals({leftField: 'doy', rightField: 'doy'});

// Define a join.
var join = ee.Join.saveAll('doy_matches');

// Apply the join and convert the resulting FeatureCollection to an
// ImageCollection.
var joinCol = ee.ImageCollection(join.apply(distinctDOY, col, filter));

// Apply median reduction among matching DOY collections.
var comp = joinCol.map(function(img) {
  var doyCol = ee.ImageCollection.fromImages(
    img.get('doy_matches')
  );
  return doyCol.reduce(ee.Reducer.median());
});

// Define RGB visualization parameters.
var visParams = {
  min: 0.0,
  max: 9000.0,
  palette: [
    'FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718', '74A901',
    '66A000', '529400', '3E8601', '207401', '056201', '004C00', '023B01',
    '012E01', '011D01', '011301'
  ],
};

// Create RGB visualization images for use as animation frames.
var rgbVis = comp.map(function(img) {
  return img.visualize(visParams).clip(mask);
});

Export.video.toDrive({
  collection: rgbVis,
  description: 'sfVideoExample',
  dimensions: 720,
  framesPerSecond: 12,
  region: region
});

But I need animation once a year 2013-2021, not every 16 days. If possible, then the average for the year. If not, then March, or April.
Please tell me what to do with it.


texts: ArcGIS intersection between multiple layers and one mask?

texts:
I currently have a collection of assets of different data types (points, lines, and polygons). I'd like to find the intersection between each individual asset and the polygon mask. However, for example, when I try to use the Intersect (analysis) tool as seen below, and I input my mask followed by my asset layers, I'm getting error 000117: empty output generated.

I'm assuming I'm getting this error because there's no overlap between any of the assets (ex, no intersection between asset_point and asset_poly).

Is there any way to do this in a batch instead of manually doing an intersection for each layer?

I'm using ArcGIS Desktop 10.5.


texts: Splitting multipatch based on whether features are connected

texts:
I am using ArcGIS Pro 2.4.2.

I have an OBJ file of several hundred buildings that, when imported using the Import 3D Files tool, is converted to a multipatch file with a single multipart feature for all buildings. My objective is to split the single feature into individual multipatch features, one for each building. I have tried two approaches:

Explode the multipatch feature using the editing tool 'Explode'. This breaks the file into a single feature for each building face, which is too broken out for my needs. I tried using the 'Merge' editing tool to group all faces of a building into a single feature, but this would not work properly - the merge would run successfully but the faces were still separate features.
Run the Multipart to Singlepart tool on the multipatch file. The tool would run successfully, but the results included many triangle features for each building, again far too broken up for my needs.

Is there a different approach to split the multipatch based solely on whether the features are geographically connected?


texts:
I have a requirement where I am supposed to be able to take a reference address and provide the 3 closet addresses to the reference address from a list of addressses.

So far I have

Installed PostgreSQL
Installed PostGIS

From my reading online I believe I need to take an address and convert run it through a PostGIS function to get the latitude and longitude.

Since I have a list of addresses my thought is that I need to geocode the addresses first using the geocode function, then ST_MakePoint.

How do I get the geocode function to provide a latitude/longitude point?


texts: How to reference path to file that is in edit session from Python AddIn?

texts:
I am creating a Python addin button and I would like to reference the path to the layer that is currently in an edit session to the code in the addin button. This way users will be able to use the functionality of the addin in button with a variety of different named layers that have attribute tables with the same headers.

My button currently uses this code.

inFeatures="m8010_seginit_061213"
fieldName="LFM"
expression=3000
arcpy.CalculateField_management(inFeatures, fieldName, expression, "PYTHON")

I would like to have "inFeatures="CURRENT"" or the path to the current layer is that is open in an edit session.


texts: I want to calculate distance of child latitude, longitude and school latitude, longitude

texts:
I have school latitude=54.2323 and longitude=76.2323 and child latitude=32.2323 and longitude=54.2323. school radius I have taken 500 meter.

I want to make a circle for school using that radius and make one center point.

I want to find child is inside the the school or not using child latitude and longitude.


texts: updating plugin from qgis 2 to 3. qRegisterResourceData . argument 2 has unexpected type 'str'

texts:
I already followed this tutorial and been through the steps.
https://github.com/qgis/QGIS/wiki/Plugin-migration-to-QGIS-3
 and https://gisforthought.com/updating-a-plugin-from-qgis-2-to-qgis-3/

I make some changes and started to track down the last errors. But im lost with this one:

TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'

I have the following traceback:

Traceback (most recent call last):
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 336, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/Lars/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\_plugin\__init__.py", line 5, in classFactory
    from ._plugin_TEST import _plugin_TEST
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/Lars/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\_plugin\_plugin_TEST.py", line 28, in
    from . import resources
  File "C:/PROGRA~1/QGIS3~1.0/apps/qgis/./python\qgis\utils.py", line 664, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/Lars/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\_plugin\resources.py", line 85, in
    qInitResources()
  File "C:/Users/Lars/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\_plugin\resources.py", line 80, in qInitResources
    QtCore.qRegisterResourceData(0x01, qt_resource_struct, qt_resource_name, qt_resource_data)
TypeError: qRegisterResourceData(int, bytes, bytes, bytes): argument 2 has unexpected type 'str'

Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
QGIS version: 3.0.0-Girona Girona, 001c80b0c3

Any leads or solutions?


texts: How to work on downloaded copies of database tables in QGIS

texts:
I want to provide the online editing facility from postgres database. but it seems if I use Live database it slows down all the function of qgis as its pulls data from online server for every operation such as pan, zoom , open  attributes table etc.

Is it advisable to to make a copy of data(tables) in local machine say a memory layer, edit it and then upload the changes back to server ?


texts:
I've used the following code to generate home range isopleths using r:

library(rhr)
library(rgeos)

#list all *.txt files.
fls <- list.files(path = "C:/Users/evan/Desktop/mydir", pattern = "*.txt",
full.names = TRUE)

#read files into a list.
dat <- lapply(fls, read.table, sep = ",", header = TRUE)
#get file names.
nms <- tools::file_path_sans_ext(list.files(path =
"C:/Users/evan/Desktop/mydir", pattern = "*.txt"))
names(dat) <- nms

locoh <- lapply(dat, function(x) rhrLoCoH(x[, c("LONGITUDE", "LATITUDE")]))

dir.create("out")
for (i in seq_along(locoh)) {
  shapefile(rhrIsopleths(locoh[[i]]), file.path("out", paste0(nms[i], ".shp")))
}
#This is where I get the error message.

#calculate home ranges by seasonal range.

for (season in c("Winter", "Summer", "Migration")) {
  #read files into a list
  locoh_s <- lapply(dat, function(x) {
    xx <- x[x$RANGE == season, c("LONGITUDE", "LATITUDE")]
    if (nrow(xx) > 10) { # threshold of at least 10 relocations
      rhrLoCoH(xx[ ])
    } else {
      NA
    }
  })

  locoh_s <- locoh_s[sapply(locoh_s, is.list)]

  for (i in seq_along(locoh_s)) {
    shapefile(rhrIsopleths(locoh_s[[i]]), file.path("out",
paste0(names(locoh_s)[i], "_", season, ".shp")))

  }
}
##This is where I get the error message again.

This code has been tested and it works on comma delimited text files which I manually created from opening the attribute table in ArcMap and clicking "Export." However, when I try and use an application (created by "WhiteTown" and downloaded off the internet) to batch generate comma delimited .csv or .txt files from .dbf files.

I get the following error:

Error in (function (classes, fdef, mtable)  :
  unable to find an inherited method for function ‘shapefile’ for signature ‘"NULL"’

As far as I can tell, the .txt files are identical. I've spent a good deal of time studying them trying to understand why the code would work on the Arc-generated data, but not the .dbf-to-.csv generated data.

Here's an example of what one of my datasets looks like:

https://drive.google.com/file/d/0BzrdU1u3e23zbDJCelFEd295czA/view?usp=sharing

EDIT: I can make the data work if I introduce a limited number of rows. For example I no longer get an error when the code looks like this:

locoh <- lapply(dat, function(x) rhrLoCoH(x[1:30, c("LONGITUDE", "LATITUDE")])) ## Garbage 1:30 added make the code work.

for (season in c("Winter", "Migration", "Summer")) {
  # read files into a list
  locoh_s <- lapply(dat, function(x) {
    xx <- x[x$RANGE == season, c("LONGITUDE", "LATITUDE")]
    if (nrow(xx) > 10) {
      rhrLoCoH(xx[1:30, ])  ## Another Garbage 1:30
    } else {
      NA
    }
  })

This seems to be a syntax error about selecting rows and columns that I don't understand.

Or maybe some of the rows are junk and they are screwing up the code. For instance, when I type "1:30" it works, also when I type 1:125, but not if I leave it blank, and not if I type 1:4601.

I'd love if someone could enlighten me.


texts: Unable to run any GRASS 7 algorithms in QGIS 2.18.10 on Windows 7(64)

texts: Running Windows 7 Professional (64bit) SP1. I have QGIS 2.18.10 installed from the standalone installer. The GRASS commands (161 algorithms) are present in the toolbox and seem to run ok. However the GRASS GIS 7 commands (314 algorithms) result in the following message box: I have tried uninstalling, deleting all traces of QGIS from the Registry, and then reinstalling using the OSGeo4W64 installer selecting various different options, including adding GRASS 6, also without any success. I deleted the OSGeo4W64 installation and reinstalled it. No change. I then re-installed the standalone QGIS package and copied the \msys folder from the OSGeo4W64 GRASS 6 installation into the \apps folder of the QGIS 2.18 directory. Nothing changed. I have ensured paths are correct in Providers section of Processing options:I have ensured the output folder has no non-ASCII characters as that seems to be another possible cause, but still have not solved the issue.


texts: Switching Mars DEM elevation values from negative to positive?

texts:
I'm using a DEM of Mars I got from UA's HiRISE website, and I want to convert it into an STL for 3D printing using the DEMto3D plugin.

However, the raster values are all negative, so I thought I could convert them into positive values using the Raster Calculator. Any time I try this though, I get an error message saying that "Raster calculator : Could not create destination file."

I haven't had this problem before working with HiRISE DEMs on QGIS, so I uninstalled and reinstalled the program, but that didn't work.

This is the link from which I got the DEM: https://www.uahirise.org/dtm/dtm.php?ID=ESP_027802_1685


texts: How to automatically populate fields instantly?

texts:
I am looking to create an attribute table where the first field is a drop-down menu (I have achieved this by using the 'value map' edit widget), but I'm struggling to find a method for the next part;

After the value has been selected from the drop-down menu, I would like the adjacent cell (in the next field) to be automatically populated according to the value in the drop-down menu.  So for example; if drop-down value = A, then adjacent field = 1.  Or if drop-down value =  B, then adjacent field value = 3, etc.

I realise that by using field calculator, it is possible to auto-populate fields as part of a separate process, but I would like to have the fields populated at the same time as the drop-down value is selected if possible.

I am using windows 7 and QGIS version 1.8.

Many thanks.


texts: Automatically removing added prefixes (SUM_, MEAN_, FIRST_, ect) from output of arcpy.Statistics_analysis?

texts:
This code is basically run to remove the extra prefixes created by the statistics_analysis module with arcpy, which was performed to find out the totals from aggregated polygons that intersected with another feature layer. I'd like to keep the original field names without adding the prefixes so that the output feature classes work with other models that rely on specific field names.
What am I doing wrong here? It's no longer trying to access required fields, I took care of that with the pops. The code is duplicated because it's looking at two sides of a line.

File "PATH\Model_Project_2\Intersect.py", line 218, in <module>
    arcpy.AlterField_management(AggEN2,sw,f)
  File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\management.py", line 3239, in AlterField
    raise e
ExecuteError: ERROR 001600: Failed to alter field name.
Failed to execute (AlterField).

Failed to execute (IHAT).

countz = 0
EBflds = [z.name for z in arcpy.ListFields(AggEN2)]
EBflds2 = [w.replace("MEAN_", "") for w in EBflds]
EBflds3 = [w.replace("FIRST_", "") for w in EBflds2]
EBflds4 = [w.replace("SUM_", "") for w in EBflds3]
EBflds4.pop(1)
EBflds4.pop(0)
EBflds4.pop(6)
EBflds4.pop(5)
sizE = len(EBflds4)
EBflds4.pop(sizE-1)
EBflds4.pop(sizE-2)
for z in EBflds4:
    glb = [w.name for w in arcpy.ListFields(AggEN2)]
    glb.pop(1)
    glb.pop(0)
    glb.pop(6)
    glb.pop(5)
    sizEG = len(glb)
    glb.pop(sizEG-1)
    glb.pop(sizEG-2)
    w = glb[countz]
    countz = countz + 1
    arcpy.AlterField_management(AggEN2,w,z)

countz = 0
WBflds = [z.name for z in arcpy.ListFields(AggWS2)]
WBflds2 = [w.replace("MEAN_", "") for w in WBflds]
WBflds3 = [w.replace("FIRST_", "") for w in WBflds2]
WBflds4 = [w.replace("SUM_", "") for w in WBflds3]
WBflds4.pop(1)
WBflds4.pop(0)
WBflds4.pop(6)
WBflds4.pop(5)
sizW = len(WBflds4)
WBflds4.pop(sizW-1)
WBflds4.pop(sizW-2)
for z in WBflds4:
    glb = [w.name for w in arcpy.ListFields(AggWS2)]
    glb.pop(1)
    glb.pop(0)
    glb.pop(6)
    glb.pop(5)
    sizWG = len(glb)
    glb.pop(sizWG-1)
    glb.pop(sizWG-2)
    w = glb[countz]
    sw = str(w)
    countz = countz + 1
    arcpy.AlterField_management(AggWS2,w,z)


texts: Why don't all the attributes in the SQL query appear in table?

texts:
I have an SQL query that works fine in the DB Manager but when I load the table as a layer one column does not get loaded.  The different thing about this column is that it is static -- text generated with the query and the same for each row.

It is actually a template for data entry that I want to print on the reverse side of the map.  Effectively a check list for each item.  The only way I could see to get it printed was to add it as an attribute to each row.

eg.

<site name>  Vistited ( ), count1 (  ), count2 (  )....

so volunteers can check fill in the details and the photo


texts:
I have been sent a GPX file to create a trails network on arcgis. When I run the GPX to Feature tool the elevation attributes are all zero, however when I view the GPX file on an online view, there is an elevation profile.

I am not familiar with the properties of GPX files, is it possible the GPX data has no elevation with it and is showing a profile on the viewers (e.g. maplorer) based on google maps?

In which case, can I add elevation data to the shapefile some other way?


texts: excluding KMZ layer in ogr2ogr PostGIS import

texts:
I'm trying to script the import of a KMZ file into my PostGIS 2.2.1 enabled PostgreSQL 9.5.1 database and am running into a problem where it's not importing all of the (several dozen) layers. I think it's because within the KMZ file, there's another KMZ file and it's tripping the import up. Below is the command, but my question is: is there a way to exclude certain layers/files within the KMZ during the import process?

ogr2ogr -overwrite -f "PostgreSQL" PG:"host='hostname' user=postgres dbname='databaseName' schemas=schemaName password=pw" -nln "tableName" "path\to\file\filename.kmz"

I see where you can select certain fields within each layer using the -select trigger, but is there something similar for entire layers?

here's what the unzipped kmz looks like in QGIS:


texts: Editing polygon layer and snapping to another layer using ArcMap?

texts:
I'm using ArcMap, and i've got two large polygon layers that are of the same area (Canada).

One layer is made up of 2,500 polygons, the other is 14. when I clip (using one of the 14 layers) I will get slivers of some of the 2,500 polygons along the edges of my clip. this tells me that they arent exactly on the same lines.

Is there a way to reshape the 14-polygon layer, using some sort of "snap-to-closest" editing tool? or do I need to go edge by edge along the entire thing to edit the layer?


texts: QGIS Contour WAsP .map output file format

texts:
I want to create WAsP .map vector file in QGIS from a input ascii file. For this, I tried using

Raster->Extraction->Contour

and then set the option for 'Output file for Contour lines (vector)' as a WAsP .map file (here, output file name is 1.map). As output of this process, I got a output folder 1.map and inside that folder, I got contour.shp shapefile. Unfortunately, I have not got the vector output file 1.map which is required here. Please suggest me how can I generate the vector output file 1.map (WAsP file format).


texts: Split lines into non-overlapping subsets based on points

texts:
Given a table with line geometry, and one or more points that are snapped to this line in a separate table, I would like to split each line with one or more intersecting points at each of the locations where the line intersects a point.

For example, there is a line, L, with three intersecting points, A, B, and C in order along the line geometry. I would like to return L as four distinct geometries: from the beginning of L to A, from A to B along L, from B to C along L, and from C to the end of L.

In the past I have used shapely for this task, which is a linear referencing problem (http://sgillies.net/blog/1040/shapely-recipes/). However, this would not be practicable in this case, which has many millions of lines and points. Instead, I'm looking for a solution using PostgreSQL/PostGIS.

Note that points are constrained to be on a line. Further, a point can validly be on the start or end of a line, in which case the line need not be split (unless there are other points which are not coincident with the same line's start or end points). The subset lines need to retain their direction and their attributes, but the attributes of the point features do not matter.


texts: Is there a way to create a Personal Geodatabase in QGIS?  I know QGIS can view Personal Geodatabases, but can one be created?  I have a project where the client is requiring a small spatial database (they are very low on the tech level, so I do not want to jump into PostGIS etc etc).  They also only use ArcGIS.  I would like to do the project in QGIS, hence my question.


texts: Case sensitive query of shapefile in ArcMap 10

texts:
I am an IT guy, not a GIS guy. What I know about how to use ArcMap 10 I learned from Google. It has served me well so far. Apparently what I'm wanting to do worked in version 9, but no longer does in the same fashion in 10.

I'm trying to select by attributes on a shapefile. I know that in one type of database you can ignore case, but you cannot in another. I don't know what category a shapefile fits in. I even tried Googling that particular question and couldn't figure it out.

Ultimately, I want to perform a search on a particular column, ignoring case for multiple values. I did have this:

"STRUCSTATE" = 'IL' and ("ENTITY" LIKE '%City%' or "ENTITY" LIKE '%village%' or
    "ENTITY" LIKE '%town%' or "ENTITY" LIKE '%county%' or "ENTITY" LIKE '%district%')

but it used the exact case I used. There may be any mix of case (including impROper) and those strings could be anywhere in the field.

Help?!


texts: Dynamic text based on current layout view of ArcMap?

texts:
Is there a way to display dynamic text on following conditions?

based on current layout view (Data Frame)
combine text from attribute tables from different features (others than Data Driven feature)

Solution should be as follows:

Similar option is used for legends:

Legend Properties - Items - Map Extend Options


texts: Create isochrone from multiple start points

texts:
I want to create an isochrone. For this I could use the pgr_drivingDistance function with pgRouting (http://docs.pgrouting.org/dev/src/driving_distance/doc/index.html) but it only takes one start node.

How could I compute isochrones efficiently from multiple start nodes?


texts:
I have a shapefile in CRS 2100. I use the OpenLayers plugin and inserted Google satellite as background. It changes the project's CRS into EPSG::3857(OTF). So, in the composer manager, when I try to save the work as a PDF or image, the result is to change the zoom level of the project. I saved the shapefile into CRS EPSG::3857 and did the same work, but I had the same results.

Is there a way to fix it?


texts: With Spatialite, how do I run PtDistWithin with meters?

texts:
So the problem is that I have a set of multipolygons and points and I need to be able to query the data with a given point to check which ones are within 'x' km.

Initially my SRID was 4283 but I was unable to figure out a way to use the PtDistWithin function with meters as it used degrees.  I tried loading the data with a SRID of 3577 which should be in meters and querying but I don't get a sensible result.  The query below is my attempt to get the data with 3577 SRID data.

select * from geotable where PtDistWithin(Transform(PointFromText('POINT(144.963, -37.8136)', 4283), 3577), geotable.geom, 10000);

This however does not return any result when I know there should be a number of results returned within 10 km of this point.

Note: I know there is an approximate conversion between degrees and meters but am looking for a cleaner solution.


texts: Copying file from directory to another reading layer columns in PyQGIS?

texts:
I have a shapefile with two columns with links to directory and/or file and NULL
Each record has a columns 'NAME.
Something like this

...  NAME   HOTLINK1                  HOTLINK2
...  name1  C:\...\directory1         C:\...\directory6\file
...  name2  C:\...\directory2         NULL
...  name3  C:\...\directory5\file    C:\...\directory
...  name4  NULL                      NULL

whit the code below I can create a folder for every record in "NAME" if not exist:

import os

layer = iface.activeLayer()
idx = layer.fieldNameIndex('NAME')
path = "path/to/directory"

for feat in layer.getFeatures():
    attrs = feat.attributes()
    if not os.path.exists(path + attrs[idx]):
        os.makedirs(path + attrs[idx])

Now I would need develop this code so as to copy the entire contents of the directory (subdirectories included) and the file from HOTLINK1 and HOTLINK2 to new directory 'NAME'.

So:

if HOTLINK is a directory >>> copy the entire contents of the directory (subdirectories included)
if HOtLINK is a file >>> copy the file
if is NULL >> pass.


texts: Obtaining free satellite imagery for Australian floods?

texts: How can I obtain free satellite imagery for Australia? I want to find the extend of flood in specific time. I have already tried land-sat.But unfortunately there is no data available for that specific period.


texts:
In Leaflet, I want all my markers to be hidden at the same time and show on the click of a checkbox.

Here is my code:

var cordnt=this.coordinates;
var overlayMarker = {};
 console.log("testing coodinates", cordnt)
var layerGroup = L.layerGroup().addTo(map)
for (i = 0; i < cordnt.length; i++) {
  newMarker = new L.marker([cordnt[i][0], cordnt[i][1]]).bindPopup(notation.desc);
  newMarker.openPopup()
   layerGroup.addLayer([newMarker])
  Object.assign(overlayMarker, {'Markers': layerGroup});
}

console.log("testing latlong",layerGroup)
L.control.layers(null, overlayMarker).addTo(map);

How can I achieve this?


texts: Letting multiple lines coincide into one line using ArcGIS Desktop?

texts:
Situation sketch:

I have multiple utility network cables drawn(purple lines in the figure). These lines are drawn all next to each other since I'm working at the level of an "overview map". The next step is however to draw a technical map, where the cables are more realistic drawn, which is that they all lay on top of each other in 1 trench (red line in the middle)

Is there a tool or a python script that allows me to select all the cables and let them coincide/snap/merge to the trench-line, without losing their properties so that afterwards I can still see that the trench contains 5 cables?


texts: How to Batch Export HEC-RAS Results Layers

texts:
I've created a hydro model in HEC-RAS (ver 5.0.3) and have a separate flow profiles for every day of the year, using the 53-year median flow rate for that day, and under multiple structural scenarios proposed for the removal/modification of a dam.

I am creating several maps and animations from the results, and need the daily results as both Inundation Boundary shapefiles and Depth rasters. While HEC-RAS is able to export the results, every single exported file must be individually added via the Manage Results Maps menu in RAS Mapper. I started this process manually, but it's 4 clicks plus scrolling per map.

Even getting just one of the structural scenarios in both shapefile and raster outputs will take ages. As I'll eventually want to expand my results to include historic high and low flow profiles as well, the prospect of that much clicking is galling.

There has to be some way of doing this as a batch process. Hopefully it's one of the changes coming in 5.1, but until then, how can I get several thousand maps exported from HEC-RAS without having to add every map manually?


texts: How do I add packages to Standalone Qgis's Python?

texts:
I have installed the QGIS 2.8 on my Windows 8.1 system, using the Standalone Installer.

I now wish to install the VectorBender plugin.
The docs for this plugin say, that I need to install matplotlib 1.3.0, and it's dependencies first.

How do I install these dependencies?


texts: How to resolve ERROR 010271: Raster does not have an attribute table?

texts:
From my code which builds least-cost paths between several polygons by using the functions "CostDistance" and "CostPath" of ArcGIS , I obtain this error message:

ExecuteError: ERROR 010271: Raster Selected_patch_2 does not have an attribute table
ERROR 010067: Error in executing grid expression.
Failed to execute (CostPath).

This error appears when I execute this code line:

outCostPath = CostPath("Selected_patch_2", "outCostDist.tif", "outCostLink.tif", "EACH_ZONE","FID")

Here my piece of code:

rowsInPatches_2 = arcpy.SearchCursor("Select_transitions_from_patch_1")

for rowPatches_2 in rowsInPatches_2:

ID_patch_2 = rowPatches_2.getValue("ID_patch_2")

expressionForSelectInPatches_2 = "ID_patch_2=%s" % (ID_patch_2)

arcpy.MakeFeatureLayer_management("Patches_2_day.shp", "Selected_patch_2", expressionForSelectInPatches_2)

    rowsSelectedPatch_2 = arcpy.SearchCursor("Selected_patch_2")

    shapeNameSelectedPatch_2 = arcpy.Describe("Selected_patch_2").shapeFieldName

    for rowSelectedPatch_2 in rowsSelectedPatch_2:

        featSelectedPatch_2 = rowSelectedPatch_2.getValue(shapeNameSelectedPatch_2)

        extentSelectedPatch_2 = featSelectedPatch_2.extent

        outCostDist = CostDistance("Selected_patch_1", "DayCost.tif", "", "outCostLink.tif")

        outCostDist.save("outCostDist.tif")

        outCostPath = CostPath("Selected_patch_2", "outCostDist.tif", "outCostLink.tif", "EACH_ZONE","FID")


texts: Converting x,y coordinates to longitude,latitude using QGIS

texts:
I'm working with this downloadable shapefile that has X Y coordinates. They are akin to '3672187.92698000, 534175.72095400'.

I would like to convert them to longitude latitude so they are more like '-90.097017, 29.963176'.

I've seen this question tackled using ArcMap however I don't have that software. I was able to download and install QGIS but I am unfortunately perplexed by its complicated interface. Would like to do the conversion with it, if possible.


texts: Editing geometry field using QGIS Python API

texts:
I have shapefile representing roads as polylines, I want to add 1 arc degree to lat & lot of every point constructing each poly line:

from qgis.PyQt.QtCore import *

layer = iface.addVectorLayer("file_path.shp", "my_layer", "ogr")
iter = layer.getFeatures()
for feature in iter:
    geom = feature.geometry().asPolyline()
    new_geom = []
    for point in geom:
        lon = point[0]
        lat = point[1]
        lon = lon + 1  # or whatever calculation doesn't matter
        lat = lat + 1
        new_geom.append(QgsPoint(lon, lat))
    layer.dataProvider().changeGeometryValues({feature.id(): QgsGeometry.fromPolyline(new_geom)})
crs = layer.crs()
crs.createFromId(4326)
layer.setCrs(crs)
layer.beginEditCommand("edit")
layer.endEditCommand()

When I load the shapefile after executing this script and print all the geoms, I see the editing took place.

However QGIS doesn't display the file (it's not a CRS issue) probably because in the properties->metadata of the file I see in the min/max values, old values before the editing took place.

What I'm doing wrong here?


texts: How to extract information from a tiff file

texts: I have a tiff file that I loaded into ArcGIS. It has roads, rivers and other features including the 600m contour for the region. I want to create a file that only shows the 600m contour. How can I do that?


texts: Theoretical Python question. Say you have an update cursor while-loop for a few selected records. While looping through the rows, at some point a nested if statement triggers an "addfield" event. The rows are meant to continue to loop as normal. Is it the case that a newly added field for a feature class is not selected in the feature layer and therefore omitted in the update cursor? Can you run addfield on a feature selection layer rather than feature class to resolve this issue, i.e. gp.addfield("featlyr", name, "TEXT") where featlyr is gp.MakeFeatureLayer("somefc", "featlyr"); gp.SelectLayerByAttribute("featlyr", etc); cursor = gp.UpdateCursor("featlyr").


texts: How to perform reverse geocoding to custom area on the map?

texts:
I know there are services that perform reverse geocoding, given a pair of lat-long and return an approximate address, city, etc.

The problem I have is that given a lat-long, I want to return the region it falls under (on the map) but the region is custom defined (e.g. a random square on the map).

For example, I have the following picture with different custom regions (the region shapes are stored in a KMZ file).

How can I determine which red polygon a lat-long falls inside? Or if it falls outside all of them?


texts: Which GIS Software is Right for small manufacturing trends analysis?

texts:
I'm a graphic designer who has been tasked with choosing a mapping platform for the manufacturing company I work for. One of my colleagues began our project by using a trial version of ArcGIS to develop some relatively simple maps - just a few shape layers using vectors to describe trade regions, zones associated with sales reps and the like - using light gray basemap with streets and political boundaries plus a population density map as a layer (from ESRI's map server). Although a fair amount of work has been done in ArcGIS, being able to use it commercially is going to incur a licensing fee we would prefer to avoid.
Ultimately we'd like to have a customer facing map viewable online through our website. I'm thinking it would be cool to have an app featuring the map tied into a gps locator, so that customers could automatically be fed contact and product info particular to their location.

I've downloaded QGIS and played around with that a bit, making maps is fairly easy and straightforward, but integrating map projects into a website seems to be an involved affair compared to ArcGIS.

The other option I'm considering is Google Maps Engine, which seems to be a rather attractive choice - map making is fairly simple and straightforward, website integration should be well supported considering its Google, just waiting to hear back from Google on pricing/trials.

If anyone could give me some advice on which program would be right for my situation, it would be greatly appreciated. Thus far, the choices are:
1) Stay in ArcGIS and pay the license fee - which would be a fairly seamless transition from the trial run, but I'm concerned the program is way too comprehensive for our needs.
2) Go to QGIS and avoid fees, but pay more in time spent recreating vector layers, setting up an online browser for customers - and again I'm concerned this is possibly too much program for our needs.
3) Go to Google Maps Engine, assuming they get back to us.


texts: Converting Direction Of Travel OSM vectors from "system" to another?

texts:
I have a painful doubt according Direction of Travel (DOT) vectors in OSM data. I'm using ArcGIS10, and a OSM data shapefile.

I have a OSM road layer, that has many "Both ways" vectors and many "One way". I'll consider only One way for my study.

Its DOT was performed as it was created the vector in its origin: The DOT is set from the start point of the vector to its finishing point.

But, I want to change this system to mine, which is:

Each vector has a Reference Node and a Non-Reference Node.
The Reference Node is the southernmost node and if the latitudes of both end nodes are identical and their longitudes differ, the Reference Node is the westernmost node.

An example:

So, if I have a One way vector, I'm going to add its DOT with a letter T if it goes to the Reference Node or with a letter "F" to the Non-Ref node. An example:

Considering that OSM one way vectors are set in another "system", how can I have it into my system?


texts: Free tool to convert ArcGIS layer package (*.lpk) to shapefile (*.shp)?

texts:
I have received a *.lpk file from Esri's ArcGIS platform that I would like to convert to a shapefile.

How can I do this, using only free software?


texts: Import Error in Postgis: AddGeometryColumn does not exist

texts:
Importing with configuration: ind_adm2, public, geom, C:\Program Files\OpenGeo\OpenGeo Suite\webapps\geoserver\india map\IND_adm2, mode=c, dump=1, simple=0, geography=0, index=1, shape=1, srid=0
Shapefile type: Polygon
PostGIS type: MULTIPOLYGON[2]
Failed SQL begins: "SET CLIENT_ENCODING TO UTF8;
SET STANDARD_CONFORMING_STRINGS TO ON;
BEGIN;
CREATE TABLE "public"."ind_adm2" (gid serial,
"id_0" int4,
"iso" varchar(3),
"name_0" varchar(75),
"id_1" int4,
"name_1" varchar(75),
"id_2" int4,
"name_2" varchar(75),
"nl_name_2""
Failed in pgui_exec(): ERROR:  function addgeometrycolumn(unknown, unknown, unknown, unknown, unknown, integer) does not exist
LINE 17: SELECT AddGeometryColumn('public','ind_adm2','geom','0','MUL...
                ^
HINT:  No function matches the given name and argument types. You might need to add explicit type casts.

Shapefile import failed.


texts:
I have used the leaflet.animatedmarker from openplans on GitHub to create a marker that moves along a line. I also have added a video that will popup above the line. This plays fine with the marker moving.

What I want to be able to do is have a button that is able to start and pause the video and marker at the same time. I would also like the added benefit of being able to move backwards and forwards in the video and marker on the line. I am just wondering if this possible, and how I might go about it?


texts:
I want OSM administrative boundaries from http://global.mapit.mysociety.org/area/14455.html.
I can get the geodata in different formats there, but the attribute data always is a separate JSON file. I want them both in just one file, or to be able to merge the information.

I haven't found a solution to merge the GeoJSON.

What's the workflow to get the two files joined and saved as a shapefile, for example?


texts:
Using Ubuntu 18.04.

I have problems loading UK Environment Agency WMS layers. This first arose when I installed QGIS 3.10 and persists in QGIS 3.10.1.

It appears that when QGIS makes a WMS request it adds the current version to the User-Agent string, so in version QGIS 3.10.1 this results in "Mozilla/5.0 QGIS/3.10.1-A Coruña" and that the "ñ" character is causing the request to be rejected.

I wonder if there is any way around this problem? For example, would it be possible bypass the built-in QGIS mechanism for making WMS requests, perhaps using a file? If so, what would such a file look like?

This is an example of an  Environment Agency WMS URL:

https://environment.data.gov.uk/spatialdata/lidar-composite-digital-surface-model-dtm-2m/wms


texts: R calculate raster cell size in map units

texts:
I have a RasterLayer and would like to know the cell size. I haven't find any function in the packages :-S . Does someone have an idea ?

info about the RasterLayer

class       : RasterLayer
dimensions  : 40, 40, 1600  (nrow, ncol, ncell)
resolution  : 0.0001106628, 0.0001106628  (x, y)
extent      : 3.061558, 3.065984, 42.5269, 42.53132  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
data source : in memory
names       : layer
values      : 0, 33  (min, max)


texts: convert data from osm to osm tiles/marble

texts:
I need to convert the raw thata OSM XML to tiles styled like standard OSM tiles (and other styles if possible)

From the research I've done I've found I need to have osm2pgsql and put it on the same server with my data (postGIS or sth), then I can render it with Mapnik using OSM style.

1) Do I have to have a server to convert files?
2) Is there a faster way to do this? (I've found sth about Imposm)


texts: How can I stack/pile point layers within administrative areas with qgis

texts:
How can I stack/pile point layers within administrative areas with QGIS. Close points (categorized) should not overlap in zoomed out map (and lose their position).

Please see the visualization of cooperatives in Berlin or Hamburg in the following example:

Example:


texts: Dynamically update position of geolocation marker in Openlayers 3

texts:
I've followed the instructions of the following post: l3 (OpenLayers-3) add geolocation marker to add a geolocation marker to an ol3 map. The probem is, that the mentioned post ends up with proposing tho use the geolocation.once ('change:position')-event to avoid multiple recreation of the geolocation-marker-layer. This approach is contradictory to the intention of having an marker that updates its position in real time.

I've tried to define the iconlayer outside the geolocation.on('change')-event supposing, that it would be possible to just update the coordinates every time the event is fired.

I now get an TypeError: a is null and I cannot see where the problem lies.

  var geolocation = new ol.Geolocation({
    projection: map.getView().getProjection(),
    tracking: true,
    trackingOptions: {
      enableHighAccuracy: true,
      maximumAge: 2000
    }
  });

  var iconStyle = new ol.style.Style({
    image: new ol.style.Icon({
      anchor: [0.5, 100],
      anchorXUnits: 'fraction',
      anchorYUnits: 'pixels',
      opacity: 1.0,
      src: './_img/marker_.png'
       })
      });

  var pos_first = geolocation.getPosition();

  var iconFeature = new ol.Feature({
      geometry: new ol.geom.Point(pos_first)
  });

  var iconSource = new ol.source.Vector({
    features: [iconFeature]
  });

  var iconLayer = new ol.layer.Vector({
    source: iconSource,
    style : iconStyle
  });

  map.addLayer(iconLayer);

  geolocation.on('change', function() {
    var pos_upd = geolocation.getPosition();
    iconFeature.getGeometry().setCoordinates(pos_upd);
    view.setCenter(pos_upd);
    view.setZoom(18);
  });


texts: How to write labels with varying significant figures/decimal places?

texts:
I have results that range from ex. 113,009 down to 0.00495 - Can someone recommend a way to write/construct a label expression for the following in ArcMap:

•   If less than 1, use 2 decimal places (or three if absolutely necessary to show the first non-zero value)
•   From 1 to 10, use 1 decimal place
•   If 10 or greater, use no decimal places

Or a way to quickly generate a new text column/field which adheres to the above?