texts: Changing symbology of a single selected polygon feature instead of the entire feature class value

texts:
Using ArcGIS 10.7
I am editing a polygon layer, which I set to transparent so that I can make my edits according to a raster template underneath. With the amount of edits I am doing I would like to keep track of the edits by color filling the edited polygons features.
I have tried keeping the edited polygon selected and then going to layer properties > symbology, and changing the symbol properties for the class value the polygon belongs to. However, this changes the symbology for all polygon features belonging to the class, instead of just the selected feature (I get the same result when I select 'Properties for selected symbols'). Basically, I would like to know if there is a quick way to color fill the single feature polygon I select in order to keep track of edits.


texts: Graphics in MXD file are not imported in ArcGIS Pro

texts: I have an MXD file with some graphics (point and text graphics). When I open the file in ArcMap, the graphics load up correctly. But when I import the MXD file in ArcGIS Pro, the graphics are missing. How do I get them to show in ArcGIS Pro?


texts:
I need to reproject my ASCII Grid data. My data format is EPSG:32629 and I need to reproject this data to WG64 format.

Someone knows any reprojection tool?


texts: Exporting vertical 3D surface in Geosoft Oasis to ArcGIS/ Arc Scene

texts:
I have point resistivity data with x,y,z coordinates and a data value (which is resistivity).

I can display it in Oasis Geosoft Montaj through gridding, as a 3D vertical surface.

How can I export this to be compatible with and view in ArcScene?


texts: Improve performance to render tiles from Geoserver on Google map

texts:
I have started using GeoServer and PostgreSQL combination to render polygons (more than 4000) on Google Map. Everything seems to be fine.

However, when I zoom the map, layers are redrawn very slowly on browser.
These polygons are not fixed. I get information about which polygons need to be displayed from a web page and then from PostgreSQL view. Therefore I have passed viewParams in WMS service of GeoServer.
I use GeoWebCache.

But the problem I described above does not solve from GeoWebCache. Is there anything that I can try to improve performance?


texts: Why does r.series produce incorrect results when aggregating?

texts:
I'm currently aggregating multiple viewshed rasters keeping only the maximum value from each cell. When using r.series like shown below, the produced result is incorrect with added no data values. Why?

How I set up r.series:

The 7 different rasters I'm aggregating looks like this:

And the aggregated results looks like this:

And as you can see above, the aggregated raster is definitely not aggregating maximum values, and on top of that adding no data values.

Is this a bug in r.series or is there something wrong with my data? I've also tried SAGA GIS Mosaic function which provides a more accurate result, but since some sort of nearest neighbor interpolation takes place, the results isn't 100% correct but much better then r.series:

Can anyone provide a work-around or point out what's wrong?
Smaller clip of the data I'm using, style included. If anyone wants to try and reproduce the error?


texts: Chlorophyll Timeseries in Google Earth Engine

texts:
I am trying to create a time series for chlorophyll using Google Earth Engine. However once I run my code, i get an error message saying "Collection.geometry: Unable to perform this geometry operation. Please specify a non-zero error margin." Can someone explain what this means, and if possible, how to overcome it?

This is the code I've been using:

     //filter for only L.Manyara images
     //define polygon
    var AOI = /** color: #d63000 */ee.Geometry.Polygon(
     [[[35.7962, -3.3818],
     [35.8868, -3.414],
     [35.8175, -3.8334],
     [35.7021, -3.841]
     ]]);

   //create landsat 7 iamge collection
    var collection =ee.ImageCollection('LANDSAT/LE07/C01/T1_TOA')
   //.filterDate('2000-04-01', '2018-01-02).
   .filterBounds(AOI);

  //Chorophyll function

  var mask_chl = function(image) {
 //Define area of interest
  var AOI = /* color: #d63000 */ee.Geometry.Polygon(
    [[[35.6204, -3.2996],
    [36.1862, -3.3434],
    [35.9885, -4.0108],
    [35.3334, -3.8547]
    ]]);

  //clip image based on AOI polygon
 var image = image.clip(AOI)

// Compute the chl using an expression.
var chl = image.expression(
  '-135 + 451* (NIR/RED)', {
    'NIR': image.select('B4'),
    'RED': image.select('B3'),
});

var chl = chl.set('system:time_start', image.get('system:time_start'))

//mask clouds
var chl_masked = chl.mask(image.select('BQA').eq(672));

//get image data from landsat image metadata
 var eedate = ee.Date(image.get('DATE_ACQUIRED'));
 var start = ee.Date(eedate.advance(-15, "day"))
 var end = ee.Date(eedate.advance(15, "day"))
 var imageCollection = ee.ImageCollection("JRC/GSW1_0/MonthlyHistory")
  .filterDate(start, end);

// Pull out the first image in the collection and clip to AOI
 var LandWaterMask = ee.Image(imageCollection.first()).clip(AOI).eq(2);
 // Mask the non-watery parts of the image
  var chlMapMasked =
 chl.updateMask(LandWaterMask.neq(0)).set('system:time_start',
 image.get('system:time_start'));

 return chl_masked
};

 // Apply function to collection
 var chl_collection = collection.map(mask_chl);
 var Viz = {min: 500, max: 0, palette: ['00FFFF', '0000FF']};
 Map.addLayer(chl_collection, Viz)
Map.centerObject(chl_collection)
print(chl_collection)
// Define a region of interest as a buffer around a point.
var geom = ee.Geometry.Point(35.8175, -3.5902).buffer(50);

 // Create and print the chart.
 print(ui.Chart.image.series(chl_collection, geom, ee.Reducer.mean(), 1));

Map.addLayer(geometry)


texts: Is gid field guaranteed to exist in PostGIS?

texts:
I've seen the gid field/column in a lot of PostGIS tables and questions. It seems to be a unique ID often available (see e.g. In PostGIS is it possible to create a View with a unique ID?)

My questions are:

Is the gid field guaranteed to exist in all PostGIS tables?

If not guaranteed at all times, when are they guaranteed to exist and when are they not?

For example, tt seems to me that tables imported using shp2pgsql all have the gid field. But I wanted to know if I can rely on the existence of such a unique id field, which I'd like to use as a primary key.

(I'm using PostgreSQL 9.5+, PostGIS 2.2+)


texts: Create vertex at line with reference to point

texts: I have a line layer and point layer snapped over line. I want to create vertex at line where point lies. How to do it in FME 2018?


texts:
I'm having a bit of a problem with clustering in map server the clustering itself works fine and the GetFeatureInfo works fine most of the time. However some times when I click on a cluster point it some times gives a different number to how many points are meant to be in the cluster.

See this example cluster should contain 171 points but clicking on it gives 173.

Here is my mapfile I've removed the classes as its ridiculously long with them and I don't think its relevant

MAP
  FONTSET "fonts.list"
  IMAGETYPE "png"
  MAXSIZE 3000
  NAME "TEST"
  SIZE 1000 1000
  STATUS ON
  UNITS DD

  OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "AGG/PNG"
    EXTENSION "png"
    IMAGEMODE RGB
    TRANSPARENT FALSE
  END # OUTPUTFORMAT

  SYMBOL
    NAME "circle"
    TYPE ELLIPSE
    FILLED TRUE
    POINTS
      1 1
    END
  END

  PROJECTION
    "init=epsg:4326"
  END # PROJECTION
  LEGEND
    KEYSIZE 20 10
    KEYSPACING 5 5
    LABEL
      SIZE MEDIUM
      OFFSET 0 0
      SHADOWSIZE 1 1
      TYPE BITMAP
    END # LABEL
    STATUS OFF
  END # LEGEND

  QUERYMAP
    SIZE -1 -1
    STATUS OFF
    STYLE HILITE
  END # QUERYMAP

  SCALEBAR
    INTERVALS 4
    LABEL
      SIZE MEDIUM
      OFFSET 0 0
      SHADOWSIZE 1 1
      TYPE BITMAP
    END # LABEL
    SIZE 200 3
    STATUS OFF
    UNITS MILES
  END # SCALEBAR

  WEB
    METADATA
      "wms_srs" "EPSG:900913"
      "ows_enable_request"  "*"
      "wms_title"   "Testing"
    END # METADATA
  END # WEB

  LAYER
    CLASSITEM "Cluster:FeatureCount"
    CLUSTER
      BUFFER 10
      REGION "ellipse"
    END # CLUSTER
    CONNECTION ""
    CONNECTIONTYPE POSTGIS
    DATA "position from data"
    LABELCACHE OFF
    LABELITEM "Cluster:FeatureCount"
    METADATA
      "wms_include_items"   "all"
      "wms_timeitem"    "datetime"
      "wms_timeextent"  "1910-01-01/2050-02-01"
      "gml_include_items"   "all"
      "gml_geometries"  "none"
      "wms_title"   "Data"
    END # METADATA
    NAME "test1"
    PROCESSING "GETSHAPE_STYLE_ITEMS=all"
    PROCESSING "LABEL_NO_CLIP=True"
    PROCESSING "CLUSTER_GET_ALL_SHAPES=ON"
    PROCESSING "ITEMS=id"
    STATUS OFF
    TEMPLATE "blank.html"
    TILEITEM "location"
    TOLERANCE 10
    TYPE POINT
    UNITS METERS

    CLASSES_HERE
  END # LAYER

END # MAP

I hope that provides enough for some suggestions on the issues if any more information is required please do let me know, any suggestions would be highly appreciated.


texts:
We are on the verge of rolling out 'Essen' 2.14.

Our IT people are reluctant to roll out QGis with the ‘Advanced’ tab being available in ‘Settings’ > ‘Options’ > ‘Advanced’

Does anyone know of a way to remove it?


texts: Country border coordinates with GADM and R

texts:
I have loaded the sp library in R and the rds file for a specific country (see here), now how can I extract the list of coordinates from this object?

When I ask for the names of the object, the result is:

 [1] "OBJECTID"      "ID_0"          "ISO"           "NAME_ENGLISH"  "NAME_ISO"
 [6] "NAME_FAO"      "NAME_LOCAL"    "NAME_OBSOLETE" "NAME_VARIANTS" "NAME_NONLATIN"
[11] "NAME_FRENCH"   "NAME_SPANISH"  "NAME_RUSSIAN"  "NAME_ARABIC"   "NAME_CHINESE"
[16] "WASPARTOF"     "CONTAINS"      "SOVEREIGN"     "ISO2"          "WWW"
[21] "FIPS"          "ISON"          "VALIDFR"       "VALIDTO"       "POP2000"
[26] "SQKM"          "POPSQKM"       "UNREGION1"     "UNREGION2"     "DEVELOPING"
[31] "CIS"           "Transition"    "OECD"          "WBREGION"      "WBINCOME"
[36] "WBDEBT"        "WBOTHER"       "CEEAC"         "CEMAC"         "CEPLG"
[41] "COMESA"        "EAC"           "ECOWAS"        "IGAD"          "IOC"
[46] "MRU"           "SACU"          "UEMOA"         "UMA"           "PALOP"
[51] "PARTA"         "CACM"          "EurAsEC"       "Agadir"        "SAARC"
[56] "ASEAN"         "NAFTA"         "GCC"           "CSN"           "CARICOM"
[61] "EU"            "CAN"           "ACP"           "Landlocked"    "AOSIS"
[66] "SIDS"          "Islands"       "LDC"

Am I wrong to assume the list is among one of these?


texts: Can a feature class be stored as a shapefile?

texts:
This is a general question about how a feature class is stored or can be stored using python/arcpy.

Can a list of created points (a feature class) be saved as a shapefile or in a shapefile, or to create a new feature class do you have to create a gdb and then add the feature class to it, then ultimately convert this to a shapefile using ArcPy?


texts: ArcGIS JSAPI attachment editor works only in IE, Edge but not in Chrome, FFox

texts:
We use ArcGIS JS API Editor which in turn uses esri.dijit.editing.AttachmentEditor to edit feature attributes and attachments in web browser. However adding attachment (file upload) doesn't work in Chrome and Firefox. A post is made to REST endpoint addAttachment of feature service, with request header Content-Type:text/plain;charset=UTF-8 , and body consisting of serialized DOM tree like:

0=%5Bobject%20HTMLInputElement%5D&sizzle-1491811182682=%5Bobject%20Object%5D&acceptCharset=&action=&autocomplete=on&enctype=application%2Fx-www-form-urlencoded& ...

This fails displaying in error log:

SyntaxError: Unexpected token <
    at Object.b.fromJson (init.js:220)
    at Object.json (init.js:177)
    at s (init.js:182)
    at c (init.js:66)
    at d (init.js:66)
    at b.Deferred.resolve.callback (init.js:67)

Also a string fjson is displayed just below "Choose File" button.

In Edge upload attached file send POST request with correct header, e.g. Content-Type: multipart/form-data; boundary=---------------------------7e1d26607d4 and works correctly.

Actually the same issue exists in ArcGIS Server Manager with upload elements (like Publish service). They don't work in Crome. So I believe there is some issue with dojo library.

Has someone found a workaround for this issue?

(Arcgis js api 3.18)


texts:
I already know how to share a layer, or create a empty webmap (and add layers after its creation) through Python on ArcGIS Pro. However I could not find a way to share a Web Map trough Python.

By that I mean uploading a map to AGOL, with all the current layers (either these layers being online or local). The way to do this on ArcGIS Pro is very straight forward (you just press Share as a Web Map, fill 3 fields and that is it), but I wonder if its possible to do through Python.

I'm write the code trough a Python Toolbox in ArcGIS Pro.


texts:
I'm using Leaflet map + GeoServer to display a map. I have a TIFF file and a DTED level 2 file.

I created a GeoTIFF store and layer that i'm showing in Leaflet, And I created a DTED store and layer in GeoServer.

I want now to display the altitude of each point from the DEM Layer, like so:

Latitude: 32.123 ,longitude: 12.112, Altitude: 12312 m

How do I get the altitude data from the store I created?

I tried using WCS protocol but I only get images.


texts: How to catch mouse-over event on Dynamic or Tiled Layer

texts:
I need to fetch as IMAGE, the results of querying/filtering the data of a layer.
So, I decided to use the dynamic service layer.

I can use the identify task to so as to show an infobox containing the information of a point. However it is slow and it could work only onclick.

The problem is that I MUST make popup-infoboxes play on MOUSE-OVER.
THis makes the use of Identify task infeasible, since I would have to send  requests all the time, when the user moves his mouse over the map.

1) So, How could I get the info of the point that my mouse is currently over, when using DynamicServiceLayer?

2) Could I use any other type of layer, that brings the results as Images to achieve mouse over?

3) Is there any best practice for infoboxes and dynamic service  layers for better performance?

You can take a look at these exaples using tileJSON . They are based on tileJson. Can't Arcgis do somethig like that ?


texts: Addressing Z-dimension discarded when reading in shapefiles from ArcMap to R?

texts:
I'm reading in polygons from ArcMap 10.6.1 into R 3.5.1 using raster::shapefile. I sometimes get the following warning:

  Warning message: In rgdal::readOGR(dirname(x), fn, stringsAsFactors =
  stringsAsFactors,  :   Z-dimension discarded

I'm confused because I'm not even employing rgdal to read in. Area calculations using the resulting SpatialPolygonsDataFrame are incorrect, and I think this error reading in is why. It's projection is

  CRS arguments:  +proj=utm +zone=12 +datum=WGS84 +units=m +no_defs
  +ellps=WGS84 +towgs84=0,0,0

I've tried readOGR and get the same warning. I am able to read in some other shape files in the same way with the same projection, and they work just fine. Why do I get this warning and how can I remedy it?

Edit: reading in using sp::st_read does not return an issue re: Z-dimensions until I try to convert. However, I need a SpatialPolygonsDataFrame to do what I need to do but this is how the file reads in:

Simple feature collection with 1 feature and 5 fields
geometry type: MULTIPOLYGON
dimension:  XYZ
bbox:    xmin: 365305.5 ymin:5809943 xmax: 476043.9 ymax: 5891941
epsg (SRID):    32612
proj4string:    +proj=utm +zone=12 +datum=WGS84 +units=m +no_defs

How do I convert to a spdf? df::as_Spatial return this error:

  Error in StopZ(zm) :    sp supports Z dimension only for POINT and
  MULTIPOINT. use drop_zm(...) to coerce to XY dimensions


texts: Cluster analysis for different plant species with elevation, aspect, slope rasters using ArcGIS Desktop?

texts:
I am using ArcGIS Desktop.

I have a point shapefile for 5 different plant species and rasters (elevation, slope, aspect, canopy height). I am trying to find clusters for each species in terms of raster values (elevation, slope, aspect, canopy height). I need to figure out where cluster are spatially and significantly. So far, I ran extract multi values to points, and I have raster values for each point in attribute table. Then, I got stuck!

Do you have any ideas what to do next to have a visual layer ( raster or vector) where it shows the significant clusters?


texts: Import osgeo/gdal fails with Anaconda / Spyder

texts:
I am trying to use osgeo/gdal with Anaconda, but am failing to import osgeo or gdal when attempting to use a custom Anaconda environment.

I have created a new Anaconda environment that can utilize arcpy using the following command
conda create -n arc1041 python=2.7.10 numpy=1.9.2 matplotlib=1.4.3 scipy=0.16.0 pandas pyparsing xlrd xlwt  console_shortcut

However, when I open up the new environment, arc1041, with the anaconda prompt, I can't import osgeo and gdal. And, when I try to use Spyder as the IDE, I can't import gdal. I get an error message stating

 File "C:\Users\RDCERWAW\AppData\Local\Continuum\anaconda2\envs\arc1041\lib\site-packages\osgeo\__init__.py", line 21, in swig_import_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)

ImportError: DLL load failed: The specified module could not be found.

Within the default Anaconda environment, I can import osgeo/gdal at both the command prompt and when using Spyder. I have appended the sys.paths from the default environment into the arc1041 environment, but this doesn't help.

Not sure how to proceed with running Anaconda/Spyder that has both ArcPy and osgeo/gdal capabilities.


texts: Rasterize: Best way to burn string values into raster (string to real) (QGIS)

texts:
I have to rasterize a polygon layer. Unfortunately the values of the field I have to burn into the raster has a variety of string entry's like "L239x" or "a403" (case sensitive!). RAT (Raster Attribute Tables) are no option in QGIS (see comments).
So I need to translate the strings into real numbers. I thought about creating a new field and translating the the letters into a numeric code (f.e. place in alphabet) using an expression. But how? Any ideas?


texts: QGIS 2.8 Labels are lost when setting map rotation with crs on the fly

texts:
I was working with QGIS 2.8.1. When I set the map rotation in canvas the canvas rotated as wished but all the labels were lost. I found out if I disable CRS OTF(on the fly) all the labels will be displayed correctly.

So the question is how to render labels correctly with map rotaion and CRS OTF enabled in QGIS?


texts: How to combine raster files (.img) into a mosaic and then clip around a boundary?

texts:
I'm new to QGIS and the tutorials I've tried don't seem to be working. Using QGIS 3.10
I downloaded a LiDAR DTM package from Ontario GeoHub. I found about 60 files that cover my boundary outline shapefile.

I'd like to stitch the raster images together (not overlay) (since I believe you need one raster layer for the next step to clip?)

I'd like to clip the raster image to the shapefile outline of a selected area. Aka I want just the raster image to be inside of the boundary-outline shapefile.

I either get a large black square after I try to clip or nothing seems to happen... I've tried to stitch the images together using merge and build virtual raster. In terms of clipping I've tried "clip raster by mask extent", and the clip functions.
https://geohub.lio.gov.on.ca/datasets/776819a7a0de42f3b75e40527cc36a0a?geometry=-82.063%2C43.286%2C-78.117%2C43.982


texts: Setting a fixed zoom (min/max) level in ArcMap 10.3.1

texts: I have built a statewide base-map for a project and want to set the zoom levels so that the map cannot be zoomed past certain levels. I have set the scale range on each of the (11) group layers, but that doesn't stop the ability to zoom past those set levels - the features are simply turned off when the scales are past. I am trying to figure out a way to "freeze" the display at either ends of the map so that the end users never zoom to far and get nothing but a white screen. I have tried setting the extent of the data frame, but this only allows me to lock the map at a single level; I still need to have the function of zooming in and out from 1:5,000,000 down to 1:5,000.


texts: Problems using pgr_fromAtoB - postgresql error

texts:
I have some trouble with the pgr_fromAtoB function of the workshop.
I get:

ERROR:  column "ways" does not exist

But "ways" is the table, not a column. What am I do wrong?
My table ways looks like:

Table "public.ways"
Column  |           Type            |    Modifiers
----------+---------------------------+----------------------------------------------------
gid      | integer                   | not null default                 nextval('ways_gid_seq'::regclass)
__gid    | numeric(10,0)             |
class_id | numeric(10,0)             |
type     | character varying(23)     |
length   | numeric                   |
name     | character varying(40)     |
osm_id   | character varying(14)     |
the_geom | geometry(MultiLineString) |
source   | integer                   |
target   | integer                   |
Indexes:
"ways_gid_idx" UNIQUE CONSTRAINT, btree (gid)
"source_idx" btree (source)
"target_idx" btree (target)
"ways_source_idx" btree (source)
"ways_target_idx" btree (target)
"ways_the_geom_gidx" gist (the_geom)


texts: Opening and extracting data from Shapefiles?

texts:
We are in need of US highway data.

We found it for Florida at the state GIS website.

We downloaded the data for Florida highway intersections from here (this is a zip file).

How do we use these files and extract the geocode values of the intersections (exits) from them?


texts: Exporting ArcGIS plugin data source to Shape?

texts:
I have implemented a plug-in data source for ArcGIS. In my case, the format read by the plug-in may contain point, line and polygon features within the same file.
In my implementation the data file read by the plugin is a dataset which may contain up to three feature classes (point, line, poly).

In ArcMap I can sucessfully browse to my data sources and add feature classes to the map. If I then open the ArcToolbox->Conversion Tools->To Shapefile->Feature Class To Shape tool I can see the added feature classes in the Input Features pulldown menu and add them. Using this method I can sucessfully export the feature class to a Shape file.

Also, in ArcCatalog I can browse to the feature classes contained in my custom files or I can enter a path into the Location: box in ArcCatalog for example: f:\arctest\plugindata\testPT\testPT_PT where f:\arctest\plugindata is the location of my data file, testPT is the root name of my data file (less extenstion) and testPT_PT is the name of the feature class within the file. Doing this will sucessfully browse to and open my file.

The trouble coumes when I attempt to use the ArcToolbox->Conversion Tools->To Shapefile->Feature Class To Shape tool and enter the full path to my feature class f:\arctest\plugindata\testPT\testPT_PT directly into the Input Features box rather than first adding the feature class to a map and then selecting it via the Input Features dialog. I am immediately greeted with 000732 dataset does not exist or is not supported.

I believe that I have traced the probem to the call made by ArcGIS to the ContainsWorkspace() that I have implemented in my custom workspace factory. My ContainsWorkspace() is being called and the parentDirectory being passed to me in the above example is f:\arctest when I expect to be called with f:\arctest\plugindata. As it is I am being called to indicate whether f:\arctest contains a workspace which it does not, f:\arctest\plugindata does. ContainsWorkspace() is never called with f:\arctest\plugindata and the Export To Shape tool immediately indicates that the specified feature class is invalid.

Again, if I enter f:\arctest\plugindata\testPT\testPT_PT into the location box in ArcCatalog I am immediately taken to the correct featureclass, it is only the Shape Export dialog that will not accept this path.

I am fairly new to ArcGIS Engine development and this is my first data source plugin so I I have not clearly explained the situation I apologize.

Can anyone give me some pointers on where to look for my failure?


texts: QGIS: I can barely see the labels in layer panel

texts: So, I finally bit the bullet and upgraded to QGIS 3.2.3 Bonn.  However, for layers that are not turned on the font is a super light grey in the layer panel and I can barely read it.  How can I change what this looks like so I won't need to get glasses in 6 months?


texts: Automatically (re)classify data from layer using QGIS?

texts: Is it possible to automatically (re)classify the data of a layer? (properties-symbology-delete all-classify) Because now I have to do this manually each time my data source changes.


texts: I have a world map shapefile with the country boundary. I want to represent my data associated with specific countries. The values are to be represented in a colour graded manner along with proportional circles. What steps should be taken after I have added my shapefile?


texts: PyQGIS: subtracting two values and append ID to list

texts:
I would like to subtract two values retrieved from qgs feature iterator objects and append the value of the feature id to a list depending on a condition.

I have two layers:

roadsLayer
pathsLayer

What I have so far returns an empty list:

evenList = []
azimuthRoadsIDX = roadsLayer.fieldNameIndex('azimuth')
azimuthPathsIDX = pathsLayer.fieldNameIndex('azimuth')
roads = roadsLayer.getFeatures()
paths = pathsLayer.getFeatures()
for feat in roads:
    for feature in paths:
        pathsAzimuth = feat.attributes()[azimuthRoadsIDX]
        roadsAzimuth = feature.attributes()[azimuthPathsIDX]
        if (roadsAzimuth - pathsAzimiuth == 90) or (roadsAzimuth - pathsAzimth == -270):
            evenList.append(feature.id())

I also know that these values exist through manual testing and based on the fact that they are perpendicular lines.

Don't know why, but this works:

for feat in roadsLayer.getFeatures():
    roadsAzimuth = feat.attributes()[azimuthRoadsIDX]
    for feature in pathsLayer.getFeatures():
        pathsAzimuth = feature.attributes()[azimuthPathsIDX]
        if (roadsAzimuth - pathsAzimiuth == 90) or (roadsAzimuth - pathsAzimth == -270):
            evenList.append(feature.id())


texts:
I load a VectorLayer which contain coordinate location point.

Now, I have a VectorLayer  and I would like to get the point location on a item of this layer in order to center a map to this point.

Is it possible ?


texts:
I got a shapefile which is in degrees format. For a vector analysis, I need it to be in meters to set a maximum distance. I can't do that with degrees.
I know about on the fly CRS change; That's not what I ask about.


texts: Comparing printed nautical charts to GPS coordinates

texts:
I'm just getting my head wrapped around the various geodesic systems. I have some (printed) Finnish nautical charts I'm trying to match to GPS coordinates. Given the number of underwater obstacles, I'm trying to make sure I'm doing this correctly. The charts simply state "Longitude from Greenwich" for East-West and are published in 2002, but otherwise have no technical information on the coordinate system used. According to this post (http://www.kolumbus.fi/eino.uikkanen/geodocsgb/ficoords.htm) I'm suspecting that the maps are in fact using a "KKJ" system which is based on ED50.

So, just to sanity check my understanding, the fact that I'm looking at a map with deg Lat/Long does not mean that these actually match up to GPS coordinates? Of course I can buy a complete new set of maps for 39euros to find out, but wanted to at least see if I got all this right ...


texts: Openlayers add feature in Internet explorer memory issue

texts: We have a map configuration, where at a certain zoom level we have to plot N number of features, ranging in hundreds to thousands, but on Internt Explorer, if the feature count is more than 2500, than there are memory issues. So, is it possible to plot the features on the map progressively in a manner, so that memory issues can be resolved?


texts: How to count record points within a given area (electoral district)?

texts:
New user to GIS and to QGis but experienced data user.

I have shapefiles for a state legislative districts.  I have a set of individual voter records that I have geocoded.

What I'd like to do is create a map where the color wheel displays the number of voters per legislative district.  I'm not quite sure how I'll do the join (or even if I should use a join).

I know this is probably basic and I'm asking the question wrong but guidance appreciated.


texts:
When buffering a point, the result is inaccurate to the basemap.

I specify a 200 foot buffer around a point however the resulting buffer has a distance from the point of about 260 feet. Both the measure distance tool and the scale bar on the layout view agree that the 200 foot buffer is indeed greater than 200 feet.

The .MXD uses a coordinate system of WGS84 Web Mercator Auxiliary Sphere as I am using some of ESRIs available online datasets, however I have added other data in different projections.

These data include:

State-provided data (multiple point shapefiles) in State Plane UTM Zone 13N
Field collected data in NAD27
Federally provided data in GCS North America 1983 (Datum NAD83)

I am using the buffer tool in the Analysis toolbox to buffer the point collected in the field (NAD27)

I have tried re-projecting both my location and the resulting buffer however this only results in moving the shapefiles relative to my basemap, with no resultant change is size.

How can I correct this issue?

Note: The displayed NAD27 Point is positioned accurately to the WGS84 Web Mercator basemap. (projected "on the fly" as it was added to the .MXD)

Steps:

Open .MXD
Add Base-layer from ESRI Online database (Aerial Imagery WGS84)
Add Data in the form of .csv; this is the field gathered location of interest in NAD27 Decimal Degrees
Export xy data to shapefile keeping it in NAD27
add exported data to map and remove .csv event
Analysis Tools -> Buffer
Buffer location .shp
Measure distance from point to buffer boundary = inaccurate

This happens because the buffer is in NAD27 as it is applied to the point. the basemap layer is in WGS Web Mercator Auxiliary Sphere and the measure distance tool is measuring the distance on the basemap. If I change the map properties to display in NAD27 I encounter distortion in the effect of oblation of my once round buffers. I also encounter a "stretched" appearance to the basemap and the shapefiles (excluding points of course). This does however plot the buffer boundaries in the correct location with correct distances (verified with on-the-ground references in the basemap) - but they are ovals.

Is there a way to preserve the roundness of my buffers yet still have them displayed accurately without changing the basemap projection (and distorting the image)


texts: NDVI time series based on UI selected features

texts:
I am trying to create drop downs that will select features from a feature collection, and have each newly selected feature drawn on the map.  I want to have three selectable variables then calculate NDVI for the intersection of the three features.  Server side I have managed to filter the feature collections and create a time series of one of the features as seen here:

https://code.earthengine.google.com/1fa976fa661c75326b0b15f66c82ebf4

But I cannot figure out how to create a user environment to select and redraw the selected features.  Here, the feature collection layer will disappear when the user selects from the drop down menu, but the feature is not redrawn on the map.

https://code.earthengine.google.com/47c02f60c6ae475e1ba01c0819d57c9f

I would like to calculate a new time series each time the user selects a new set of features based on Forest, county, and municipality.


texts: Using QGIS 2.x processing model in QGIS 3.0?

texts: Is it somehow possible to convert a QGIS 2.x processing model (*.model) to a *.model3 so i can run them in QGIS 3.0 without having to redo mine from scratch?


texts: Training samples without ground truth data?

texts:
Does anybody have any idea how I could go about verifying my training classes properly in ArcGIS 10.3, WITHOUT ground-data. I am constructing a land cover map for 2011 in Cumbria and so far I have verified very little of the samples I have created.

Any ideas on other sources or methods, other than going out and collecting field dat a myself right now?

I am using a supervised classificaiton approach with land sat 7 imagery.


texts: Setting CRS for projects and layers results in looping dialogue

texts:
After a previous issue, I uninstalled (sudo apt remove qgis) and reinstalled (sudo apt install qgis) qgis 3.12. When I open a new project I run into CRS issues when trying to add a vector. The vector's associated *.prj file has code that indicates the CRS should be 4269/NAD83. When I load the vector (*.shp) into the project, it has an "unknown projection". Any attempts to set the CRS either through the button in the bottom left, or through the layer properties fail.

If I go into the settings and try to check the Prompt for CRS, adding layers then opens the dialogue box for selecting a CRS, but selecting any CRS closes the dialogue momentarily, then the box reopens with no CRS selected. When this happens, I can only exit out of the dialogue by killing QGIS as a whole, usually using xkill.

I am on Linux Mint 19.3, using QGIS 3.12. The file I am trying to use can be found here

Update:

I completely removed qgis from my pc. After apt remove qgis apt purge qgis and apt autoremove qgis. I changed the QGIS source to the ltr (3.10), and reinstalled. The problem has gone away, and I can now set the CRS, and *.shp files import with the correct CRS. This isn't very helpful for future people that have this issue unfortunately.


texts: Adding multiple feature classes from TOC as input by ModelBuilder?

texts:
I am tasked to create a tool using ModelBuilder. The tool requires input of multiple feature classes that are added in the Table of Contents of ArcMap.

The user will then be able to select multiple feature classes from the drop down list (all feature classes available in the TOC should be listed) from on the tool interface.

Which tool or tools should I use?


texts: Populate cross street name at intersections

texts:
Just a follow up of an older post seen here:

Python script/Model to populate cross street names at intersections

I need to create a shapefile of Road segments with a "To_Road/s" and "From_Road/s" as tables in the attributes.

In essence I want to create a shapefile with JP van niekerk street segment name between Piet retief street and Sarel Cilliers street. all in their own field.

I used the Planarize tool to separate the roads into segments. I know it has something to do with spatial join and the FID but I can not figure this one out.

I am not proficient enough in ModelBuilder to build the model in the link.


texts: Using temporary output in a Raster Calculator algorithm

texts:
I'm doing some DTM processing, the first couple of stages are a slope calculation and then a Raster calculator process using QGIS's native raster calculator. I want to use the output layer from my slope calculation within the formula. Slope is done as follows, and works fine:

    Slope = processing.run("native:slope", {
    'INPUT':set_NoData_toNull['OUTPUT'], #There is a step before, Nullifying <0 values
    'Z_FACTOR':1,
    'OUTPUT': 'TEMPORARY_OUTPUT' })

The calculator is to then remove any Raster values lower than a 45 degree slope, this formula works when using on a named Raster layer and replacing the @1 with "layername@1", but to save processing power I dont want to save the output of "Slope" every time i run this script, and instead want to use the 'TEMPORARY_OUTPUT' of "Slope", though after much reading I still can't work out how I should Call this in the Raster Calculator 'EXPRESSION' field.

     calculatedOver45deg = processing.run("qgis:rastercalculator", {
    'EXPRESSION':'((\"@1\">45)*\"@1\") / ((\"@1\">45)*1 + (\"@1\"<=45)*0)',
    'LAYERS': Slope['OUTPUT'],
    'CELLSIZE':None,
    'EXTENT':None,
    'CRS':QgsCoordinateReferenceSystem('EPSG:32633'),
    'OUTPUT': 'TEMPORARY_OUTPUT' })

Does anyone know what 'TEMPORARY_OUTPUT' from slope is named and therefore how it can be used in the expression in replacement of @1.

Thanks


texts:
Why is it that when I transform certain Cassini coordinates to UTM, they give negative UTM coordinates, which should not be the case. Note that the equator passes through this particular area of interest. These are the coordinates Cassini in the order (E,N) The units are in feet.
244000, 2000
248000, 2000
248000, -2000
244000, -2000


texts: Extracting data from satellite tiff file in .nc format?

texts:
I'm working with Landsat-8 satellite images and sometimes I need to open real values (numbers) for example as a simple excel table (or similar).

These my steps for getting TOA reflection in QGIS:

using semi-automatic-classification plugin - I built the reflected bands
create raster
convert it to .nc file

But how can I be sure, that values are really represent data (in .nc file) that I need?


texts:
I'm writing a script that requires the attributes of different layers to work, and I would like to know how to call a layer that is not the currently active one and get its features.

For example, I have three layers, named "Poles", "Lines" and "Loads", and I need to get the all the features of the layers with layer.getFeatures() and save those features in a list for each layer. For only one layer we usually do this:

If my active layer is "Poles", I write:

layer = iface.activeLayer()
poles = layer.getFeatures()

And then I can do anything with "poles", but how can I do this with the other layers that are not active? If I wanted to do the same with the layer "Lines", I would have to activate it "manually" by clicking on it, and repeating that code.

I have tried with this method: Getting layer by name in PyQGIS?

And this one: Getting a layer that is not active with PyQGIS

But I always get this error message, because I'm not activating the layer, only creating a list of layer names.

Traceback (most recent call last):
File "<input>", line 1, in <module>
AttributeError: 'list' object has no attribute 'getFeatures'

How can I activate a layer by its name to get the features in it?


texts: Why is a "geography" type needed at all in PostGIS?

texts:
Let a and b be two points. ST_Distance(a, b) returns their distance.

Instead of having two data types, geometry and geography, that practically overload the meaning of ST_Distance(), we could instead have a single type (a pair of WGS84 co-ordinates) and two functions, ST_CartesianDistance() and ST_DistanceOnSphere(). To me (at this stage of my understanding of GIS) this would make more sense, because if I have a point POINT(23.0 38.0), then that fully defines it; when I want to make an operation on it, I can decide what kind of operation I want. Whether I want a calculation on a sphere or a calculation on a plane, the point is still POINT(23.0 38.0).

Why did the designers of PostGIS (or whichever standard is behind it) choose to do it like they did?
Does Geography's internal storage differ from Geometry's with srid=4326? Why?


texts: QGIS add '.tif' raster layer using pyQGIS,bug QGIS?

texts:
i want to try to add raster layers(.tif) in QGIS using pyqgis first in python console first and after in the new QGIS plugin but i am very confused with that and specific to add tif rasters layers.
i use QGIS 2.6.1 (and i test all in QGIS 2.18.3 but i need 2.6.1 version) and python 2.7.13 in windows 10 or 7.

first i try this code from this post:

from qgis.core import QgsRasterLayer
from PyQt4.QtCore import QFileInfo
def StringToRaster(raster):
    fileInfo = QFileInfo(raster)
    path = fileInfo.filePath()
    baseName = fileInfo.baseName()
    layer = QgsRasterLayer(path, baseName)
    QgsMapLayerRegistry.instance().addMapLayer(layer)
    if layer.isValid() is True:
        print "Layer was loaded successfully!"
    else:
        print "Unable to read basename and file path - Your string is probably invalid"
raster = '/path/to/raster/file.tif'
StringToRaster(raster)

that not working for me with all rasters ".tif,.jpg,.png"

error :

Unable to read basename and file path - Your string is probably invalid

if i try this from official QGIS tutorial post:

fileName = "/path/to/raster/file.tif"
fileInfo = QFileInfo(fileName)
baseName = fileInfo.baseName()
rlayer = QgsRasterLayer(fileName, baseName)
if not rlayer.isValid():
  print "Layer failed to load!"

that working only with ".jpg" and ".png" but not for ".tif" rasters layers

error :

"Layer failed to load!"

and finaly i test this :

iface.addRasterLayer("/path/to/raster/file.tif", "layer name you like")

and i take that error message if i want to add .tif raster(other raster i can add with this method):

Cannot open GDAL dataset
`/path/to/raster/file.tif': does not exist in the file system,
and is not recognised as a supported dataset name.

and finaly i test this code from this post

import osgeo.gdal
from  gdalconst import *
from PyQt4.QtCore import QFileInfo,QSettings
from qgis.core import QgsRasterLayer, QgsCoordinateReferenceSystem

file = QFileDialog.getOpenFileName(self,
    "Open TIF Image", ".", "Tagged image (*.tif)")
fileInfo = QFileInfo(file)
fileName=fileInfo.fileName()
baseName = fileInfo.baseName()

layer = QgsRasterLayer(file, baseName)

error :

no module name  gdalconst

that is the bug or QGIS or i do something wrong ?


texts: Distance to Nearest Hub QGIS not working when 'hub' is a line?

texts:
QGIS 2.18.20 working in CRS: WGS 84/UTM Zone 35S (EPSG:32735 OTF), with shapefiles of map features (roads, river, point water sources) reprojected from WGS84 EPSG:4326.
All shapefiles have been reprojected (in order to be able to work in metres not degrees). Map features originally from GPS source, input to qgis using lat/long coordinates.
I'm trying to run Distance To Nearest Hub analysis for animal sightings (300+ points in one layer) to the various features in my map (see list above). The analysis works well for the point data (e.g. Source= sighting point, Hub= water source point) but not for the line files (road, river, fence).
For the lines, it just seems to choose a central point to that feature and calculate the distance to that one point from the source (sighting) points (see screenshot).
I've tried adding geom info to the line shapefiles but they just add in length and the 'Distance to nearest Hub' analysis ends the same.
Any ideas?


texts: Google Earth Engine Import shape as draggable Layer

texts:
How to import a shape or image into GEE and drag it around like the self-drawn imports?

Edit: the asset is uploaded and also added to the map, but it´s projected according to its coordinates, I want to free it from the coordinates and drag it freely


texts: How to select features intersecting each other and sharing the same attribute values in QGIS?

texts: Is there a way to select all features of a single layer which intersect each other and share the same attribute values?


texts: Cesium OSM buildings floating in the air; could we set a custom ellipsoid, locally more accurate?

texts:
I just discovered the way to include OSM building data in a Cesium project. It sounds great but I also (re)-discovered my local ellipsoid vertical offset with the global WGS84 one (see pictures).

The "flying buildings syndrome" (they are certainly at the ground level referenced on the WGS84, but the local terrain tiles seem not, or I missed something).

We live 'on' the Bessel ellipsoid which is 50m lower than the WGS84.
I may be wrong in my hypothesis, so let me know if it's the case.
Here is my question;
Did I miss something, e.g. to base the terrain tiles on the WGS84 ellipsoid?
If not, is there a way to fix this, for example by setting a different ellipsoid, more accurate locally than the global WGS84?
Or, any mean to bring the building back down to the ground?


texts: Estimate population with two overlapping shapefiles

texts:
I have two levels of geography: blue polygons (18,000 districts) and black polygons (400 districts).
But, I only have population data for the blue areas
Is there a tool in Arc Map which will estimate the population inside the black polygons (using the blue's population data)?


texts:
Lets say I have three shapefiles/features I want to merge: 'florida.shp', 'mississipi.shp' and 'louisiana.shp'. They all have 3 standard fields common to all: 'DFIRMID', 'SFX', and 'FIRMPAN'. I want to do a merge of the three  shapefiles on just those three fields. My output should be a 'gulfstates.shp'. I am a little confused as to how I would use {field_mappings} in merge. Since these are the only fields I want to keep in my merge and since they are common to all three shapefiles, could I literally just use field mapping to remove all other fields? Is there an easier way to do this?

fieldMappings = arcpy.FieldMappings()
fieldMappings.addTable('florida.shp')
fieldMappings.addTable('mississipi.shp')
fieldMappings.addTable('louisiana.shp')
for field in fieldMappings.fields:
    if field.name not in ['DFIRMID', 'SFX','FIRMPAN']:
        fieldMappings.removeFieldMap(fieldMappings.findFieldMapIndex(field.name))


texts: How to group overlapping polygon features to generate unique feature ID?

texts:
I have a group on onshore leases that are overlapping and I want to generate a field attribute so that all the polygons (or centroids of the polygons) that overlap have a unique ID so that I can filter when exported in excel?

Any ideas on how to do this?


texts: Plotting points on a map based on address text string of location

texts:
This may be a naive question, but I'll try anyway.

I am working in QGIS, and I have a shapefile with more than 2000 rows containing information about specific trees in a botanical garden; their location in the garden as well as the age of the tree, and – importantly – where the seed for the tree originated. This last information is however stored as real text ("Honshu, Toyama Prefect, Japan" for instance). I would like to be able to take this entire column of text fields and, through a Google Maps lookup or something like that, convert these in to coordinates, so that I can use this column to plot the origins on a world map.

Does anyone know of a way to accomplish this, the conversion of real text to coordinates?


texts: Clump and eliminate classes in a raster in ArcMap or R

texts:
after interpolation of sediment classes, I obtained a raster which looks like the image below (sample of the river). I would like to clump and eliminate areas within the raster that are below a certain area. I am open to use R or ArcMap 9.3.

In searching I have come across the Shrink and Expand functions in Arc. However, it doesnt work on my dataset. The function provided on this site looks promising, by applying a moving filter window in the raster package in r. However it does so for a continuous variable, and mine is categorical.

Any suggestions would be welcomed, thanks.


texts: PostGIS and QGIS connection using queries?

texts:
I have a shapefile and a table which I import both of them to PostGIS. With pgAdminII I am able to manipulate the table, join to shapefile and calculate new fields. When I try to do that with python inside QGIS I get no success.

Example:

 uri = QgsDataSourceURI()
 uri.setConnection("localhost", "****", "****", "postgres", "postgres")
 uri.setDataSource("public", "shp_name","geom", '',"gid")

 db = QSqlDatabase.addDatabase("QPSQL");
 db.setDatabaseName(uri.database())
 db.setPort(int(uri.port()))
 db.setUserName(uri.username())
 db.setPassword(uri.password())
 db.open()

query = db.exec_("""SELECT* INTO new_table FROM shp_name INNER JOIN table ON shp_name.code = table.code""")
query.next()

For example is I want to calculate the average of a column, I do that in pgAdminIII and it works but when I use it in python for QGIS it does nothing:

query1 = db.exec_("""SELECT avg(totdias) FROM sample_reside_join""")
query1.next()

I do that and it is not working. What I am doing wrong?
My objective is to perform some operations with tables and in final join to initial shapefile and open in QGIS, but I am not getting success.


texts: How do I create a spatial filter on a layer?

texts: I have a layer that draws points in a PostgreSQL (PostGIS) database. The problem is, all  points in the table are being drawn. I want to limit the points drawn to a spatial query. How do I limit the points being drawn on the layer to the results of a spatial query? Where do I specify the spatial query?


texts: Google Earth Engine; rename columns in FeatureCollection

texts:
I have a Feature Collection I'm exporting as a csv. I used the reduceRegions function to get mean values of several different variables per region, and merged these into one large FeatureCollection. I simply want to chnage the column/property name for one of these. I found you could use the select function, but I have to rename one but still all the columns in as otherwise the selec function removes them from the FeatureCollection.
//var Dat = Dat.select(['mean', 'id'], ['SE_score', 'id']);

However, I'm getting this error
FeatureCollection (Error)
Error in map(ID=7_PB_IleDiamant_Lagoon): Feature.select: Selected a different number of properties (1) than names (2).

I think this is because I don't actually have data for some of these variables, they're just blank, which is fine for my export, but it means it's not allowing me to change the property name from 'mean' to 'SE_score'.
Are there other methods for changing column/property names you're aware of?


texts: qgis projections from Michigan's CGI data

texts:
Possible Duplicate:
  How to reproject from Michigan Georef to WGS84 in QGIS?

I'm importing shapefiles into QGIS.  These files were created by the state of Michigan, primarily to be used in ArcGIS.  However, when opened in QGIS, the data is projected into the middle of the ocean or on some weird spot on Earth. I've changed the projection running in QGIS to the state plane system, to UTM zone 16, on the layer file, on the project, and even downloaded other counties for state and nothing seems to work.  What am I doing wrong?


texts: Why are these leaflet popup values comeing back undefined?

texts:
I have a leaflet map consuming a dynamic map layer on ArcGIS server. The service is viewable on the map and exposes the following attributes:

Fields:
OBJECTID ( type: esriFieldTypeOID , alias: objectid )
cableid ( type: esriFieldTypeInteger , alias: Cable ID )
spanid ( type: esriFieldTypeInteger , alias: Span ID )
spantypeid ( type: esriFieldTypeInteger , alias: Span Type , Coded Values: [1: 36F] , [2: 6F] , [3: 12F] , ...14 more... )
placement ( type: esriFieldTypeString , alias: Placement , length: 50 , Coded Values: [aerial: aerial] , [buried: buried] , [transition: transition] , ...2 more... )
comments ( type: esriFieldTypeString , alias: Comments , length: 250 )
SHAPE_Length ( type: esriFieldTypeDouble , alias: Length (Ft.) )
MI_Style ( type: esriFieldTypeString , alias: MI_Style , length: 254 )

When I use the bindPopup() method, the popup works but all the values returned are undefined. I'm not sure why this is the case?

    Cable.bindPopup(function(error, featureCollection){
      if (error || featureCollection.features.length === 0){
        return false;
      }
      else {
        return "Span ID: "+featureCollection.features[0].properties.spanid+"
Span Type: "+featureCollection.features[0].properties.spantypeid+"
Placement: "+featureCollection.features[0].properties.placement+"
 Comments: "+featureCollection.features[0].properties.comments+"
 Length (Ft.): "+featureCollection.features[0].properties.SHAPE_Length;
      }
      });


texts: Is there any way to write a snipet of code with function of "SDELayer -o register" command

texts:
I try to create a geodatabase using some SQL command and then register some tables of it with SDE.

I create an empty geodatabase using sde post installation and then create tables and other database objects in a program written by VC# using command like "Create Table" and other DDL scripts.

but after creating database successfully user of this VC# program has to enter  "Command prompt" and type sdelayer command to register tables one by one.

I need to make all the process seamless for user and user must not see any change in working environment.Now my question,is there any way that I register tables of my geodatabse with SDE by VC# code programming instead of using "sdelayer"
command in command prompt?(Any object model?)

Regards


texts: ArcGIS field calculator pythons script value transfer between columns

texts:
In the picture below I can transfer values from one field(FID) to another(Id) using ArcGIS. The issue is that I will end up with some duplicated values in field "Id" (example number 12 and 17).

My question is how to add to the script a function that removes or prevent duplicateted values? (elif?)

Script so far is:

def reclass(a,y ):
    if a == 0:
       a = y
    else:
       pass
    return a

IDV2 = reclass( !Id!, !FID! )


texts: Delineating watershed using ArcGIS Spatial Analyst

texts:
I'd like to delineate the catchments upstream of the sampling points.

In order to do that, I have done the following:

Burn the rivers into the DEM using ArcHydro>DEM Manipulation>DEM reconditioning;
Flow direction;
Flow accumulation;
Snap pour points (my sampling sites); and
Watershed (Spatial Analyst>Hydrology)

However, the catchments I have got, don't match the reality.

Could you please check the data through this link?


texts:
I have this SQL request

select name from osm_places where
name in (select capital_city from osm_places where capital_city != '')

Is it possible to write such a request in < ogc:Filter> section?

I try this

<ogc:Filter>
  <ogc:PropertyIsEqualTo>
    <ogc:Function name="in">
      <ogc:PropertyName>name</ogc:PropertyName>
      <ogc:PropertyName>capital_city</ogc:PropertyName>
    </ogc:Function>
    <ogc:Literal>true</ogc:Literal>
  </ogc:PropertyIsEqualTo>
</ogc:Filter>

But GeoServer generates this SQL query

select name from osm_places where
    name in capital_city


texts: Unable to Load GloVIS using Java 8 due to Security Requirement (Windows 8, Java 8 v.40)

texts:
After migrating to a new PC running Windows 8.1 (64-bit), and updating to the most recent Java 8 version (update 40), I am unable to load the GloVis website (http://glovis.usgs.gov/); every time it reports a security error and says may not load due to the risk the plug-in poses.

I have tried, not in this exact order:

Updating Java
Changing security settings from 'Medium-High' to 'Medium'
Restarting computer / browser / site
Installing 32- and 64-bit versions of Java
Adding the website to site exception list

The GloVis instructions just say upgrade to the most recent Java version, which I have already done. When I access on another, older computer everything seems to run just fine.

Has anyone had this experience and been able to access GloVis using Java 8?


texts: Using QGIS Temporal Controller with Mapserver WMS-T

texts:
I have defined a WMS-T (WMS + Time) service of GeoTiff files that is working with TimeManager (QGIS 3.4).
The same WMS-T service doesn't work with TemporalController (QGIS 3.16).
TemporalController doesn't through any error but doesn't show any image.
Testing WMS-T service with GetMap request in web browser with different values of TIME parameter return correct images, so the WMS-T service is working fine.
With TimeManager (QGIS 3.4) I set datetime format to %Y but with TemporalController (QGIS 3.16) I cannot find this option. I have trying different datetime formats like this 'yyyy-mm-dd hh:mm:ss' but TemporalController doesn't work.
What I'm missing here? Any example would be appreciated.
To be more precise, I have this code in mapserver configuration file (.map):
LAYER
        NAME "temporal_serie_raster"
        TYPE RASTER
        STATUS ON

        METADATA
            "wms_title"             "metadata_layer_title"
            "wms_abstract"          "metadata_layer_abstract"
            "ows_extent"            "metadata_layer_extent"
            "ows_srs"               "metadata_layer_srslist"
            "ows_keywordlist"       "metadata_layer_keywordlist"

            "wms_timeextent"    "2017/2020"
            "wms_timeitem"      "time"
            "wms_timeformat"    "YYYY"
        END # Metadata

        TILEINDEX "tileindex.shp"
        TILEITEM "location"
    END # Layer

And 'tileindex.shp' has this content:

This is only a sample code that works with TimeManager, but it doesn't works with TemporalControler. Is it possible to use this 'wms_timeformat' with TemporalControler?


texts: Error message 'Module qgis.v.kernel.rast.py not found'

texts:
How do I repair this error in QGIS:

The error message was received whilst trying to run v.kernel from the modules list.  I can however run v.kernel from the GRASS shell.

A while ago, I installed a new plugin which apparently moved or deleted a whole lot of files.  The result was that I couldn't use NVIZ.  Uninstalling and re-installing QGIS didn't help so I finally resorted to manually locating the files and replacing them.  Not sure where to find this file however.  Is there anyone who can assist me how to repair this?


texts: Reading endmember from each scene in image collection of Google Earth Engine?

texts:
I am trying to do spectral unmixing over a Landsat 8 image collection. I want to take endmember values from a particular location in each scene, but I keep getting this error (I have already followed the debugging guide for this error)

 List (Error)
 Failed to decode JSON.
 Error: Field 'value' of object '{"type":"ArgumentRef","value":null}' is
 missing or null.
 Object: {"type":"ArgumentRef","value":null}.

When I use the inspector to click on the polygons I am using to define my endmembers, there are just zero values (which explains the error message).
The exact same code works when I'm running the code over a single image rather than an image collection.

Here is what I'm working with: SEE CODE HERE https://code.earthengine.google.com/d82288e11c364b3037fdbca5e185c116

I load my landsat collection with a cloud filter, then run this code:

 var sma_unmixL8 = (function(image) {
   var s_image= image.select("B2","B3","B4","B5","B6", "B7");

   //endmembers collected from each image scene.

   var veg = s_image.reduceRegion({reducer: ee.Reducer.mean(),
   geometry:veg_em, scale: 30, maxPixels: 1e8});
   var vegvalues = veg.values();
   print (vegvalues, 'vegvalues')

   var water= s_image.reduceRegion({reducer: ee.Reducer.mean(),
   geometry:water_em, scale: 30, maxPixels: 1e8});
   var watervalues = water.values();
   print(watervalues, 'watervalues')

   var soil= s_image.reduceRegion({reducer: ee.Reducer.mean(),
   geometry:soil_em, scale: 30, maxPixels: 1e8});
   var soilvalues = soil.values();
   print(soilvalues, 'soilvalues')

   //constrained to one no neg code
  var unmixed_a = s_image.unmix([watervalues, vegvalues, soilvalues],true,true);
  var unmixed =  unmixed_a.multiply(900);

   return unmixed;
   });

The error appears for each endmember when I try to print.
When I run the entire code with a single set of endmember values gathered from a single scene, it runs OK.

Any ideas?


texts: gdal : How to restore georeferenced DEM's metadata?

texts:
EDIT: this question was not properly answered. An actionable answer should be provided. Maybe involving gdaledit -mo or gdal_translate in.tif in.vrt together with xml manipulations, or any operation which would eventually output a raster GIS with full restored metadata.

I) Given a DEM file which $gdalinfo returns:
+ gdalinfo crop.origin.tif
Driver: GTiff/GeoTIFF
Files: crop.origin.tif
Size is 1920, 1950
Coordinate System is `'
Origin = (66.991666666666674,37.508333333333354)
Pixel Size = (0.016666666666667,-0.016666666666667)
Metadata:
  NC_GLOBAL#Conventions=COARDS/CF-1.0
  NC_GLOBAL#GMT_version=4.4.0
  NC_GLOBAL#history=grdreformat ETOPO1_Ice_g_gdal.grd ETOPO1_Ice_g_gmt4.grd=ni
  NC_GLOBAL#node_offset=0
  NC_GLOBAL#title=ETOPO1_Ice_g_gmt4.grd
  x#actual_range=-180, 180
  x#long_name=Longitude
  x#units=degrees
  y#actual_range=-90, 90
  y#long_name=Latitude
  y#units=degrees
  z#_FillValue=-2147483648
  z#actual_range=-10898, 8271
  z#long_name=z
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  66.9916667,  37.5083333)
Lower Left  (  66.9916667,   5.0083333)
Upper Right (  98.9916667,  37.5083333)
Lower Right (  98.9916667,   5.0083333)
Center      (  82.9916667,  21.2583333)
Band 1 Block=1920x2 Type=Int16, ColorInterp=Gray
  NoData Value=-2147483648
  Metadata:
    NETCDF_VARNAME=z

II) I then process this raster tif via ImageMagick, here, for a resizing (but it could be any GIS metadata destroying operation) :
convert crop.origin.tif     -resize $(WIDTH) crop.small.tif

The file has lost its GIS metadata !
III) So, I reinject georeferencing & altitudes :
gdal_translate -a_ullr 44 44 33 33 crop.small.tif crop.tif
gdalinfo -mm crop.tif

But when doing again gdalinfo, the result is really limite :
$gdalinfo crop.tif

result:
Driver: GTiff/GeoTIFF
Files: crop.tif
Size is 1280, 1300
Coordinate System is `'
Origin = (67.000000000000000,37.500000000000000)
Pixel Size = (0.025000000000000,-0.025000000000000)
Metadata:
  TIFFTAG_DOCUMENTNAME=crop.small.tif
  TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch)
  TIFFTAG_XRESOLUTION=72
  TIFFTAG_YRESOLUTION=72
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  67.0000000,  37.5000000)
Lower Left  (  67.0000000,   5.0000000)
Upper Right (  99.0000000,  37.5000000)
Lower Right (  99.0000000,   5.0000000)
Center      (  83.0000000,  21.2500000)
Band 1 Block=1280x3 Type=UInt16, ColorInterp=Gray

There are important metadata lost. Most of them could be recalculated, but were not.

QUESTION : how to restore full metadata into an processed raster file which lost its metadata ?


texts: calculating coordinates from a gnomonic projection

texts:
I have a collection of images from a rain radar which show intensity. I have loaded the images and create a matrix of pixel colours.

What I need to do next is generate a set of coordinates for each pixel of the image. I have been given the following information about the projection:

02 Melbourne (512 km)
projection = Gnomonic
center_longitude =     144.75200
center_latitude  =     -37.85200
lon0 =     138.56821
lat0 =     -42.27182
lon1 =     139.29153
lat1 =     -33.11378
lon2 =     150.25096
lat2 =     -33.11209
lon3 =     150.97934
lat3 =     -42.26946

My problem really comes down to my lack of understanding of the Gnomonic project, from what I understand it's not as simple as pick the correct coordinate system from QGIS, and the projection is conditional to the center coordinates.

I would really like some tips to send me in the right direction, I am open to using a python package or using QGIS or a combination of the two.


texts:
We know that fields related to "Geotransformation" and "projection" are empty when one tries to access these information using gdal on Sentinel-1 (at least the GRD products).

I normaly use:

gdal.Info('file_name',option='-mm -stats -nogcp')

to have some useful information about the tile that I am working on. Among other things the information of the "pixel size" is being returned.

Is there any way to access this "pixel size" information (not simply printing by gdal.Info()) somehow with gdal and not needing to directly open the respective .xml file and read it from the corresponding tree?


texts: Does anyone know if this is a bug? It's been happening to me very often lately. I finish I map and export it and it's all good. Save the map and then when I open it again a few days later to make a change or whatever the print composer is empty as if I had never produced the map.


texts: Is there way to define processing extent in QGIS?

texts: Is it possible to define the extent of a processing tool, like it is in the "Environments" in ArcGIS? For example "Same as Display, or "Same as Layer..".


texts: Render single band gray raster define gradient and cumulative cut

texts:
I want to save an image with these characteristics:

gradient: white to black
std deviation = 5

Until now I get to apply the gradient but the minimum and maximum values are used instead of cumulative cut of 2% to 98%.

My code is this:

fileInfo_slope = QFileInfo(slope)
layerName_slope = fileInfo_slope.baseName()
slope_ = QgsRasterLayer(slope, layerName_slope)

provider = slope_.dataProvider()
Renderer = QgsSingleBandGrayRenderer(provider,1)
band = Renderer.grayBand()

layerType = slope_.type()
rasterType = slope_.rasterType()
renderType = slope_.renderer()
myType = renderType.dataType(band)

myMin,myMax = provider.cumulativeCut( band, 0.02, 0.98)
myEnhancement = QgsContrastEnhancement(myType)
myEnhancement.setMinimumValue( myMin )
myEnhancement.setMaximumValue( myMax )
renderType.setContrastEnhancement(myEnhancement)
Renderer.setGradient(1)
slope_.setRenderer(Renderer)
if hasattr(slope_, "setCacheImage"):
    slope_.setCacheImage(None)
slope_.triggerRepaint()

But when the map (slope) is created I don't want the minimum/maximum values but the cumulative cut. In this example I try to modify the cumulative values but I get no success. Can you help me?


texts: Creating polygons for points with different radius in QGISmed

texts:
I have a question regarding creating polygons based on point data with different radius.

First, I have a csv table including 215 different points including the lat/lon information. Moreover, I have a given radius (in km) for each point.

What I have found so far is the possibility to create buffers (geoprocessing tools>buffer(s) for point data. I know that this allows me to draw buffers around the points using a radius. My idea is to therefore select all points with the same radius and create a buffer around them.

I was wondering, however, if there is a better way to create the polygons not needing to do it manually regarding the different radius?

Moreover, I have been reading up regarding the problem that my radius is in km. As I understand the buffer tool uses layer units, which for WGS84 are decimal degrees. One possible solution I have found, is to set the project to a relevant UTM zone. I was wondering, therefore, if someone could tell me if there exists a more precise method than using the WGS 84 / UTM zone 35S since my data is spread around whole Africa.

Edit: I realised that I can use the "buffer distance field" to select the different values of the radius. However, the buffer function doesn't seem to work. Since these are some of my points:

And this is the result (see the scale):

I tried to relode the data several time as well as restarting my program. Could someone please explain to me what I did wrong?

Edit: I have tried what was recommended in several other questions asked in the forum - including:

Save the shapefile to WG84/World Mercator (since Africa is in the
middle) which is in meters
Change the entire project to the same CRS (WG84/World Mercator)
Change the CRS with the help of ftools
Used the MMQGIS (Create Buffers tool) to create the buffers

I still get the result as in my second picture. It would be great if you could give me some input.


texts:
My imported shapefiles (shp2pgsl) have the geometry type "MultiPolygonZM".

geom geometry(MultiPolygonZM),

What is this type of multi polygon? I can't find any useful information.


texts: ActiveX Error with ArcToolbox Tools in Windows 10 Pro and ArcGIS 10.5.1

texts:
The question of how to get rid of the ActiveX warning on every toolbox tool has been the subject of:

ActiveX control in conflict with ArcToolbox?
Why do ArcToolbox tools give ActiveX error?
Windows security warning (ActiveX) when clicking into fields in ArcToolbox tool?

and an ArcGIS Idea over the years, but the solutions do not seem to transfer well to newer versions of ArcMap and Windows, specifically in my case Windows 10 Pro.

Pursuant to all of these answers, I've set registry keys 1200, 1201, 1400, and 1406 to 0 in every Zone (and rebooted) with no success.  But -- for example -- Windows 10 Pro has no HKEY_CURRENT_USER in the registry; I'm just guessing that HKEY_LOCAL_MACHINE is where the work should be done.  And who knows what other harm I've caused by doing so, since I've been following the procedure on the level of superstitious ritual, without any understanding of what I'm changing.

Can anyone update the advice?


texts:
I have a PostGis table I have generated by importing an existing geojson file using ogr2ogr. When I add this table as a layer in QGIS, the layer shows up as having no geometry. In the layer properties I get:

Geometry type of the features in this layer
No geometry (WKB type: "NoGeometry")

The table has geometry data in the wkb_geometry column with binary data, and if I export the table using ogr2ogr I get the correct geojson object reconstructed.
What am I missing here?


texts: How to hide feature layer outside of boundary feature layer using ArcGIS JavaScript API?

texts:
I am developing JavaScript application. I have two feature layers one for features with point symbol and one for boundary with line symbol. I have added these two layers on map like below image.

I select one boundary and I want to see the point features which are inside the selected boundary and hide or remove the outside point features. I am able to query the features for selected boundary but unable to remove or hide the features that are outside the boundary.
Is there any solution to do this? (Like in graphicsLayer there is option for remove and add graphics)


texts:
From the Leaflet.js documentation it states that it uses a default CRS of 3857.

This implies that if I am going to generate points with PostGIS based on polygons, or points created by drawing or dropping on Leaflet.js canvas, I would need to use the following SQL:

SELECT ST_SetSRID(ST_MakePoint(lng, lat),3857)


texts:
I tried create map with single image used OL.
But I have a trouble: image in map has a wrong proportions.

Img: 1540 x 1481

Img in map: 2858 x1481

My js code:

$(function (){
    var map = new OpenLayers.Map('map', {
        restrictedExtent : new OpenLayers.Bounds(0, 0, 770, 399),
    });

    var graphic = new OpenLayers.Layer.Image(
        'Map',
        'https://photos-6.dropbox.com/t/0/AAAV8wq9f9veyq0ffFO_8q-U7RI3trvDjaRNp3TFHf6ROg/12/7556067/png/2048x1536/3/1364878800/0/2/map.png/1Rw0Hlsla1l7-28tvi518yhNaoNNBBvNPop_WiSCOJI',
        new OpenLayers.Bounds(0, 0, 770, 399),
        new OpenLayers.Size(1540, 1481),
        {
            numZoomLevels: 2,
        }
    );

    map.addLayers([graphic]);

    map.setCenter(new OpenLayers.LonLat(lon=0,lat=0),0);
})

http://jsfiddle.net/grabus/wpDSU/

What I did wrong? Why img in map has wrong proportions?
Tnx!


texts: 3D globe from GIS data (QGIS shapefiles or PostGIS)

texts:
I'm looking to create an interactive 3D globe (in Unity 3D in case it matters) that gets its data from a GIS backend. I'm using QGIS as my editor and I can store the data in shapefiles or PostGIS. All my data is vector data, I do not use raster data.

Unlike similar questions, I am not projecting the real world, but an artificial world, so the amount of detail is much lower, and loading the entire dataset into memory, or significant chunks of it, just might be possible.

The same would apply if I'm talking about the real world but I need data visualisation only.

I've found a number of solutions to show a 3D globe (e.g. ol3) or to load GIS data into Unity or convert to 3D models statically (and usually as heightmaps, not as a 3D globe).

I seem to be missing a way to translate GIS data on-the-fly into 3D data, which should be a simple coordinate transformation. PostGIS does not seem to provide an appropriate function.

Some of my data has a height, if that can be converted properly it would also be great.


texts:
Being an SQL-noob, I found a working solution to generate a virtual layer with counts of points in the polygons of another layer, inspired by this
https://gis.stackexchange.com/a/54680

SELECT polygons.fid,polygons.geometry, count(points.geometry) AS counts
FROM polygons
LEFT JOIN points
ON st_contains(polygons.geometry,points.geometry )
GROUP BY polygons.fid;

This returns a new polygon layer with the fid and the count of points.

But the end result I would like to achieve is, to only count a subset of points, represented by

points.controlled IS NULL

I can't find out where and how to inject this criteria into the query. All trial-and-error only led to the latter.

There is already a similar question, but the answer misses the subset part completely
Counting points in a polygon for a subset of my points layer?


texts: Georeferencing LAS files in geographic coordinates (lat/lon) or in cartesian (projected) ones?

texts:
First of all, I am a newbie in GIS.

I have a lidar point cloud with GPS and telemetry data associated. Then, I transform coordinates of every point to an ECEF coordinate system and finally I transform the angular coordinates to a cartesian coordinate system, using the Local Tangent Plane (LTP) approximation. (This approximation uses the gps coordinates of first point as a reference system origin and then, reference the rest of points in respect with the first).

I am writing the LAS file using liblas, and I don't really know how to set the georeference information to the LAS file. I am writing the coordinates of every point in the LTP approximation so I have 2 questions:

Is it correct to write the points coordinates in respect to the LTP approximation or should I write coordinates in lat/lon (gps) units?. If this is correct, how can I set the georeferencing respect the LTP?.
If '1' is not correct and I must write the coordinates in lat/lon units, how can I set the georeferencing? Is writing an VLR with WGS84 value enough?


texts: How to change the vertex style for editing?

texts:
When I use drag feature, then the circles on the polygon edge has the same style.
For example, this OpenLayers site.

I need to change it, I mean they need to be a different color.

What is their (cycles) style attribute?


texts: How much W shape effects on the cross correlation of points in R

texts:
I am analyzing cross-correlation between these two-point data sets (all the analyses have been performed in R: by using Kcross, Lcross functions).

In the first trial, I was using an irregular observation window (W) considering the coast and regional boundary (the grey area in the picture). And I obtained:

In the second case I used the regular observation window (W): a rectangle with the limits of the datasets, and I obtained:

My question is: How come that I obtained opposite results in the first case we have only repulsion, between 0 and 2000m distance there is a correlation but with an intensity lover than confidential level, and in the second case the correlation between two data points is present on all distances.
The only thing that I changed is was a window everything else was the same...


texts:
I have a geotiff file with 3 bands which contains DN values (0-255) each. Is there a standard formula or way to convert this into a single band true value for example temperature?
Maybe if I have a scale from RGB(0,0,0)-RGB(255,255,255) with temp value lowest at 0 and highest 30? How to convert the RGB to that scale value?


texts: No module named pyspatialite- plugin:Qspatialite, OpenSUSE 13.1

texts:
I cannot run the plugin because of module missing.

I can't find that module in the OpenSuse repository, and python community repository.

I'm using QGIS 2,0 and OpenSuse 13,1

Where can I find module pyspatialite with dependencies, because I've found that module at:
packages.altlinux.org/en/Sisyphus/srpms/python-module-pyspatialite/get

but if I try install it I get:

nothing provides python-modules needed by python-module-pyspatialite-3.0.1-alt1.i586.

Module psycopg is installed in system - with no effect.

Thanks for answer, Tom


texts: How to determine the right time of Landsat 8?

texts:
Sorry, please help me clarify this issue.

Assume that I have information from a Landsat 8 image with the time shown as below:

Start time: 2018:288:03:13:25.1532590
Stop time: 2018:288:03:13:56.9232570

Does it mean the image was at 3:13m:25s UTC?


texts: QGIS and Oracle Spatial database - rule based system in future version?

texts:
I (a geographer not to familiar with IT stuff) want to start a pilot with QGIS at a municipality I work for. We store our data in Oracle databases. When trying to open these databases (QGIS 2.2) using 'adding oracle spatial layer', the error massage gives information which should be undisclosed, such as passwords. Also, I'm able to view databases I shouldn't have access too. Therefore, the safety of the database is not guaranteed and we cannot test this software.

Does anyone know if QGIS will work on future releases where rule based system (as in different levels of access and control)  for Oracle spatial  will be possible?

This will give me the opportunity to use it at our municipality.


texts: Creating Domains and Coded Values using ArcPy?

texts:
The Coded Values are not being displayed within numeric order.

Final results look like: [10][13][12][27C][21][22][27A][33][31][30][27B]..
How would we display Coded Values in numerical 0-36?

# Name: NEO Gas Systems.py
# Description: Create an attribute domain
# Author: jordan N. Miller
# Date: 02/17/2017

#Import system modules
import arcpy

try:
# Set the workspace (to avoid having to type in the full path to the data        every time)
arcpy.env.workspace = "C:/eis"

# Set local parameters
domName = "Gas Systems"
gdb = "UPDM.gdb"

# Process: Create the coded value domain
arcpy.CreateDomain_management("UPDM.gdb", domName, "Gas Systems", "TEXT", "CODED")

# Store all the domain values in a dictionary with the domain code as the  "key" and the
# domain description as the "value" (domDict[code])
domDict = {"9":"New Bedford", \
"10": "West Wooster",
"12": "Summitville Tile",
"13": "West Warren",
"21": "Winesburg",
"22": "Bowerston",
"27": "NEO/TCO/Timken",
"27A": "Timken Header Line",
"27B": "Timken Industrial Gases",
"27C": "Timken Houseline",
"30": "North Mount Hope",
"31": "Gross Lumber",
"33": "Nova Tech",
"34": "North Lawrence",
"35": "Anchor Hocking Plant #1",
"36": "Anchor Hocking Plant #2"}

# Process: Add valid material types to the domain
# use a for loop to cycle through all the domain codes in the dictionary
for code in domDict:
    arcpy.AddCodedValueToDomain_management(gdb, domName, code, domDict[code])

except Exception as err:
print(err.args[0])


texts: Cannot put a layer name as the same as the raster name just created by Python script

texts:
I have a question regarding Python script for making a Heat Map Tool.

I  am making a Heat Map Tool where users can set the map extent, the tool will read the current scale of the map, then make a raster heat map layer using appropriate cell size and search radius depend on the map scale, and the new raster layer will appear on the TOC of the map document. I succeeded this part.
But I also put a function that users can set the raster name, and the name will appear as a layer name too.

The script is the below.

# Script arguments
heatMapTest2 = Output_Raster_Layer
heatMapTest2Name = 'Output Raster'
templist = heatMapTest2.split("\\")
layername = templist[-1]
MXD = arcpy.mapping.MapDocument("CURRENT")
dataFrame = arcpy.mapping.ListDataFrames(MXD)[0]
mapExtent = dataFrame.extent
scale = dataFrame.scale
Input_Layer_2 = Input_Layer

#Add new layer to the dataframe
result = arcpy.MakeRasterLayer_management(heatMapTest2, layername)
lyrLayer = result.getOutput(0)
arcpy.mapping.AddLayer(dataFrame, lyrLayer, "AUTO_ARRANGE")

This function does work if I use the ArcGIS from the remote, and the work environment is the same server as the remote.
But I set the work environment in different server, it gives me an error message as the below.

Traceback (most recent call last):
  File "Q:\GIS_Tools\HeatMapTool\Python\HeatMapTool_Incidents_Add_Reclass_para5_short.py", line 149, in <module>
    result = arcpy.MakeRasterLayer_management(heatMapTest2, layername)
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 6479, in MakeRasterLayer
    raise e
ExecuteError: ERROR 000582: Error occurred during execution.
Failed to execute (HeatMapAllWithOutputLayerPara).

Is there anybody who can tell why that happened?


texts:
I've been working on deriving bearings and distances from lines in qgis 2.18 from a number of coordinates stored as a csv file. I have been able to generate the bearing of the lines using this expression in the field calculator:

CONCAT(format_number(degrees(azimuth(start_point($geometry), end_point($geometry))), 2), '°')

But this expression does not allow the bearing to be added in the attribute table (or i simply dont know how to do that). Can anyone help?


texts: Access Metadata from ArcSDE-tables using python

texts:
Is it possible to access the metadata of a feature class in a ArcSDE-data, using arcpy / python (on Arcgis 10.0).

I suppose I could export the metadata to xml and parse the xml, but is there a more direct approach?
I need to  make a summary table of all the data in our database, with several elements from the metadata (author, last update etc. ). We always enter metadata for each new dataset in our DB.


texts: Extract coordinates of lower right corners of polygon

texts:
Using QGIS 2.18.14, I would like to know the node number at lower-right corner of each polygon, shown as red circle in a image below.

My goal is to obtain xy coordinates, by giving such number n to x( point_n ($geometry, n)) or y_at(n).

Tricky one is the polygon "C" for which I want to avoid orange circle, if it is at all possible. Tested functions such as x_max y_max but I can not figure out how to define the LR corner.

Edit The look of my polygons is relatively simple with distinctive corners (if my subjective description is allowed... it is just like the posted picture). They do not have multipart features.

Edit2 I did not notice but due to the change of the title the approach I was thinking is no more valid. (Struk out accordingly).


texts:
Is there a way using the Earth Engine Python APIs to run every ten days (I'll use chron for scheduling) the following Earth Engine script:

Export.image.toDrive({
  image: anomaly10D.first(),
  description: 'anomaly10D',
  scale: 5000,
  region: ROI
});

Where anomaly10D is an image collection coming from processed CHIRPS data and ROI is the Region of Interest (a small country)

To automatically save an EEAsset in a specific folder, with a specific filename and keeping it status to "Anyone can read"?

The task should run automatically without any manual confirmation like in the code editor.

UPDATE 1

Looking at the API source code I've found the current code more relevant to the task:

import ee

ee.Initialize()
exportRegion = ee.Geometry.Polygon([...cords of the country...])
task = ee.batch.Export.image.toAsset(
                                     image=anomaly10d.first(),
                                     region= exportRegion.bounds().getInfo()['coordinates'],
                                     description='anomaly10d',
                                     scale=5000,
                                     crs=myCRS)
task.start()

region is defined differently as in javascript APIs, and we can't pass the geometry object.
scale can be omitted so it will use the spatial resolution of the source

As noted by Jon, the task will run without asking confirmation.

But there are still a lot of doubts that I'm not able to solve to perform the operation:

How can I manage automatically the authentication with a google account in Python (no user interaction, as the code run on a server)?
How can I set the ACL for the asset to "Anyone can read"?


texts: Problem with pie-charts when exporting them to an image file

texts:
I have 3 vector layers: a map of Europe and N.Africa, a line layer, and a point layer (on the top). I have created pie-charts over the points in QGIS 1.7.3, and on QGIS itself, they look fine.

However, when I export them as image files using the Print Composer, I notice that they are all over the place (as you can see in the 2nd picture)

This problem is also occurring in QGIS 1.8.0. Can you please tell me how I can fix this? Thanks.


texts: Error while running gdal:polygonize as a background task

texts:
I am trying to run gdal:polygonize as a background task, but I am getting QGIS crashing and giving me this error:

QGIS died on signal 11ptrace: Operation not permitted.
No thread selected
No stack.
gdb returned 256
Aborted (core dumped)

How can I go around debugging this?

this is the code for my plugin's module:

def polygonise(inputPath, outputPath, style=None):

    task = processingTask(inputPath, outputPath, style)
    QgsApplication.taskManager().addTask(task)

class processingTask(QgsTask):

    def __init__(self, inputPath, outputPath, style=None):
        QgsTask.__init__(self, "Publish layers")
        self.inputPath = inputPath
        self.outputPath = outputPath
        self.style = style
        self.exception = None
        self.errortrace = None

    def canCancel(self):
        return False

    def run(self):
        try:
            print("start processing")
            processing.run('gdal:polygonize', {'INPUT':self.inputPath,'BAND':1,'FIELD':'DN','EIGHT_CONNECTEDNESS':False,'OUTPUT':self.outputPath})
            print("stop processing2")

            layer = QgsVectorLayer(self.outputPath, "{}_vectorised".format(self.inputPath.name()), "ogr")
            QgsProject.instance().addMapLayer(layer)

            if not layer.isValid():
                print("Layer failed to load!")

            if not (self.style == None):
                categorizedStyling(layer, 'DN', self.style)
            return layer

        except Exception as e:
            self.exception = e
            self.errortrace = traceback.format_exc()
        return False

    def finished(self, ok):
        if ok:
            print("Task is finished")
        else:
            print("Task has errors")

I have tried both methods (Extending QgsTask and Task from a processing algorithm) listed in the QGSTask documentation and both resulted in the same outcome.

$ qgis --version

QGIS 3.4.14-Madeira 'Madeira' (exported)


texts: Supervised Classification: why do we have to sort the validation samples by descending order?

texts:
I saw a piece of supervised classification script:

var sample = TotalSample.randomColumn('rand')

// ascending order
var train = sample.limit(70, 'rand', true)

// descending order
var validation = sample.limit(30, 'rand', false)

Is that necessary? if so, why?


texts: In MapInfo Professional, how do I get rid of the Search symbol?

texts: In MapInfo, after I have searched using CTRL+F, it overlays a star onto the search result. How do I get rid of the resulting star?


texts: Calculating the volume of multiple lakes with ArcGIS (3D Analyst)

texts:
I have the DEM of a glacier bed and want to calculate the volume of bed depressions that could form lakes. Data is available here: https://drive.google.com/open?id=1ERFdsqDGLH1a_FbxwawE_gPm0Au0Q9vT

I've clipped the bedrock under the glacier to the extent of the depressions:

I understand that it should be possible to use the 3D Analyst to calculate the volume of a single depression, but is it possible to do this with more than one?

Could the solution be to region group the raster and then somehow let ArcMap loop through the regions, taking the respective max_height and calculating the volume below? But I don't know how to do this...


texts: Why non-geodatabase MS Access tables should not be added directly to ArcMap?

texts:
I would like to join table from .mdb to the attribute table of feature class to perform some data manipulation, however on the join validation I get a warning:

  Non-geodatabase MS Access tables should not be added directly to ArcMap. The following tables are not connected via OLE DB.

Why can`t those tables be treated like other tables? I admit I used to join non-geo .mdb tables with feature class tables and never had any problems.


texts: Joining dBase (*.dbf) table to Coverage?

texts:
I have a dbf table and a polygon coverage. How do I join and save the joined data to the coverage without exporting to feature class and then re-creating a coverage in python? I have been looking at playing with info tables, but there is not much info out there on it.

So, if I, in arcpy, use the joinItem, I get:

  Traceback (most recent call last):   File
  "G:/Projects/P747/3_Landbase/LB1/Final_Scripts/V_2/Step_04.py",
  line 36, in
      arcpy.JoinItem_COVG(Polygon, Table, Polygon, "MKEY")   File "c:\program files
  (x86)\arcgis\desktop10.1\ArcToolbox\Toolboxes\Coverage Tools.tbx",
  line 2091, in JoinItem
       arcgisscripting.ExecuteError: Error opening ELIMINATETABLE.DBF Failed to execute (JoinItem).

import arcinfo, arcpy, os, sys, gc, datetime, time
from arcpy import env

print 'Starting....'

env.OverWriteOutput = True
env.qualifiedFieldNames = False
arcpy.SetProduct("ArcInfo")

ts = time.time()
st = datetime.datetime.fromtimestamp(ts).strftime('%H:%M:%S')
print 'Start time = ' + st

tbx = arcpy.ImportToolbox(r"C:\Program Files (x86)\ArcGIS\Desktop10.1\ArcToolbox\Toolboxes\Coverage Tools.tbx", "COVG")

env.workspace = "G:\\Projects\\P747\\3_Landbase\\LB1\\multiunion\\m_20150128\\"
Table = "\\\\silver\\clients\\Projects\\P747\\3_Landbase\\LB1\\Eliminate\\El_20150122\\EliminateTable.dbf"
FCLayer = "\\\\silver\\clients\\Projects\\P747\\3_Landbase\\LB1\\TEMP\\\FCLayer.lyr"
TableLayer = "\\\\silver\\clients\\Projects\\P747\\3_Landbase\\LB1\\TEMP\\\TableLayer.lyr"

print 'Loaded Data....'

if arcpy.Exists(FCLayer):
    arcpy.Delete_management(FCLayer)
if arcpy.Exists(TableLayer):
    arcpy.Delete_management(TableLayer)

print 'Deleted Existing Layers....'

for Coverage in arcpy.ListFiles("*_Union"):

    print 'Working on ' + Coverage

    Polygon = env.workspace + "\\" + Coverage + "\\polygon"
    arcpy.JoinItem_COVG(Polygon, Table, Polygon, "MKEY")
    break

What does "support is stopped"? Will I still be able to use my coverage tools?


texts: Deleting output shapefiles which have no data/features using ArcPy?

texts:
Still working on cleaning this up but it runs fine. Below is the rough code for a tool that iterates through field rows and clips accordingly to that row's shape. Everything outputs nicely but there are some outputs that do not contain data. What can I add to have arcmap check for shapefiles containing no data and delete them?

Added an if statement to check for empty SHP's but not sure how to define where to have it check the output folder?

import arcpy
from arcpy import env

arcpy.env.workspace = r'path\folder'

field = "PARISH"
fc = arcpy.GetParameterAsText(0)
Name = arcpy.GetParameterAsText(1)
Path = arcpy.GetParameterAsText(2)
rows = arcpy.SearchCursor(arcpy.env.workspace)

for row in rows:
    feat = row.Shape
    outputName = Name.replace(" ", "_")
    outputField = row.getValue(field)
    outputFieldmod = outputField.replace(" ", "_")
    arcpy.Clip_analysis(fc, feat, str(Path) + r'/' + str(outputName) + "_" + str(outputFieldmod))

for file in arcpy.ListFiles():
    if arcpy.management.GetCount(file)[0] == "0":
        arcpy.management.Delete(file)
        arcpy.AddMessage('Deleted "{}" because it contains no features!'.format(file))


texts: How can I convert a set of coordinates from a linestring to wkb for storage in postgis?

texts:
I have a set of coordinates that come from a kml file and I would like to convert them to wkb for storage in my postgis database. When I use st_geomfromkml, though, I get an error that says I have invalid geometry. The SQL state is XX000.

The error is thrown at the first string.

Here is an example of the coordinates for the linestring: -97.75197377744352 30.52666770876964 0, -97.75203852379295 30.52665828598795 0, -97.75215019046991 30.52664203611576 0.

An additional note, the data type of the column currently holding my coordinates is varchar. I would like to copy them as wkb to my geom column - srid 4326.

How can I convert these to successfully store them in my geom column?


texts:
I am really new to QGIS and KML so this might be obvious but I am too ignorant to know what to do. I have some KML files I would like to use in an application but they are much more complicated than what I need. They contain multigeometry with a number of polygons and I would like to merge these regions to simply get the outline of the total region. In addition, I would like to reduce the number of vertices.

I saved this as a shapefile so I could access the Merge Selected Features tool and I merged all of the features:

But when I try to simplify the feature I get the error:

  This feature cannot be simplified. Check if it has enough vertices to be simplified

In the documentation for Simplify Feature I saw it mentioned:

  If a feature cannot be simplified (e.g. MultiPolygons), a message shows up.

So I thought this was likely the problem. Is there any way I can simplify this, or convert the multipolygon to a simple polygon?

Edit: During my searches I found mention of a plugin called fTools that seems to have some possibly useful functions, such as "Multipart to singleparts" and other vector tools that would be useful, however I do not seem to have it by default in QGIS 2.2, nor can I find it on the qgis plugins page. Is this plugin gone?


texts: Creating linear event table from geometry using QGIS Linear Referencing

texts:
I am trying to find a way to dynamically create an event table from a linear feature.

Imagine the example below. Registration of a sidewalk/fence or similar. The colours represent different routes. So the sidewalk is following 3 different routes. How do you create an event table based on this situation? I have a couple of ideas to explore, but how is it usually done?

It must be fairly common situation in LRS but I have struggled to find many examples.Most examples are on point features which are much easier to deal with.
I would prefer to implement a solution using postgis and/or QGIS.

I am thinking that I need to snap the line to the network somehow. Then split the line based on topology nodes on the base network and then create the event table to:from for each created segment and store the segments in a relational table so i can join the segments back to a line later for visualisation purpose, now following the centerline. Not sure how I can practically do it though. Best solution would be to do it dynamically using PostGIS or a python script perhaps.

Any ideas?

EDIT:
I modified the query @ThingumaBob wrote as help with a nearest neighbour approach. This edit is a comment to his post.

I modified to query a bit to visually see the result, which is pretty close to what I am looking for as a final product. There is probably more clever ways of doing it, but this is my approach.

Modified the query to get the point geom on the base network and turned it into a view.

CREATE OR replace view asset_ref as
  WITH
    pts AS (
      SELECT <id>,
             dmp.path[1] AS seq,
             dmp.geom
      FROM   <lines> AS ln,
             LATERAL ST_DumpPoints(ln.geom) AS dmp
    )
  SELECT pts.<id>,
         pts.seq,
         nw.<id>,
         ST_LineLocatePoint(nw.geom, pts.geom) AS frac,
         ST_Line_Interpolate_Point(nw.geometri_spa, ST_LineLocatePoint(nw.geometri_spa, pts.geom)) AS point_on_line
  FROM   pts
  CROSS JOIN LATERAL (
    SELECT <id>,
           geom
    FROM   <network>
    ORDER BY
           geom <-> pts.geom
    LIMIT  1
  ) AS nw;

From the view group by id, make array of points and create a line based on them

select
    id,
    ST_MakeLine(ARRAY_AGG(point_on_line))
from asset_ref
group by id

This is a visual representation of the result (Black line)

This is close to what I am looking for. My question is.
Is this "as good as I can get" or can i expect more? I dont want to clutter the database with too many sub queries.
If I use the created nodes in a routing analysis then I expect it to work how I want, would that be a sensible approach?


texts: NASA world view (EOSDIS) coverage delay per day - scanning footprint issue?

texts:
I noticed that in NASA world view web site it's take some time to get per day world wide coverage.

I made some calculations:

The source is Aqua & Terra satellites
Both have orbital period roughly 100 min
NASA SW image processing delay is 3h
Capture possible only when it's day time on respective earth part

The only question is what is the scanning footprint? Usually it's almost "180 degrees". But maybe it's significant smaller due to requirements of high resolution imagery? Because if it's "regular" 180 degrees it should be faster.


texts: Get column index by name in QgsAttributeTableModel

texts:
In a QSqlTabelModel I can get the index of a column like this:

my_table_model.fieldIndex('column_name')

How can I do the same with a QgsAttributeTableModel? I have tried .fieldCol and .fieldIdx, but both are returning an index by a given index.


texts: Where do map services get their town name data from?

texts:
Looking at several map services, they all contain the names of basically every place where several humans live.

Cities and towns are quite easy to find, but they all contain townships/parishes/hamlets etc. as well. I cannot find any place to find this data or how to process it.

Is it actually handwork or is there something else going on?


texts: I have a GeoTiff (>100GB) and I want to georeference it in QGIS using the georeferencer option. I did manage to create the GCP's (>15) but when the georeferencing is set to run, it crashed mid-way. Has it got to do with the QGIS version or QGIS cannot accommodate larger Geotiff's? I want my output in a .tiff format. Any thoughts or help please. Thanks


texts: Aligning OS Open Roads Data over OpenStreetMap?

texts:
As seen on my screenshot, the blue-colored road polyline which is downloaded from OS Open Roads is misaligned over the basemap. Those ROADLINK networks are under British National Grid coordinate system. How to correct them?

The software used was ArcGIS Desktop 10.4.1. The shift is approximately 106 meters.