texts:
I am writing a code to calculate the Land Surface Temperature (LST), and one of the variables needed for this are the atmospheric factors w1, w2, w3.
First, I added them as a property to each image in an image collection, and used the image.expression to claulate the LST. This method didn't work as the image.expression doesn't accept an attribute in a mathematical operation with an image and gave me an error, as it requires an image. It only worked when I replaced the variables with constant float values.
Second, I tried adding these parameters as bands to the images, but when I map the LST function over the image collection I find using the inspector that the parameters (W1, W2 and W3) and LST maps are masked.
I hope someone could find where the problem is, otherwise I will have to run the code image by image and add the values manually, which is not ideal.
//adding WV value as a property and parameters as a property and image band
function addWV(WV, image){
  var W1 = ee.Number.expression('(0.0109 * (W**3)) + (0.0079 * (W**2)) + (0.0991 * W) + 1.0090', {
    'W': WV
  });
  var W2 = ee.Number.expression('(-0.0620 * W**3) + (-0.4671 * W**2) + (-1.2105 * W) + 0.1176',{
    'W': WV
  });
  var W3 = ee.Number.expression('(-0.0533 * W**3) + (0.4013 * W**2) + (0.8585 * W) - 0.0451',{
    'W': WV
  }) ;
  image = ee.Image(image).set('WV', WV);
  image = image.set('W1', W1);
  image = image.set('W2', W2);
  image = image.set('W3', W3);
  var img_W1 = ee.Image.constant(W1).rename('W1');
  var img_W2 = ee.Image.constant(W2).rename('W2');
  var img_W3 = ee.Image.constant(W3).rename('W3');

  image = image.addBands(img_W1);
  image = image.addBands(img_W2);
  image = image.addBands(img_W3);
  return image
}

// Land Surface Temperature
var img = ee.Image(list.get(5));
  var H = img.select('H');
  var E = img.select('EM');
  var W1 = img.select('W1');  //I have also tried .get('W1') as an image property
  var W2 = img.select('W2');
  var W3 = img.select('W3');
  var L = img.select('B10');
  var G = img.select('G');
   var lst = L.expression(
    '(H * (1/E * ((L * W1) + W2) + W3) + G)', {
      'H': H,
      'E': E,
      'W1': W1,// if I set here a specific value instead of W1 it would work like 1.0045
      'W2': W2,
      'W3': W3,
      'L': L,
      'G': G
    }).rename('LST');


texts: Making model in ModelBuilder output fields based on user input shapefile and not shapefile used to build model?

texts:
I made a model with which I would like to process various shapefiles that have different fields. I built it using a test shapefile that had its own fields.

When I try running another shapefile through it, I get wrong field mappings. Is there a way to set my field mappings as a variable so that the output fields in the final table are dependent on the input shapefile?

I have heard of inline variable substitution but I do not know how to/am having a hard time to use it. Any specific example would be most welcome.

My issue more specifically is to make sure that when performing a spatial join, the fields of the actual input feature class are the ones being used, and not the ones that were in the test feature class. I have tried substituting the name of the target feature layer in my Spatial Join with a variable (%Sites_Location%) but that crashes Arcmap I do not know why. Do Spatial Joins not accept variables as target? What am I missing?


texts: Alternate option for a Data Player plugin for GPS in qgis

texts:
I found a plugin for QGIS to play a GPS Track. (Data player plugin).The Problem is I can not read .gpx File with this plugin.

Is there another option?


texts: Creating an equidistant grid in ArcGIS for Desktop?

texts:
I am new at GIS, however, I need to create this grid with equidistant boxes similar to graph paper such that these can show approximate distance around different types of places.

How do I do it?

I am using ArcGIS 10.1.


texts: Algorithm for offsetting a latitude/longitude by some amount of meters

texts: I'm looking for an algorithm which when given a latitude and longitude pair and a vector translation in meters in Cartesian coordinates (x,y) would give me a new coordinate. Sort of like a reverse Haversine. I could also work with a distance and a heading transformation, but this would probably be slower and not as accurate. Ideally, the algorithm should be fast as I'm working on an embedded system. Accuracy is not critical, within 10 meters would be good.


texts: How to build Poisson autoregression model

texts:
I have a SpatialPolygonsDataFrame object in R with about 3000 polygons and associated data. I have columns of expected and observed cases. For the moment, I don't have any covariates.

I'd like to perform spatial smoothing. I have used functions such as empbaysmooth(), lognormalEB(), EBlocal() from the DCluster package but have not been happy with the results.

Therefore I would like to do a conditional autoregression using spautolm() - I would like to model a Poisson model of observed versus expected with neighbour weighting.

I cannot figure out how to specify such a model. How do I specify merely a Poisson model for the spautolm command with no covariates?

Or am I barking up the wrong tree altogether?


texts:
I want to create a centerline from points without sorting the points.

Workflow so far:

Created a series of points (2,418) as a multipoint feature where two line features intersected using the intersect tool.
Converted the multipoint feature to a point feature class using multipart to singlepart tool.

Here is where my problems start.

Normally I would use the points to line tool to create the line but the points are not sorted linearly. I don't know why this is but I think it has something to do with the way ArcGIS parses through the points when converting them from multipart to singlepart. (note: I also tried using the explode edit function with the same results).

So I get a wacky line drawing that looks something like this:

You can see in the picture where my points are and how ArcGIS drew the line non-linearly after I used the points to line tool since they are unsorted.

I just want to know if there is an easier way I could go about creating this line along the points besides manually tracing all 2,000+ points in an editing session. Could there also be a way to do this by using xy coordinates or using another application?


texts: creating geotiff in ArcGIS to publish in geoserver

texts:
How can I create a geotiff image (to publish using Geoserver)?

I want to publish geo-reference image in geoserver.Then i chose image format as geotiff and create using arcGIS 9.3.It create tiff,tfw and aux files.But when publish using geoserver it gives this message,

"Could not list layers for this store, an error occurred retrieving them: Unable to acquire a reader for this coverage with format: GeoTIFF"

What is the error,I think this is not the correct method to create geotiff(to using GS).True?
If answer is yes  What is the correct method?


texts:
I'm trying to move two digitized layers, one containing points, the other polygons to a different location at the same time. QGIS doens't seem to allow this. Even if I select both layers and features it will only move one (the one I last selected, so which ever feature is shown in editor)

I know ArcGIS allows multiple layers to be moved at once, just with the moving tool or with the spatial adjusment. I haven't been able to reproduce this in QGIS.


texts: Geoserver ImageMosaicJDBC problem with interpolation setting

texts:
I use the ImageMosaicJDBC plugin to connect to an Oracle raster table. Maybe someone can clarify some things about the interpolation settings. There are multiple location where I can define the interpolation which is confusing to me:

gdal_translate
gdal_translate -of georaster...
co GENPYRAMID=BILINEAR ^
.xml file for ImageMosaicJDBC
scaleop  interpolation="1"
GeoServer Layer setting
Default interpolation setting=xx

The problem I have: I get a black/grey scaled border around my raster layer when I open it via WMS and I used the setting scaleop  interpolation="2" or "3" in my xml.

Btw. I don't understand how that .xml file of ImageMosaicJDBC works. Is it only accessed once when I create a new data store? Or is it accessed every time the layer is accessed?


texts: ArcMap add-in to make connection and load the database on VB.NET

texts:
I'm new at Arcobjects programming. Currently I'm trying to make an ArcMap Add-in which can connect and load a database into ArcMap.
I have found samples on the Esri website, but it seems not to be working for me.

Here's the code:

' For example, path = "C:\myData\mypGDB.mdb".'

Public Function AccessWorkspaceFromPath(ByVal Path As String) As IWorkspace

  Dim workspaceFactory As IWorkspaceFactory = New AccessWorkspaceFactoryClass()
  Return workspaceFactory.OpenFromFile(Path, 0)

End Function

What seems to be the problem is the Microsoft Visual Studio can't recognize the class AccessWorkspaceFactoryClass().

Does anyone have an idea to solve this issue?


texts: Ordering a road network based on "Strahler Stream Order"

texts:
I want to classify a road network similar to Strahler's Order (keep track of how many smaller roads flow into a bigger road). I'm working with mountain roads, so most of them "look" like rivers.

The Spatial Analyst "Stream Order" tool derives results from a flow accumulation raster, this does not work for me, as I'm not classifying based on flow/elevation, but based on existing network. Is there a tool that will take my roads network and classify all the "nodes".

I don't have the "Network Analyst" extension, I do have "Spatial Analyst"


texts: Windows QGIS PostGIS connection to Ubuntu PostgreSQL database

texts: I have QGIS software in my Windows system and I want to make PostGIS connection to a database present in Ubuntu system, both are in same network(LAN). How can I do that?


texts: Clipping polygons to the base map shoreline

texts: I was given shapefile polygons that were created with ArcGIS and I when I imported them to QGIS 3.1 they are no longer clipped to the shorelines of a base map. I am hoping there is an easy way to match the polygons to the shoreline. I have attached a picture for a visual aid.


texts: Simplifying Shapefile using ArcGIS Desktop or alternative?

texts:
I have a shapefile that contains neighborhood boundaries that I want to simplify. Right now I am thinking of converting the shapefile to Google maps KML so I can insert the boundaries into the map as an overlay but do not need the precision provided by the shapefile. How can I do this simplification?

I may have access to arcgis, although a method that does not require it is better.


texts: Load .qlr file shows up as group, not layer (works on one machine, not another)

texts:
I have a project with a few virtual layers that I've saved as .qlr files so to be reused in other projects.

When I reload layer from definition file or drag in by browser, everything works as expected; when another user loads the same files on her machine, about half of them come in as a group, not as a layer.

There's no properties or anything available to work with the VL.  We've had to recreate them manually on her machine.


texts: I've created a model that does several spatial joins based off of a lat/long in a table. In the table, I have a "Modified_date" which gives year, month, date, time. This model is set to run automatically every day at 6am and new informaiton gets appended to an dataset. I'm trying to create a query/expression that would use the "Modified_date" column to tell the model run from todays date and caputre everything that was posted in the last 24 hours. So, If it ran yesterday at 6am, it will run again at 6am, but I want to only capture the records created in the table from 6am to 6am.


texts:
I added a QgsComposerScaleBar to a QgsComposition.

I wish to have segment rounded to the nearest km but I don't know how to achieve this.


texts: QGIS startup freeze (QGIS-OSGeo4W-2.14.2-2-Setup-x86.exe) Athlon XP 3200+ (SSE), Windows XP 32 bit

texts:
I have installed QGIS-OSGeo4W-2.14.2-2-Setup-x86.exe on my XP 32 bit computer and encountered two problems concerning Processing Plugin,

first installation gave me following message: Plugin Processing: The plugin will be disabled because it crashed QGIS during last startup.... I found here that the message is possible to fix with registry manipulation (deleting entry in HKEY_CURRENT_USER\Software\QGIS\QGIS2\Plugins\WatchDog or via Python Console), but the Processing Plugin is not functional.

After reinstallation of QGIS freezed the QGIS at startup everytime. I found the cause is: OTBUtils.py file, which need to detect version of OTB (description of the bug http://hub.qgis.org/issues/14949).

I have tried to modify the file (set version manually). The freeze has disappeared and Qgis is launching correctly now. The Processing Plugin is ticked and seems be ok. But I´m not sure with the manipulation.

Is it possible to override the procedure this way or should I await any problems?

Part, in which was file modified:

def getInstalledVersion(runOtb=False):
    global _installedVersion
    global _installedVersionFound

if _installedVersionFound and not runOtb:
    return _installedVersion

if otbPath() is None:
    _installedVersionFound = False
    return None
commands = [os.path.join(otbPath(), "otbcli_Smoothing")]
progress = SilentProgress()
out = executeOtb(commands, progress, False)
for line in out:
    if "version" in line:
        _installedVersionFound = True
        _installedVersion = line.split("version")[-1].strip()
        break
return _installedVersion

modification of this part:

def getInstalledVersion(runOtb=False):
    global _installedVersion
    global _installedVersionFound

if _installedVersionFound and not runOtb:
    return _installedVersion

if otbPath() is None or otbLibPath() is None:
    _installedVersionFound = False
    _installedVersion = {"5.0.0"}

return _installedVersion


texts: 3D projected map: put locator from GPS coordinates

texts:
Hello I'm a newbie in maps and not so good (as I wish to be...) in math and geometrics stuffs.

So: I have a 2d google map.

I have to put a 2d projection of this map (not exactly this one but a handpainted one, so I will not violate any copyright) in an app (that must work offline, so I cannot use external API but only math resources on the smartphone):

I need to put a locator (on this projection) in real time, calculating it from GPS position of the user.

So, e.g. if the user is here (45.064768 N, 7.695454 E), I will put the locator here:

In other words, I need to know how can I calculate X and Y distance from the upper left corner of the projection (I know the GPS position of all four corners of the projection).

I understand that is a strange question, that I 've asked before on SO (but I was downvoted and informed about this site). I also seem to understand that this math calculation has something to do with a rotated perspective grid:

FYI, I will manage this "GPS coords to XY" manipulation using javascript.

Pls I don't need the final "copy and paste" solution but only an idea on how to proceed, explained in words as simple as possible.

UPDATE:

After some brainstorming I understand that I could start from a trapezoidal shape laying on a 2d map (from top):

Then, if I will observe this shape from behind, this isosceles trapezoidal view will become a perspective view (what I want to show in my app) but with a rectangular shape, due the inclination (no more from the top but e.g. from 45° degrees):

Considering a given point on the "flat" map, I can get distance and angle from the four vertex of the isosceles trapezoid.

Then, I must "transpose" these distance and their angles on the resulting rectangle. I think it can be quite easy to do so, although I believe there'll some errors doing in this way (due to a lot of missing other parameters):


texts: I've got a file that I'd like to load into QGIS. It's format is .tar.gz, but I can't really find how to load this in online and since I'm fairly inexperienced I've never seen this extension before. How does one go about putting this on QGIS?


texts:
Is it possible to change the describe nameString of a .lyr file using arcpy? The name of the .lyr file is correct, but when the .lyr is brought into an .mxd the display name (nameString) is different, and I would like to make them the same.

I'm looking to remove "_clip" from .lyrs that have it in their nameString:

import arcpy
import os

workspace = r"C:\..."
lyrs = []

walk = arcpy.da.Walk(workspace)

for dirpath, dirnames, filenames in walk:
    for filename in filenames:
        lyrs.append(os.path.join(dirpath, filename))

for lyr in lyrs:
    desc = arcpy.Describe(lyr)

    if "_clip" in desc.nameString[-5:]:
        print desc.nameString

nameStrings are read only - https://desktop.arcgis.com/en/arcmap/10.3/analyze/arcpy-functions/layer-properties.htm

Using ArcGIS Desktop 10.5


texts:
I have been trying to install python gdal with OSGEO for some time now with no success. I have removed. I have tried with "Express and Advance" as suggested by OSGEO4W site.

The error is always "No module named 'osgeo' or gdal", the command line also does not recognise an internal program.


texts: GetCount_management() from ArcGIS ToolValidator?

texts:
We want to check if feature classes are empty in the ToolValidator.

When you call GetCount_managment() and background processing is on, there is a popup from our validation step.

Is there a different method to find if a feature class is empty, other than using GetCount_management?


texts:
I am trying to geocode a csv of 500 zip codes and keep getting this error -

  [Errno 13] Permission denied: u'C:\PROGRA~1\QGISLY~1\bin/notfound.csv'  -

Can someone please help me get the MMQGIS plugin running again?


texts: Carrying out atmospheric correction on Sentinel-2 data from Amazon Web Services?

texts:
I'm wondering what the best method is for correcting Sentinel-2 images downloaded in JP2 format (from Amazon Web Services - AWS) to BOA reflectance? As the files downloaded from the sentinel scihub in SAFE format are huge (usually about 6GB) and really cumbersome to process in the SNAP toolbox, I've been downloading the bands I need from Amazon Web Services in JP2 format, then converting them to layer-stacked GeoTIFF images in QGIS. But I need to correct them to BOA reflectance and don't know how best to do this.

Is it possible to use sen2cor in the SNAP toolbox with JP2/GeoTIFF images downloaded and processed from AWS?


texts: Using Map algebra to "burn" a river into a a landcover map using GRASS

texts:
I have a map of various polygons where each polygon represent the cost of passage for different vegetations (values range from 10-50). I have a separate map of a river, where the river currently has a value of 1 and the rest of the map is "no data" (this has been rasterised using “File” → “Map type conversions”).

Can I use map algebra to "burn" the river into the landcover map, in a way where the new map represents a channel of uniformly low-cost movement?


texts: Change in Python earthengine API? filePerBand being ignored by makeDownloadUrl?

texts:
This code used to work on RGB data (MODIS, Sentinel2, etc) and would give me a single TIFF file:
image = clipped_data.visualize(['sur_refl_b02', 'sur_refl_b02', 'sur_refl_b01'], gain=0.03, gamma=1)

url = ee.data.makeDownloadUrl(ee.data.getDownloadId({
    'image': image,
    'scale': 400,
    'filePerBand': 'false',
    'name': 'data'
    }))
print(url)
local_zip, headers = urllib.request.urlretrieve(url)

Running the code now and the behaviour has changed and what used to be a single data.tiff file is now 3 files, 'data.vis-red.tif', 'data.vis-green.tif', 'data.vis-blue.tif'.
My code hasn't changed at all so I can't work out what's going on. filePerBand seems to be being ignored now?
Does anyone have any suggestions?


texts: VBA functions use in ArcGIS Field Calculator

texts:
Would this be ok to use them for the field calculator in ArcGIS 9.3  ? See here MS Excel VBA Functions

Or should I fix them in MS Excel and save as a file and then use the join with the shapefile or file geodatabase. Will this work ? Will ArcGIS read it in table ?

Please advice as I am looking for information on how to use field calculator.

Thanks


texts: Parameter variable in expression for Calculate Field Python Script?

texts:
Here is what I have

import arcpy

inputFC = arcpy.GetParameterAsText (0)         #Feature Class
inputField = arcpy.GetParameterAsText (1)      #Field to manipulate
inputChar = arcpy.GetParameterAsText (2)      #The character(s) I wish to replace
replChar = arcpy.GetParameterAsText (3)        #The character(s) I wish to replace them with

arcpy.CalculateField_management(inputFC, inputField, !inputField!.replace(inputChar, replChar), "PYTHON_9.3")

I am trying to use the "CalculateField_management" tool with a variable instead of a direct field for the 3rd input like I am with the first 2, but I can't seem to fit it in with the expression. I want it to take the value of the existing string and replace the characters I desire. How is the expression supposed to be written?

I have tried a variety of ways and can't figure it out.
For example: !inputField!.replace, '"!inputField!'".replace, inputField.replace, '"inputField"'.replace, etc.


texts:
I've asked this over on Stack Overflow but thought that someone may have a GI point of view that may help:

As an over-simplified example I have a list of events that have a maximum attendance:

 event    | places
===================
 event_A  |   1
 event_B  |   2
 event_C  |   1

And a list of attendees with the distance to the events:

 attendee    | event_A dist | event_B dist | event_C dist
==========================================================
 attendee_1  |      12      |      15      |      12
 attendee_2  |      11      |      15      |      11
 attendee_3  |      10      |      11      |      12

Can anyone suggest a (hopefully) simple method to produce a set of options providing the best case allocations based on shortest total distance and also on shortest mean distance?

I currently have the data held in Oracle Spatial database, but I'm open to suggestions.

In my actual data there will be more places than attendees, so the events do not have to be full, but they cannot be "over-full". For the possible solutions I'd like 2; one showing the lowest total distance (i.e. sum of all attendees' distances), the other showing the mean distance (i.e. sum of all attendees' distances / No. of attendees)

Update:

Each atendee should be assigned to exactly one event
Each event has a limit as to how many atendees are assigned to it
Underfull or even empty events are no problem
Each assignment between an event and an atendee corresponds to a given distance
I want to minimize the overall distance for all assignments


texts: OpenLayers + GeoJSON from a django server does not display features

texts:
I'm having trouble with the vector layer for my little project,

here's the snippet of the javascript block

var map;
        function init(){
            map = new OpenLayers.Map('map', {
              projection: new OpenLayers.Projection("EPSG:3857")
            });
            var osm_layer = new OpenLayers.Layer.OSM("OpenStreetMap");
            map.addLayer(osm_layer);

            var path_layer = new OpenLayers.Layer.Vector("Path Layer", {
                  projection: "EPSG:4326",
                  strategies: [new OpenLayers.Strategy.Fixed()],
                  protocol: new OpenLayers.Protocol.HTTP({
                  url: "{% url 'path_json' route.id %}",
                  format: new OpenLayers.Format.GeoJSON()
                })
                });
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            map.addLayer(path_layer);
            map.setCenter(
            new OpenLayers.LonLat(121.032, 14.594).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()), 12);
            if(!map.getCenter()){
                map.zoomToMaxExtent();
            }
        }

and here's the view that responds with the GeoJSON object:

def get_path_json(request, route_id):
    route = get_object_or_404(Route, pk=route_id)
    geoj = GeoJSON.GeoJSON()
    path = route.path.all()

    path_format = Django.Django(geodjango="path", properties=['mode'])
    path_json = geoj.encode(path_format.decode(path))

    return HttpResponse(path_json, content_type="application/json")

the object is parsed in geoJSON format via vectorformats.

so.. what am i doing wrong? or am i missing something? The map displays but the vector layer doesn't have the features described in the GeoJSON?


texts: Adding number-defined random points within polygon using QGIS?

texts:
I'm trying to add points within polygons using the random points tools (I'm on qgis 2.18.2). What I want to achieve --I don't know if it's possible-- is populate these polygons with a defined number of points, as in a column of the shapefile.

Specifically, it's a city map by blocks and a shapefile column has the number of shops in that block. Random points-fixed doesn't allow column selection, while random points-variable allows it, but generates a really random number of points. Is there a way to do that?


texts: Combining more than 20 raster bands in ArcGIS Desktop?

texts:
I have overlapping polygon data that I would like to 'combine' in ArcGIS and I'm running up against the 20 band maximum for rasters.

I'm interested in solutions using this basic method with ArcGIS Desktop.

I have many overlapping polygons 300+ that represent ranges of animals within a large area 100,000+ Acres.  I have many unique attributes for each polygon representing various characteristics for the individual.  I also have 30m categorical raster data for vegetation, ownership, and several other layers.    I attempted to look at this by trying to split up the feature class (.shp file) with the 300+ polys into individual files then convert feature -> raster,  then obviously I run into the issue of too many

I'm beginning to think it would be easier to convert the raster layers (vegetation and ownership e.g.) raster - > polygon and then use the cross tabulation tool.


texts: How can I create a grid of polygons from a .csv file or line vector in qgis?

texts: I have a map defined by two seperate reference systems: one is a standard grid coordinate system, the other a series of irregualar polygons. I want to find which polygon each grid square overlays, and to do this I think I need to add my grid as a polygon layer where each grid square is a polygon. How do I do this? I have a .csv file in which I have defined as seperate columns each vertex of each grid cell. I have also managed to import this into QGIS as a series of point vectors (both .csv and as a shapefile) and convert this into a grid of lines. But I can't work out from here how to turn either the grid, or the original .csv file, into polygons.


texts: Filter FeatureCollection with multiple values

texts:
Is it possible to use an equality filter for a FeatureCollection in GEE based on multiple values? I understand how to filter by one value:

collectionName.filter(ee.Filter.eq('COLUMN','VALUE'));

But what if I wanted to filter by a list of values? Something like:

var lis = ee.List(['VALUE1', 'VALUE2', 'VALUE3']);

Is it possible to apply this to equality filter? I tried to do the following:

collectionName.filter(ee.Filter.eq('COLUMN',lis));

It ran, but didn't work.


texts: Switching from Nested Search Cursors to Dictionaries

texts:
I'm working with a table that has in excess of 800K records and my method of using nested cursors is not practical. I've been reading and it looks like I should switch to dictionaries, but after much research, I'm not sure how to replicate the functionality of the code below using dictionaries.

import arcpy

sdeFiberSplice = r'C:\Users\broadhurstn\Documents\ArcGIS\Default.gdb\FIBERSPLICE'
asBuiltFIBERSPLICE = r'C:\Users\broadhurstn\Documents\ArcGIS\Default.gdb\ASBUILTFIBERSPLICE'

sdeFiberSpliceFields = ["asegmentidfkey", "zsegmentidfkey", "afiberid", "zfiberid", "bv_asbuilt_gdb_uploaded"]
asBuiltFiberSpliceFields = ["ASEGMENTIDFKEY", "BSEGMENTIDFKEY", "AFIBERNUMBER", "BFIBERNUMBER"]

with arcpy.da.SearchCursor(asBuiltFIBERSPLICE, asBuiltFiberSpliceFields) as cursor:
    for row in cursor:
        asegkey = row[0]
        zsegkey = row[1]
        asibid = row[2]
        zfibid = row[3]

        with arcpy.da.UpdateCursor(sdeFiberSplice, sdeFiberSpliceFields) as cursor:
            for row in cursor:
                if asegkey == row[0] and zsegkey == row[1] and asibid == row[2] and zfibid == row[3]:
                    print asegkey
                    row[4] = "Y"
                    cursor.updateRow(row)
print "Done."

Basic Logic of Code:

If combination of "ASEGMENTIDFKEY" and "BSEGMENTIDFKEY" and "AFIBERNUMBER" and "BFIBERNUMBER" in table "asBuiltFIBERSPLICE"  == combination of "asegmentidfkey" and "zsegmentidfkey" and "afiberid" and "zfiberid" in table "FIBERSPLICE" than populate "bv_asbuilt_gdb_uploaded" with string "Y".

Visual Representation of Logic:

Can someone point me in the right direction with pseudocode?


texts: How to set the style of polygons in OpenLayers 4?

texts:
With OpenLayers 4 I copy one or more polygons from one layer to another, and since they do not have styles, I would like to assign them one.

I can put a style on the layer but polygons do not have export styles. That's why I try to put a style to the polygons without success.

The following code returns "TypeError: ... is not a function":

    var Polygon= new ol.style.Style({
          fill: new ol.style.Fill({
            color: 'rgba(255, 255, 255, 0.5)',//'#ffffff'
          }),
          stroke: new ol.style.Stroke({
            color: '#ffcc33',
            width: 4
          })
        });
        getDrawingLayer().getSource().addFeatures(select.getFeatures().getArray());//pass the polygons
         //getDrawingLayer().setStyle(Polygon)};//succes
getDrawingLayer().getSource().getFeatures().setStyle(Polygon);//try to set the style of polygons


texts: Loading raster to R from PostgreSQL via pgGetRast takes a lot of time

texts:
I wrote R code in R Studio to load a raster (stored in PostgreSQL) to R. The database is stored here: C:\Program Files\PostgreSQL\

The following versions are installed on the computer:

R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
PostgreSQL 10.0, compiled by Visual C++ build 1800, 64-bit
GDAL 2.2.1, released 2017/06/23
POSTGIS="2.4.1 r16012" PGSQL="100" GEOS="3.6.2-CAPI-1.10.2 4d2925d" PROJ="Rel. 4.9.3, 15 August 2016" GDAL="GDAL 2.2.2, released 2017/09/15" LIBXML="2.7.8" LIBJSON="0.12" LIBPROTOBUF="1.2.1" RASTER

The raster can be downloaded from this page:

https://opendata.swiss/de/dataset/das-digitale-hohenmodell-der-schweiz-mit-einer-maschenweite-von-200-m1

Raster into PostgreSQL

I used this code to store it in the PostgreSQL database:

raster2pgsql -s 21781 -I -C -M "F:\GoogleDrive\DHM_200\DHM200.asc" -F public.dhm200_LV03 | psql -U postgres -d db_name

From PostgreSQL to R

With the following script I access the database and load the raster. Loading the raster takes more than 3 minutes!!:

library(rpostgis)
library(RODBC)
library(rgdal)

con <- dbConnect(drv="PostgreSQL", dbname="db_name",host="localhost",port=5432,user="postgres",password="pw" )

dhm200 <- pgGetRast(con, c("public","dhm200_lv03"), rast = "rast")

Load .asc directely

Loading the raster original with the following code takes less than 1 second!!.

library(raster)
dhm200<- raster("F:\\GoogleDrive\\DHM_200\\DHM200.asc")

My questions:

Is this normal?
How can I make it faster?


texts:
I'm new to GRASS GIS and programming and I'm running into a lot of what I imagine are beginners problems and something similar to this has been asked before, but not In a way that I understand.

I'm trying to bash import tif. files and tried (from GRASS GIS 6 tutorial https://grasswiki.osgeo.org/wiki/GRASS_6_Tutorial/Raster_data_management):

for file in `ls *.tif`
 do
  r.in.gdal input=$file output=${file%.tif}
done

but I get

File "<input>", line 1
    for file in `ls *.tif`
                     ^
SyntaxError: invalid syntax

Since I'm new to programming world I have no idea how to fix this.


texts: Changing pixel type of image in Google Earth Engine?

texts:
I am a student and new Google Earth Engine user.

I need to convert the pixel type of image from 16 bit to 8 bit to calculate Forest Canopy Density in google earth engine. I am seeking a way to solve this problem.

Can you help me?


texts:
How can I obtain area-specific relative risks from a regression model. For example, I have this model in R
data<-data.frame(outcome=c(0,1,2,0,10,20,20,10,2,0,1,2),var1=c(1,1,1,1,2,2,2,2,1,1,1,1),area=seq(1,12,1),population=c(200,200,120))
model<-glmer.nb(outcome~var1+(1|area)+offset(log(population)),data=data)

How could I get the relative risks of each area?


texts: Layer symbology is not applied in layer to KMZ

texts:
I have created a tool in modelbuilder. I use the make feature layer tool to create my layer.
I right click on the layer and select a symbology.
I run my tool and I can see that my symbology is applied on my layer correctly, when using add to display.

However the resulting kmz does not contain the symbology of the layer.
Does anybody know how  can I involve the symbology in my kmz ?

The symbology Is simple arcgis symbols like cirles , triangles etc.
the "InputFeatures_JSONToFeatures(2)" parameter in the model below contains the correnct symbology.
However the kml contains a default one like no symbology has been applied.

part of my tool is shown in the following image :
(Arcgis 10.2.2)


texts: Measuring Right of Way in ArcGIS Desktop?

texts:
I'm helping bring CAD people into ArcGIS so that everyone throughout the company is on the same page and there is one database for everything. Right now, one of the biggest hurdles is making sure all of the functionality that they have with GIS is available and as easy to use as it is in what they're using now. I want this transition to be easy and with as little hesitation/bitterness as possible.

I cannot find a measurement tool that snaps at a 90 degree angle.

The minimum distance tool doesn't work, because it will find the minimum for the whole line segment, instead of taking in a piece of a line. I want to calculate the minimum at a specific point or in a very localized area. Also, I would prefer a button, similar to the measure tool. I don't want them to have to load data into the toolbox dialogs in order to do a simple measurement.

The measure tool doesn't snap perpendicular. We're wanting to minimize the amount of possible error.

I want to check this Q&A site before I do one of two things--create a custom button or create a feature class that I can use as a temporary measurement--they snap perpendicular to one side of the right of way line to the other side and then after they finish, they delete the line.

We are currently using 9.3, but are upgrading to 10 soon.


texts: Merging sets of polygon from adjacent image tiles

texts:
I have two geodataframes that describes objects in two adjacent tiles. I would like to merge these two dataframes so that I can obtain a single dataframe that contains all the polygons. Using the overlay command I was able to get a dataframe that describes all the polygons however it did not merge the other fields. To elaborate:
P1:
       class     obj_id             geometry
0        0      tile_2200-3000_0    POLYGON ((543390.601 3685451.895, 543335.035 3...
1        0      tile_2200-3000_1    POLYGON ((543296.328 3685553.378, 543266.931 3...
2        0      tile_2200-3000_2    POLYGON ((543405.571 3685445.190, 543408.318 3...

P2:
        class      obj_id            geometry
0        0      tile_2200-3800_0    POLYGON ((543538.995 3685280.603, 543501.395 3...
1        0      tile_2200-3800_1    POLYGON ((543380.903 3685353.924, 543382.869 3...

Overlaying P1 and P2 ( via geopandas.overlay(p1, p2, how="union"))
       class_1         obj_id_1          class_2    obj_id_2             geometry
0        0          tile_2200-3000_0        NaN        NaN           POLYGON ((543390.601 3685451.895, 543335.035 3...
1        0          tile_2200-3000_1        NaN        NaN           POLYGON ((543296.328 3685553.378, 543266.931 3...
2        0          tile_2200-3000_2        NaN        NaN           POLYGON ((543405.571 3685445.190, 543408.318 3...
3        NaN        NaN                      0     tile_2200-3800_0  POLYGON ((543538.995 3685280.603, 543501.395 3...
4        NaN        NaN                      0     tile_2200-3800_1  POLYGON ((543380.903 3685353.924, 543382.869 3...

The overlayed result looks fine, but the class and obj_id columns were not merged. Per the documentation located here about union overlays, I understand this is the expected behaviour, but I would like the merged geodataframe to have a single field for class and obj_id. This way I would be able to easily filter through objects of a specific class while viewing on QGIS.
How can I go about achieving this?
There might be a better way to do this merge process.


texts: Copying original attributes from DGN file using ArcGIS Data Interoperability Quick Import?

texts:
I am new to Data Interoperability extension and I wanted to ask you why "Quick Import" tool doesn't allow me to copy the original attributes from my DGN file.

When I check the results in geodatabase I is some new columns named: IDGS Color, IDGS Class etc.

Why I can't copy those originals? Do I need to check some options in the setting?


texts: How to enable camera and take pictures for features in QFIELD?

texts:
My question is as in the title. I'm struggling to find a way, how I could add a camera function in QFIELD in order to take pictures of features in field. I've seen one similar question here, but it's been left unanswered for more than a year now. As far as I know, this functionality does exist somehow.

Any tips?


texts:
I have got a problem with ST_Intersection as bellow query. I do not know why I can not get element z of this intersection?

----query:

SELECT ST_AsText(ST_Intersection('LINESTRING Z (0 0 0, 2 2 2)',
                                 'LINESTRING Z (0 1 4, 1 0 4)'));

My result=
"POINT(0.5 0.5)"

My desire result= "POINT Z (0.5 0.5 2.25)"


texts: I want to convert a shapefile to an EMF file. The EMF file must be a vector image, not a raster image. Please suggest to me some good packages or tools.


texts:
I have a layer with one field and I would like to rename that field with PyQGIS.

I guess it can be done using the QGIS tool "refactorfields" but I don't know how to use it in PyQGIS...

My other idea was to create a new field and next copy the values from field1 to the new field and than delete field1.

That is the code I came up with the help of the docs:

    layer.dataProvider().addAttributes([QgsField("Field_xy", QVariant.String)])

    for feature in layer.getFeatures():
        id = feature.attributes()
        feature.setAttribute('Field_xy', id[0])
        channel2.updateFeature(feature)

    layer.dataProvider().deleteAttributes([0])

unfortunately, I get the following error message:

  KeyError: Field_xy

It refers to the feature.setAttribute() line. I guess it means that the field 'Field_xy' doesn't exist. But I've created the field in the line above the for loop haven't I?


texts: What is the difference between float() and toFloat() in GEE?

texts:
There are too methods in gee to cast an image to float : toFloat() and float().
They have the same documentation which is the following :

Casts the input value to a 32-bit float.

Is there any difference between the 2 functions?
This question can be extended to all casting method that usually exist in 2 versions (int(), toInt() ...etc)


texts: viewing collections of geotif - each part is own layer, it's slow

texts:
I have ~100 .tif files, making 16GB
Just dropping them into QGIS, shows them as "layers" , but places every correcty , assembling a large map.

The problem is that any panning, zooming causes a full reload (page goes white, then loads images) , browsing is slow.

Is there something I do wrong ? - maybe they should not be considered as different layers, but just parts on one layer ?


texts: Labelling expression - How to combine two different functions?

texts:
I'm not an expert of scripting and programming,
I need to use these two functions in the labelling expression in ArcGIS.

How can I combine this:

    Function FindLabel ( [toponimo] , [testo] )
      if (  [testo] = "PICCOLI" ) then
       FindLabel = "<CLR black='000'><ITA><FNT size = '8'>" + LCase ( [toponimo] ) + "</FNT></ITA></CLR>"
      elseif   (  [testo] = "MEDI" ) then
      FindLabel = "<CLR black='000'><ITA><FNT size = '10'>" +LCase (  [toponimo] ) + "</FNT></ITA></CLR>"
      else
      FindLabel = "<CLR black='000'><ITA><FNT size = '12'>" + LCase ( [toponimo] ) + "</FNT></ITA></CLR>"
      end if
    End Function

and:

    Function FindLabel ([MyFieldName])
     FindLabel = PCase([MyFieldName])
    End Function
    Function PCase(strInput)
     Dim iPosition
     Dim iSpace
     Dim strOutput
     iPosition = 1
     Do While InStr(iPosition, strInput, “ “, 1) <> 0
     iSpace = InStr(iPosition, strInput, “ “, 1)
     strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
     strOutput = strOutput & LCase(Mid(strInput, iPosition + 1, iSpace - iPosition))
     iPosition = iSpace + 1
     Loop
     strOutput = strOutput & UCase(Mid(strInput, iPosition, 1))
     strOutput = strOutput & LCase(Mid(strInput, iPosition + 1))
     PCase = strO

The second is useful for PCase instead of LCase.


texts: pgr_createTopology does not create vertices at every end of the lines of a street network

texts:
I am using pgRouting with a street network. I added lines to the network that represent straight lines from destination points I am interested to the nearest street using ST_ShortestLine(). Now I ran pgr_nodeNetwork() to split the street network accordingly, so that it is ready for basic routing. However, when I run pgr_createTopology() the vertices are not all included to have efficient routing:
select pgr_createTopology('my_table_wgs84', 0.0001, 'geom', 'street_id');

Here is a screenshot, which shows that for the highlighted red line, there are actually no vertices (red rectangles) created at all (plus you see that the connection line I created from the green destination point is actually splitted into several sublines by pgr_nodeNetwork):

For the red line, for instance, the source and target is both the red rectangle you see in the bottom left.
What might be the issue that pgr_createTopology don't create vertices everywhere a line ends?


texts:
I have implemented a minimap and I'm trying to hang a type click event to change the base layer. Like google maps.

But it does not work. This is my code:

_onBaselayerChanger: function (e) {
  var currentBaselayer = [];
  this._map.eachLayer(function(layer) {
      if( layer instanceof L.TileLayer )
          currentBaselayer.push(layer);
  });
  this._map.removeLayer(currentBaselayer[0]);
  this._map.addLayer(this._layer);
}

Is there a plugin or something to help me?


texts: ArcGIS Pro crashes when importing photogrammetric multipatch?

texts:
I am new to the ArcGIS platform, so please bear with me.

I have run some tests on both ArcScene and ArcGIS Pro before my jobs decides with program to buy.

ArcScene imports 3d models exported from Agisoft Photoscan without a lot of hassle. Although to import a georeferenced model, I had to export two Collada models from Agisoft Photoscan Pro: one in a local coordinate system, and one in a global coordinate system.

In ArcScene I first imported the "global" one which looks like Lego blocks (I have no idea why), but then replaces the multipatch with the "local" one, and it works in ArcScene.

However, when trying this work-around in ArcGIS Pro, the program stalls and crashes.

Am I doing something wrong, or is it a fault in the program?


texts: Transform Shapefile from WGS84 to NAD83 using QGIS?

texts:
Possible Duplicate:
  How to reproject a vector layer in QGIS?

I have some shapefiles whose CRS is WGS 1984 and I have some shapefiles whose CRS is NAD 1983 State Plane Illinois East. I want them all to have the latter CRS (IL State Plane.) It is my understanding that I will need to transform the datum of the WGS84 shapefiles? Is there a way to do this using QGIS or other free software? Thanks!


texts: OpenLayers get single layer from WMS multiple layers

texts:
Openlayers enables to declare multiple layers in one WMS layer class.

 var nasa_wms = new OpenLayers.Layer.WMS(
        "NASA Global Mosaic",
        "http://wms.jpl.nasa.gov/wms.cgi",
        {
           layers: "modis, global_mosaic"
        });

When I add this layer to map, the items are coming together on the map. But sometimes I want to use a single layer to apply CQRS filter to "modis" layer or "global_mosaic".
So I should use a single wms layer and add CQRS filter.

Is this possible, or should I separate layers as two layers.


texts: Query on all layer features with boundlessgeo sdk

texts:
I'm currently implementing a webgis by using the reactjs components from the boundlessgeo sdk.

I'm using the QueryBuilder component in order to query for features but It always performs the query on the currently loaded features for a given layer.
So, if there is a feature that meets the search criteria but is not loaded on the client side, the query will return no results.

How can I do to perform a query on all the layer's features although not all features were still loaded in the client side?

Does anyone faced this issue?

The same applies for the feature table component, It always contains just the features currently loaded.


texts: allow client to upload Layers to Openlayers 3

texts: I want to allow the clients to add vector layers in form of a geojson to openlayers 3. It should look like in this fiddle . I know how to add multiple layers but I want the client to be able to add a Layer and see his added layer. The layer doesn't have to be saved for his next visit at the page.


texts: QGIS Not responding - qgis-bin.exe or qgis-ltr-bin.exe not responding

texts:
In QGIS, when I double-click on a layer to display its properties (or even right-click to select Properties), QGIS stops responding giving an error message "qgis-ltr-bin.exe is not responding". Was running QGIS 3.10, then uninstalled it and installed QGIS 3.16 Hannover. Problem persists giving the error message "qgis-bin.exe is not responding". I realize my question is similar to previous questions, but have been unable to find the solution to this problem. The problem only started last week.
Is it possible that the problem is related to missing .dll files? Tried running the qgiscrashhandler.exe, but the software is unable to run due to missing Qt5Gui.dll (QGIS 3.10) or Qt5Widgets.dll (QGIS 3.16).


texts: Display and manage (CRUD) point cloud in (Geo)Django 2

texts:
I would like to use GeoDjango to

Geolocate the place I will scan.
Would start to 3D scans with a DIY lidar based on Arduino/Rpi.

So far no worries. Then,

The Goal is to save x,y,z as input in PostgreSQL DB (PostGIS
extension?, pointcloud extension?) with Django ORM
Then display it in ThreeJs, Cesium
or Potree with Django if supported.

What's the best way and the support for this technologies?


texts: SetNull() failing with input raster in ArcPy?

texts:
In ArcGIS 10.3, I am trying to use SetNull to identify streams in a raster based on an existing flow accumulation raster. The process involves setting all raster cells with flow accumulation value of less than a specified threshold value to null, and those exceeding the threshold value are set to 1, indicating a stream is present.  After successfully performing the operation of interest using the Raster Calculator tool with the following conditional statement SetNull("flowAccumulationRaster"<threshold,1), I have been trying to implement this in a Python script.  I have determined through lots of searching that the Raster Calculator approach doesn't translate directly in Python, so I've been searching out other approaches.

This seems to be a straight forward problem, so I assume my syntax is incorrect somewhere.  Again, I've been able to successfully perform this operation manually with the Raster Calculator, which indicates to me that the inputs are valid.  Here is the code I've most recently tried:

import arcpy
from arcpy.sa import *
arcpy.CheckOutExtension("Spatial")

threshold=2152000
inConRaster=flowAccum  # this is an existing raster in a GDB
inFalseConst=0
whereClause="Value > threshold"

outSetNull=SetNull(inConRaster,inFalseConst,whereClause)
outSetNull.save(rasterCalcOut)

# I've also tried the following in place of SetNull with no success
# outSetNull=Con(flowAccum,1,"flowAccum > threshold")

I've tried numerous variations on the above two "SetNull" and "Con" commands, and continue to receive error messages related to the raster being either non-existent, not supported, or other related things.

Here is an error snippet:

Traceback (most recent call last):
  File "<pyshell#43>", line 1, in <module>
   outSetNull=SetNull(inConRaster,inFalseConst,whereClause)
  File "C:\Program Files    (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Functions.py", line 331, in SetNull
where_clause)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Utils.py", line 53, in swapper
result = wrapper(*args, **kwargs)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\sa\Functions.py", line 326, in Wrapper
where_clause)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\geoprocessing\_base.py", line 504, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
ExecuteError: ERROR 010416: Error in setting raster table filter for C:\Users\Chris\Documents\Graduate School\UW Extension\GIS\Project\Data\MCWC_Process_Development_v02.gdb\YoungCreek_YaquinaRiver_07_FlowAccum_Int.
ERROR 010213: Error in reading raster Band_1.
ERROR 010325: Run-time error - ***.
ERROR 010067: Error in executing grid expression.
Failed to execute (SetNull).


texts:
I am looking to find a way using SDO Geometry to overlay two polygons, Polygon A and Polygon B. I consider Polygon A to be my bottom layer. Wherever Polygon B overlaps Polygon A, I want to cut that geography out of Polygon A. Basically, the geography of Polygon B will take precedence over Polygon, without getting rid of all of Polygon A.

My intent is to throw the now-modified Polygon A and Polygon B into a new Feature Class. This Feature Class will eventually be made into an ArcGIS Service.

Some Visuals:

Blue = Polygon A

Red = Polygon B

When we place Polygon B on Polygon A. We'll cut out where Polygon B is. If we think of this example as 1 layer, this would also be the intended end result.

Polygon A after we remove the chunk where Polygon B was.

Edit: This was marked as a duplicate. Although I can see how this is a duplicate from an ArcGIS Perspective, the answer that was marked as duplicate did not mention anything about SDO Geometry. I would like to see if there is an option available via SDO Geometry as well,(Even if it's not the best solution) in the event that I must end up using SDO. I've removed the references to ArcMap to designate this as more of an SDO Question.


texts: Merge touching polygons with keeping their attributes

texts:
I've got a layer of polygons

Although they all in the same layer, each polygon own some unique data like the date of this polygon and an amount it possess (a number).

I want to join/merge all the adjacent polygons, the end results will be 1 polygon for every stack of polygons, but this 1 polygon will hold the data of all the polygons it holds (and even a count).

Any idea how to do that ? I tried to mess around with the integrate and dissolve, but got mostly non-relevant results.
I'm using both QGIS and ArcMap, so any solution for those programs will be great.


texts: Get pixel value of ImageWMS that has geotiff format

texts:
I have layer (ImageWMS that has GeoTIFF format) and also OSM or another for my baselayer.
According to https://openlayers.org/en/latest/examples/disable-image-smoothing.html
I should get pixel[0] and pixel[1] and pixel[2] to calculate height . But I have an image layer and when clicked on image layer I received pixel values of base layer not image layer. So I added filter to my codes for showing just image layer's pixel value but console show me (NON). How can I find the pixel value of image layer or better way for calculate height from image layer (raster layer .tiff)?
Here is my code :
const UnTiled = new ol.layer.Image({
        opacity:0.9,
        title:'UnTiled',
        source: new ol.source.ImageWMS({
            ratio: 1,
            url: 'http://localhost:8080/geoserver/world/wms',
            params: {
                     'VERSION': '1.1.1',
                  "STYLES": '',
                  "LAYERS": 'world:world',
                  "exceptions": 'application/vnd.ogc.se_inimage',
            }

          })

        });map.addLayer(UnTiled);

map.on('singleclick', function(evt) {
map.forEachLayerAtPixel(
    evt.pixel,
    function (layer, pixel) {
      var height =
        -10000 + (pixel[0] * 256 * 256 + pixel[1] * 256 + pixel[2]) * 0.1;
        console.log(height)
    },
    {
      layerFilter: function (layer) {
        return layer === UnTiled;
      },
    }
  );
})


texts: GRASS GIS 3D - Inconsistent number of attributes

texts:
I am trying to automate my 3D plotting of GRASS GIS 7 results, also to make them more consistent in size and view angles. So for

m.nviz.image elevation_map=DEM -a mode=fine resolution_fine=1 color_map=result position=0.84,0.16 height=2799 perspective=24 twist=0 zexag=1.000000 focus=119,49,2713 light_position=0.74,-0.57,0.80 light_brightness=80 light_ambient=20 light_color=255:255:255 output=nviz_output format=ppm size=1853,989

I get as error:

ERROR: Inconsistent number of attributes (<vpoint> 0: <vpoint_position> 3)

I do not seem to be the first with this problem, but could not find an answer yet how to solve this problem. I have no vector data in my workspace, so why is vpoint here an issue?


texts: QGIS 3 - Wrong legend for datadefined size points layer

texts:
I am trying to generate a proportional symbol symbology using data defined symbol size in a QGIS 3 python plugin.

Here is the working code :

# Symbol creation
symbolLayer = QgsSimpleMarkerSymbolLayer()
symbolLayer.setShape(QgsSimpleMarkerSymbolLayer.Circle)
symbolLayer.setSize(2.0)
symbolLayer.setColor(QColor(31, 120, 180)
symbolLayer.setStrokeColor(QColor(255, 255, 255)
symbolLayer.setStrokeWidth(0.4)

symbol = QgsMarkerSymbol.createSimple({})
symbol.changeSymbolLayer(0, symbolLayer)

# Size definition (Flannery method)
# layer is a QgsSingleSymbolRenderer
strExp = 'coalesce(scale_exp("value", 0.0, 150, 1, 20, 0.57), 0)'
symbol.setDataDefinedSize(QgsProperty.fromExpression(strExp))
layer.renderer().setSymbol(symbol)

The problem is the legend. This code :

# Legend
lgd = QgsDataDefinedSizeLegend()
lgd.setLegendType(QgsDataDefinedSizeLegend.LegendCollapsed)
lgd.setClasses([
    QgsDataDefinedSizeLegend.SizeClass(150, '150'),
    QgsDataDefinedSizeLegend.SizeClass(75, '75'),
    QgsDataDefinedSizeLegend.SizeClass(15, '15')
])

layer.renderer().setDataDefinedSizeLegend(lgd)

produces an enormous legend symbol :

However, if I open the layer properties dialog and update parameters with
datadefined size assistant, the legend is refreshed with the correct size :

What am I missing ?


texts: Is AVHRR 5.3 SST data correct in Google Earth Engine

texts:
I am curious about how to scale the units of the AVHRR 5.3 Sea Surface Temperature data. The original units of this dataset is K, but it also has a scale factor of 0.001 (I'm not sure for what). The units seem to be wrong because they are not reasonable when converting to Celsius, it should be >25°C (or 298 °K) in the Tropics). Am I doing something wrong here?

var dataset = ee.ImageCollection('NOAA/CDR/SST_PATHFINDER/V53')
  .filter(ee.Filter.date('2014-05-01', '2014-06-14'))

var seaSurfaceTemperature = dataset.select('sea_surface_temperature')
var rescale = function(image) {
  var img = image.multiply(0.001)
  return img.copyProperties(image, image.propertyNames())
}

var sst = seaSurfaceTemperature.map(rescale)
var visParams = {
  min: 0.0,
  max: 28,
  palette: [
    '030d81', '0519ff', '05e8ff', '11ff01', 'fbff01', 'ff9901', 'ff0000',
    'ad0000'
  ],
}
Map.setCenter(-121.99, -2.11, 2)
Map.addLayer(sst.mean(), visParams, 'Sea Surface Temperature')

https://code.earthengine.google.com/2d590a96c4dbf4aeda156bdfe30f26e3


texts:
I want to export part of the map into (very big) SVG file. First I tried to do this using REST API:
https://*server*/ArcGIS/rest/services/General/Etages/MapServer/export.
This worked, the SVG file contains <path> tags describing all polygons I have on map and <text> tags describing all the labels. The only problem is that max SVG file size is limited to 4096x4096 pixels.

So I switched to python:

import arcpy

mxd = arcpy.mapping.MapDocument('d:\\maps\\etages.mxd')
df = arcpy.mapping.ListDataFrames(mxd)[0]
arcpy.mapping.ExportToSVG(mxd, 'd:\\maps\\etages.svg', df, 256*30, 256*30)
del mxd

I can export bigger maps this way, but the problem is that out SVG file is rendered using <image> tags. Is it possible to force arcpy to export SVG as real polygons/text, not prerendered images?


texts: Creating overview images for individual rasters becomes more flexible when the layer is partially updated. How do I do this?

texts:
I use a GeoServer.

I want to create a layer from a mosaic that I got using gdal from a vrt file that is created from pieces of a map whose size is 9 000 000 * 3 000 000 pixels.

To create a VRT file, I use gdalbuildvrt.

gdalbuildvrt file.vrt /*.tif

I plan to use gdal2tiles to create a mosaic.

This layer will only be displayed on a single scale that covers a small number of mosaic granules.

  The problem is that if I change one piece of the original map, I will
  have to redo the entire mosaic, which will take a long time.

here Overviews: to tiles or .vrt, or both? this question was discussed, but I didn't understand how to do it.

Creating overview images for individual rasters becomes more flexible when the layer is partially updated. How?

Is it possible to create a virtual mosaic from virtual VRT files and connect it to GeoServer?


texts: Convert xyz points to topography and calculate mean slope

texts:
I am working on point data (x, y, z) in meters from origin. I have between 24 and 35 points for each plot (10mx10m), with random locations. I would like to modelise topography over the whole plot in order to calculate mean slope in 1m x 1m subplot in QGIS.

X       Y         Z
0       0          0
-1,327  7,902   -1,656
7,122  -2,309   -1,627
1,964   -5,87   0,569
-6,443  -0,306  1,184
-0,458  7,322   -1,612
0,336   6,808   -1,603
-0,164  6,036   -1,294

I looked at zone statistics, but I need a raster to use it. I also looked at GRASS to make a raster but it seems that I should have a regular grid, yet I know it is possible to get quite nice results with other softwares such as Surfer.

I am new to QGIS (and GIS in general).


texts:
I have a LLH (Longitude, Latitude, Height) point with an elevation angle and azimuth (actually it is a receiver point).

I believe I can make a line with this information.

What I want is to intersect this line with any LLH plane (constant latitude or constant longitude or constant height). For example intersect it with Latitude = 3. After the intersection I want to retrieve the LLH point where it intersected.

Is this possible? Maybe using spherical coordinates equations?


texts:
Did read "Geoserver 2.1.1 with ECW support"

but when I look at the link - http://docs.geoserver.org/stable/en/user/data/raster/gdal.html, it refers MSVC installation and other vague Window binary installs. Wish there was some clear documentation around in GeoServer.
   Can anyone assist on the exact steps, including binaries to bring ECW support for GeoServer 2.6 ?


texts: ArcGIS - Identify which buffers intersect each other

texts:
I have a dataset with buildings. I want to calculate which buildings are within 25 meter distance of each other. Therefore, I calculated for each building a 25 meter buffer around the building. Then it is with the spatial join tool easy to calculate how many buffers intersect. This gives a count of how many buffers are interesected.

However, it only provides how many buffers are intersected and not which buffers are intersected. While I want to know which buffers are intersected. In other words, if buffer A intersects buffer B I not only want to know that the count of intersecting buffers is 2, but also that it intersects buffer B. Also see the added picture:

Is there a tool or function in ArcGIS (Pro) that I can use for this?


texts: Preserving provider of original raster layer when it is modified for another resulting raster layer?

texts:
A while ago, I asked for a method to assign new QgsRasterBlock objects to a QgsRasterDataProvider objects at Assign new QgsRasterBlock object to a QgsRasterDataProvider object. The reason was for using only PyQGIS methods to manipulate raster layers avoiding GDAL/OGR python module. Recently, I found out a potential solution, posted as an answer; however original provider is not preserved in original raster.

I found out that QgsRasterDataProvider missing methods in my first post were 'setEditable' and 'writeBlock'. I also found out, for avoiding QGIS crashing during each test, it is necessary to add as last line provider = None.

Following simplified version of original code looks as follow:

layer = iface.activeLayer()

provider = layer.dataProvider()

extent = provider.extent()

rows = layer.height()
cols = layer.width()

xsize = layer.rasterUnitsPerPixelX()
ysize = layer.rasterUnitsPerPixelY()

block = provider.block(1, extent, cols, rows)
provider.setEditable(True)

for i in range(rows):
    for j in range(cols):
        if block.value(i,j) == 4:
            block.setValue(i, j, 25)

provider.writeBlock(block, 1)

pipe = QgsRasterPipe()
pipe.set(provider)

rasterWriter = QgsRasterFileWriter("/home/zeito/pyqgis_data/test_write.tif")

xSize = provider.xSize()
ySize = provider.ySize()

CRS = layer.crs()

error = rasterWriter.writeRaster(pipe, xSize, ySize, provider.extent(), CRS)

if error == QgsRasterFileWriter.NoError:
    print ("Raster was saved successfully!")

else:
    print ("Raster was not saved!")

provider = None

After running above code in Python Console of QGIS, with a copy of test_sample, this one looks identical to original; as it can be observed in following image:

However, Value  Tool Plugin corroborates that it effectively changed:

When I load test_write resulting layer and test_sample_copy (from hard disk), both layers look as expected (corroborated again by Value Tool Plugin).

However, after erasing test_write and test_sample_copy and reloading both layers again, it was corroborated that test_sample_copy effectively and unexpectedly changed.

So, there is something wrong in the way I created the provider for resulting layer because modify unexpectedly the provider of original raster layer.

How can the provider of original raster layer be preserved when it is modified for another raster layer?


texts: How to call the output of one function into another in Google Earth Engine?

texts:
i have to run a nested loop in GEE. I have two feature collections. I have to copy the id of features from one featureCollection to the other if they overlap (Eg. if  feature1.contains(feature2) then copy the 'id' property of feature1 into feature2)

function getCols(tableMetadata) {
var eelist = tableMetadata.features[0].geometry.coordinates;
eelist = eelist.map(function(list_element) {
var a = ee.Feature(ee.Geometry.Polygon(list_element[0])).area(5);
var out =  ee.Feature(ee.Geometry.Polygon(list_element[0])).set('area',a);
return out;
});

}

function getCols_table3(tableMetadata){
var feat = tableMetadata.features
feat = feat.map(function(lake) {
var condition1 = ee.Feature(feat).contains(out);
//return condition1;
var id = lake.properties.Name
ee.Algorithms.If(condition1, ee.Feature(out).set('name',id),lake)
return id;
})
print(x)
}

As can be seen, i have to call the output of getCols function (out) into getCols_table3 function. How to get this working or is there any other way to do it?


texts: How to remove period, comma, symbols using field calculator?

texts:
I want to delete . , # in attribute table using field calculator (VB Script or Python).

How can I remove these using this example address: N. First St., Unit #1  (I don't need city or state name)

I checked several websites, but I couldn't find the clear answer.

How to remove comma from combined fields which should be null?

http://www.geospatialanalyst.com/search/label/field%20calculator


texts: Combining several rasters before r.surf.contour?

texts:
I have been trying to generate an elevation model from contour lines using first v.to.rast.attr and then r.surf.contour.  Generally, it works pretty well, execpt for one issue.  My data contains a lot of sea without contours, and r.surf.contour spends a lot of time in the sea region where there are no pixels in the raster generated from r.to.rast.attr. Actually, I'm running one now on a reasobly large area, and after 24 hours, it is at 70%.

The solution for me would be simple.  I have sea polygons (and even lake polygons with elevation). I could generate a separatr raster for that using v.to.rast.attr.

But then I need to combine the two rasters into a single raster before running r.surf.contour.

How do I do that?


texts: Getting weighted average for drive times?

texts: I have a closest facility network analyses from the centroid of county to the closest medical facility.  What's the best method to get the weighted averages of these drive times, using population as the weight.  I am snapping all facilities and centroids to the road network, so now I am getting ridiculous averages like 6 hours.  It is correct, but not feasible.


texts: Replacing cyrillic symbol in attribute table using python?

texts: I've tried searching for an answer and I've already seen some similar themes here, but I still haven't been successful in replacing Cyrillic symbols in an attribute table, which is why I'm asking for help. The aim is to find a Cyrillic symbol (if it is in a field) and then change it, otherwise leave other non-Cyrillic characters as they were.


texts: Mapbox gl : How to perform a filter in a polygon?

texts:
I want to make a filter on the geometry of my layer source vector.

var polygone = .....
var filter = polygone.reduce(function (memo, coord) {
    memo.push(coord);
    return memo;
}, ['in', '$coordinates']);
map.setFilter(layer, filter);

But I can not figure out how to apply the filter. Can someone help me?


texts: Arcpy UploadServiceDefinition ignores folders and groups

texts:
I am using Esri's guidance for arcpy.UploadServiceDefinition_server (http://desktop.arcgis.com/en/arcmap/10.6/tools/server-toolbox/upload-service-definition.htm)

I can successfully upload a service definition to my organisation's ArcGIS Online. However it always only appears in my root content folder and it is not shared with the group I have specified. My code is below. I have tried this in both Python 2.7 (ArcMap 10.6) and Python 3 (ArcGIS Pro 2.3) and get the same results.

import arcpy
arcpy.env.workspace = "C:/arcgis"

# Set local variables
inSdFile = "Data_Test.sd"
inServer = "My Hosted Services"
serviceName = "Feature_Data"
in_folder = "Habitat management"
in_group = "Habitats Group"

# Execute UploadServiceDefinition
arcpy.UploadServiceDefinition_server(inSdFile, "My Hosted Services", serviceName, "", "EXISTING", in_folder, "", "OVERRIDE_DEFINITION", "SHARE_ONLINE", "PRIVATE", "NO_SHARE_ORGANIZATION", in_group)

print ("Uploaded service")

I have checked and triple checked the names of the group and the folder, capitals/lowercase, and both are definitely correct.

I found this reported bug for Pro: https://community.esri.com/thread/228929-arcgis-pro-23-sharing-module-error But nothing to suggest the ArcMap version wouldn't work.

I'm really not keen on having to learn Jupyter Notebooks/the ArcGIS API for Python just now. I'm only just getting to grips with ArcPy!

Does anyone have any other suggestions on how I can work around this? Is there a way to update the group in ArcPy after service definition upload?


texts: Does it make sense to compute overlap between standard distance circles?

texts:
I have two layers:

Points showing locations of field camps across a region
Points showing locations of study sites across the region

I have these for multiple years and want to map how the spatial coverage of camps overlaps with the spatial coverage of field sites over time.
Does is make sense to compute standard distance circles for both sets of points for each year, and then compute the percent overlap between the two circles?
The idea would be that if we saw percent overlap increasing over time, it would indicate the spatial dispersion of study sites would be matching the dispersion of field camps.


texts:
When I open QGIS I get the following error:

Couldn't load plugin 'rastertool' due to an error when calling its classFactory() method

ImportError: cannot import name 'griddata' from 'matplotlib.mlab' (C:\OSGEO4~1\apps\Python37\lib\site-packages\matplotlib\mlab.py).

I downloaded the last version of QGIS 3.12.1 'București' for windows 10. Actually, I downloaded the OSGeo4W Network Installer (64bit).

I am not familiar with python, so could you please help me how to solve it and install it in python?


texts: Reclassifying a field in vector files in ArcGIS

texts:
ArcGIS has a reclassify tool that works with Raster files only.
Is it possible to have the same functionality for a vector file?

On the basis of one of the fields in a feature class, the tool should:

Add a new field in a new file or in the same feature class with the new re-classed values.
I know this can be done using a look up table (LUT) and then joining the two tables. But I want this tool to go inside a model so that the user can change the values again and again using the user interface.


texts: Finding which areas camera can view from certain point inside circle of known radius using ArcGIS Desktop?

texts:
I am trying to find which areas a camera can view from a certain point inside a given circle (known radius).

I tried to use the Viewshed tool Arcmap provides in order to do that. I read here that I have to use additional options in order to define the radius and the offset.

So I created a point feature class as my camera's position. I chose the WGS_1984_Web_Mercator_Auxiliary_Sphere projection in order to have units in meters and I add one point as my observer point (camera). Then in the attribute table I added two extra fields OFFSETA and RADIUS2 and set the values to 1.5 and 1500. I suppose that the units is in meters because of my projection selection. Am I right?

The DEM file I use is in the WGS84 Geographic Coordinate System meaning that its units is in decimal degrees. Does this make any difference? I mean does the tool transform meters to decimal degrees or the opposite automatically?

Then I used Viewshed tool. The result had ignored the radius value and in the output raster there were areas away from 1500m. I tried using different values for RADIUS2 but nothing changed. I also tried it without the OFFSETA field supposing that there was something wrong with this value but again nothing changed my output.

Am I missing something?

I am using ArcGIS Desktop 10.

I think I dont insert the types of optional values correct. Should they be integers, doubles or something else?
Maybe that is why the tool ingores my values and uses the default ones.


texts: Creating EVI from sentinel2 image using ArcMap?

texts:
I am trying to calculate EVI from sentinel2 image using ArcMap and I used the following equation

(2.5* (NIR/10000-red/10000))/(NIR/10000+(6*red/10000)- (7.5*blue/10000)+1)

but I get very weird result and not ranging from -1 to +1.

Can anyone help me on this issue?


texts:
We successfully show the indoor map on Azure Map .We getting a problem route navigation in indoor Azure map. can any one help me how to root navigation in Azur Map.
Is there any way to show indoor navigation using GeoJSON ,KML ,AutoCAD etc


texts: CORS issues when trying to access NASA layers from ArcGIS JS API

texts:
I am trying to bring an ImageMapLayer into an ArcGIS JS API project.  The layer is here:
https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer
I am creating the layer like this:
export const SC2Sept29 = new MapImageLayer({
    url:
        'https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer',
});

When adding it to the map, I get the classic cors error:
Access to fetch at 'https://maps.disasters.nasa.gov/ags04/rest/services/ca_fires_202008/sentinel2/MapServer/547
?f=json' from origin 'https://8080-ea244033-ed39-4cd4-86f7-6fb2cfbea40b.ws-us02.gitpod.io'
has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the
requested resource. If an opaque response serves your needs, set the request's mode to
'no-cors' to fetch the resource with CORS disabled.

I was under the impression that NASA's GIS/ESRI data is available for public use.  Are their servers not configured for CORS?  What am I missing here?


texts: Moving label to outline of polygon using ArcGIS for Desktop?

texts:
In this polygon layer (red) i try to move the label to the outline of the polygon with the Maplex Engine:

I tried to find a way to solve it in the Placement Properties but i didn't succeed.


texts: view attributes from feature service and export to CSV or copy to clipboard

texts:
I have a Geo-Processing service that generates summary statistics of an area of interest.  What I would like to know is;

Simple method to display the data in my Webpage.  Is Dgrid the recommended route?
How would I allow a user to download the attribute's as a CSV or DBF file?  I don't mind creating another Geo-Processor to handle this request, but how would I implement the data extraction to download.
Related to item two above, I need to provide access to the records for my users to do futher analysis and reporting.  How would I enable a copy to clip board function of the records?

I am working in JavaScript, with Esri API and server 10.2.2 REST.


texts: Find features within given coordinates and distance using MySQL

texts:
I have a MySQL table with user name, latitude and longitude of the user.

I would like to get a list of users who are inside the circle or square of a given latitude and longitude with given distance. For example, my input Lat = 78.3232 and Long = 65.3234 and distance = 30 miles. I would like to get the list of users who are inside 30 miles distance from the point 78.3232 and 65.3234.

Is it possible to solve this with single query? Or can you give me a hint start solving this query?


texts: Retrieving additional dimensions from NetCDF through GeoServer

texts:
I am working with NetCDFs through the NetCDF extension for GeoServer.
I have additional dimensions within the NetCDF that I can see through ncdump and ToolsUI, but I can't figure out how to retrieve that data.
The data does not have lat/lon associations, it is simply an array of floating-point numbers.

How could I retrieve this NetCDF data through GeoServer?


texts:
I'm working on integrating QGIS and PostGIS, but looking for a way to force a layer reload. I don't need it to be automated -- I'm happy to run a command every time I want to refresh the map.  The comments on this question:

How to refresh the attribute table of a layer after editing the table in the DB-Manager?

Suggest that layer.dataProvider().forceReload(); is one option, but when I open Plugins > Python Console and run that I get an error:

layer.dataProvider().forceReload();
Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'layer' is not defined

I thought maybe I needed to use the name of my layer, but that didn't fix it:

example.dataProvider().forceReload();
Traceback (most recent call last):
  File "<input>", line 1, in <module>
NameError: name 'example' is not defined

Am I misunderstanding that suggestion? Is there another way to accomplish this in the python console?


texts: Not able to render simple marker render on feature layer

texts:
Can you please take a look at this demo and let me know why I am not able to add the simple render / Simple Marker to the map for feature layers

<script>
require([
    "esri/map",
    "esri/layers/FeatureLayer",
    "esri/renderers/SimpleRenderer",
    "esri/symbols/SimpleMarkerSymbol",
    "esri/symbols/SimpleLineSymbol",
    "esri/Color",
    "dojo/domReady!"
  ],
  function(
    Map,
    FeatureLayer,
    SimpleRenderer,
    SimpleMarkerSymbol,
    SimpleLineSymbol,
    Color,
  ) {

    var map = new Map("map", {
      basemap: "streets",
      center: [-82.44109, 35.6122],
      zoom: 17
    });

    var featureLayer = new FeatureLayer("https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0");

    featureLayer.setRenderer( new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 10,
    new Color([0,255,0,0.25])));

    map.addLayer(featureLayer);

  });
</script>


texts: Batch reclassifying rasters in folder using ArcPy?

texts:
I am very new to python. I am using ArcGIS 10.0. I am trying to batch reclassify rasters in a folder and put the outputs into the same folder but with a new name(trying to do this using outputPrefix). this is the script I made:

import arcpy
from arcpy import os
from arcpy.sa import *

inputDir = "E:\BLSK_HSI\practiceLC"
outputDir = "E:\BLSK_HSI\practiceLC"
outputPrefix = "Rec_"

rasList = arcpy.ListRasters()
for raster in rasList:
    reclassField = "VALUE"
    remap = RemapValue([[11,1], [21, 5], [22, 3], [23, 2], [24, 1], [31, 6], [41, 3], [52, 3], [71, 3], [82,3], [90,4], [95, 4]])
    outReclassify = Reclassify(raster, "VALUE",remap, "NODATA")
    outReclassify.save(outputDir)

and I get this error message:

Start Time: Wed May 13 12:06:07 2015
The input raster minimum (-3.1652371883392334) is out of range.
To ensure a correct reclassification, edit ranges or use a different      precision           settings in the Reclassification dialog box.
The input raster maximum (4.0050506591796875) is out of range.
To ensure a correct reclassification, edit ranges or use a different precision               settings in the Reclassification dialog box.
ERROR 010414: Error in creating a Raster from a geodataset.
Failed to execute (Reclassify).
Failed at Wed May 13 12:06:07 2015 (Elapsed Time: 0.00 seconds)

I calculated statistics, built pyramids, etc. Is there something inherently wrong with my code?


texts: Moving marker smoothly along two GPS coordinates

texts:
I am trying to animate a marker from one GPS coordinate to another. I am currently using Google Maps to achieve this and, although my algorithm seems right, Google Maps is doing a poor job at converting the GPS position to the right pixel on the map, which makes the animation not so smooth when the map is zoomed out. Zoomed in, it is very smooth and that's why I suspect the "zig zag" is caused by Google doing a poor LatLng->pixel conversion.

The best solution would be for me to deal directly with the markers (x,y) pixel coordinates but there is unfortunately no public method for assigning pixel location to a marker.

The code is available here: http://dev.syskall.com/map/

How would you make the animation smoother when zoomed out? Alternatively, I would be interested in using an equivalent to Google Maps that would let me accomplish what I'm trying to do if it isn't possible with Google Maps.

PS: I am not sure if this is the right place to ask my question, let me know if it isn't the case.


texts: How can i import raster image to GRASS GIS without losing RGB Values?

texts:
I am using GrassGIS 6.4.2, How can I import raster data to GrassGIS without losing RGB Values?

The raster image format is TIFF, the below commmand is using to import raster image:

r.in.gdal input=C:\Users\Administrator\Desktop\renjith\satellite\14feb06053537-s2as-053712789010_01_p004.tif

After importing raster image I am getting like this


texts: How to check map tiles are loaded in OpenLayers?

texts:
How to check if the map tiles are loaded?

I need to know whether all map tiles are loaded on to the OpenLayers map as html contents.... Is there any method to find out or function in openlayers to find out for how much percentage the map tiles are loaded.......


texts: What is causing this distortion in QGIS georeferencer results?

texts:
When importing a JPG map using QGIS's georeferencer plugin, the resulting map layer is distorted and does not look anything like the map that I am trying to import. I can't work out what is causing this map distortion.

Screenshots of the steps


texts: How to get a sf with line segments from a data table?


texts: Raster to polyline with only one feature for each unique value

texts:
When I convert my raster layer to a polyline layer, the cells that are located very close to each other (even with different values) are connected to each other which is unwanted and very hard to get rid off:

It seems to me this won't happen if only the cells with the same value were connected to each other to create a feature. How can I do that? I already tried creating points for each cell and then making a polyline layer from them which didn't work because of the random ordering of the created points:

I've used ArcGIS 10.2.2 for these images but I also use  QGIS, GRASS, and R.


texts:
This might be a beginners question, but I could not find an answer on the internet.
I drew a couple of polygons in a vector layer and I am trying to get some basic geometric information into my attribute table (e. g. coordinates). I added a column with the value §geometry, which is as "Returns the geometry of the current feature". The column however is filled with NULL-values. I tried all the different field types, but the output always is NULL.

Can anybody tell me, what am I doing wrong?


texts:
I am trying to take advantage of the new georeferenced PDF export in QGIS 3.10 but the checkbox is grayed out with a message that "GeoPDF creation required GDAL version 3.0 or later".

The answers from Create Geospatial PDF (GeoPDF) is greyed out in PDF export options in QGIS 3.10 include a workaround for windows as well as claims that the newest releases and nightly builds are now built against GDAL 3.  However, I downloaded the mac nightly from here and it still uses GDAL 2.4.1.

Can anyone tell me how to get the necessary versions on a Mac?


texts: Retrieving routedescription geometry as GeoJSON

texts:
I'm building a small web-map and would wich to display a polyline representing a specific route via roads. With leafletjs it is easy to display the geometry on/over the map. So that's not the problem.

I'm looking for a webservice where I can 'download' the route as a polyline/Multipoint.

Does anyone know if this exists?


texts:
I cannot download data without a connection for use in field work.esri Basemaps
Error
!  Unable to load X https://gisportal.gedco.ps/portal/apps/preplanned/undefined/Setup MapAre mapArealtemid = 50bf004bad7749dd95a0769075e06a80 & tile Services =% 5B9 status: 404


texts: Test for spatial randomness with Ripley's K or L function in R

texts:
I have a spatial point pattern that I would like to test against complete spatial randomness.
I managed to plot a Ripley's K function for my data and a function for a random distribution with a confidence envelope. From this I can infer whether or not my data deviates from spatial randomness.

However, I wonder whether it is possible to statistically test these two functions against one another (and thus get a p-value that indicates the deviation from a random distribution)?


texts: Accessing GeoServer 2.8.0 on Debian 8 using Tomcat 8?

texts:
Not been able to access my GeoServer with JavaScript.  The Leaflet code running natively works in other JavaScript/HTML pages which connect on-line GIS servers.  Added the following to web.xml:

<context-param>
  <param-name>ENABLE_JSONP</param-name>
  <param-value>true</param-value>
</context-param>

Used this tutorial:  http://docs.geoserver.org/stable/en/user/gettingstarted/shapefile-quickstart/

All I get are the zoom out and zoom in controls and no map.  The OpenLayers preview works on GeoServer.

Can you help with the code below?

  <title>A Leaflet map!</title>
  <link rel="stylesheet" href="http://localhost/css/leaflet.css"/>


texts: Combining two overlapping rasters (combine cells, retain both values) using ArcGIS for Desktop?

texts:
Using ArcGIS 10.2, I am trying to combine two rasters which are identically overlapping in shape and extent, but with different values and counts.

As an end result I would like each cell to retain values from both rasters, so I can compare the two values within each cell.

Does anyone have an idea of how to accomplish this?

I still haven't been able to accomplish my goal. let me clarify. My end goal is to have a table that does a cell by cell comparison, such as:

Value 1:       2,  5,  7

Value 2:       3,  3, 9

Difference:    -1, 2, -2

I have spatial analyst, and I have been able to find the difference, but am unable to compare the differences to the original values because the object ID is based on values not individual cells.

I was able to accomplish my goal, by converting the rasters to polygons and doing a spatial join. I realize my question was misleading by inferring I needed a raster to store the data.


texts:
I am writing a script which supposed to get a value for a field from user and use that value for a definition query.

If I write it without variable, it works:

my_Layer.definitionQuery = "IncidentName = 'Hospital Rd, Kurri Kurri'"

If I this, it does not work:

AA = 'Hospital Rd, Kurri Kurri'
my_Layer.definitionQuery = "IncidentName = AA"

The definition query is set to string AA, and not the value set I assigned to it.


texts: Opengeo Geoexplorer WMS source singleTile property?

texts:
I was wondering whether there is a way to control what layers should be fetched as a single tile in a GeoExplorer composer application?

OpenLayers.Layer.WMS objects have a singleTile property but it does not appear defined for gxp.plugins.WMSSource for instance, so adding the property to a source or a layer in composer.html does not appear to do much.

If the line "var singleTile = false" in WMSSource.js is changed to true then every layer added via Add Layer are single tile, even if the source they belong to (defined in composer.html) is of ptype gxp_wmscsource and the WMS request is "tiled=true", perhaps because WMSCSource extends WMSSource.

If I understand correctly, T.Schaub indicated sources should have a singleTile property sometime in the future here: https://getsatisfaction.com/opengeo/topics/opengeo_suite1_9_2_community_edition_issues_geoexplorer_white_background

That would allow some control: all layers needing to be served a single tile could be put under one source. Right now things do not appear to work that way, however, so if there is wisdom for some sort of clarification out there I would be glad :)


texts: Finding distance between two points and land cover in %?

texts:
I am trying to use ArCGIS.

I was using digimap to work out a 2km buffer from a sample point, I managed to do that and saved the file. I also saw some land cover types on the left hand side of Digimap under map content: showing neutral grassland, improved grassland etc color coded. I am trying to workout the landcover type percentage in that 2km buffer zone but I cannot do that on Digimap. When I upload it onto ArcGIS, I can open it by logging online, but I am completely lost from there! Please can someone show me how to do this?

Also I am trying to work out the distance between two points ( I have grid references ) on arcGis so that I can display a picture.


texts: Add raised features to digital terrain model in QGIS

texts:
I have a DTM onto which I need to 'stamp' a series of raised embankments.

The DTM is a raster grid (in m above sea level) and the embankments are polylines containing the crest height (also in m.a.s.l.) of each embankment.

I want to edit the DTM cells falling under the polylines to take the elevation values from the polylines, effectively stamping these onto the dtm.

What would be the most efficient method of doing this in QGIS?

Edit:
In ArcGIS I would have done this in archydro tools (using the build walls function) or by using a Con and IsNull function in calculator.


texts:
I'm using cartodb for a project. I read the documentation yet I can't find a solution.
Indeed, I need to be able to see the name of a node (which is on the name field of the bdd) without clicking on. Is that possible ?

And I have another question. In the search box, is that possible to look for one of our node ?

Thanks a lot

Sincerely
A.H


texts: Feature Layer is not showing the points on the map

texts:
I have a simple feature layer. The points will show up if I put the URL in a DynamicMapServiceLayer, but I need to use maptips, so that will not work. Below is my relevant XAML.

<esri:Map x:Name="MyMap" Background="#FFE3E3E3" WrapAround="True" MouseClick="MyMap_MouseClick" MouseRightButtonDown="MyMap_MouseRightButtonDown" Extent="-9834972.92753924,4441899.425293319,-9833977.88119163, 4442762.485358352">
                <esri:Map.Layers>

                    <esri:ArcGISTiledMapServiceLayer ID="MyLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
                    <!--<esri:ArcGISLocalDynamicMapServiceLayer ID="Calvert_City" Path="C:\Users\jessical\Documents\ArcGIS\CalvertCity_Test.mpk"/>-->
                    <!--<esri:ArcGISDynamicMapServiceLayer  ID="Calvert_City" Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer">

                </esri:ArcGISDynamicMapServiceLayer>-->
                    <esri:FeatureLayer ID="Calvert_City" Url="http://localhost:6080/arcgis/rest/services/CalvertCity_Test_2/MapServer" Renderer="{StaticResource MySimpleRenderer}">

                        <esri:FeatureLayer.MapTip>
                            <Border CornerRadius="10" BorderBrush="Black" BorderThickness="2" Margin="0,0,15,15" Background="{StaticResource PanelGradient}">
                                <StackPanel Margin="7">
                                    <TextBlock Text="Content" FontWeight="Bold" Foreground="White"  />
                                    <StackPanel Orientation="Horizontal" >

                                    </StackPanel>
                                </StackPanel>
                            </Border>
                        </esri:FeatureLayer.MapTip>
                    </esri:FeatureLayer>
                </esri:Map.Layers>


texts: Python: Geopy's Nominatim reverse geocoding: Access Type (e.g. amenity)

texts:
I have some corrdinates (lat/long) and I want to get further information on them. When using the nominatim homepage, I get quite a good overview of the available information, which exist. But when using my python code, I only get the basic address information. In the end, I want to add especially the amenity information, which I will later on use to filter my data.

The picture shows, what I want (in yellow): https://i.stack.imgur.com/Gn2C6.png

And his is what I do in python and what I get:

p = geopy.point.Point(48.705293, 8.984022)

r = Nominatim(user_agent="my-application").reverse(p)

print(r)

>>Logistikfläche, Calwer Straße, Sindelfingen (Stadt), Sindelfingen, Landkreis Böblingen, Baden-Württemberg, 71063, Deutschland


texts: Create routing graph (as software objects) from roads Shapefile using pgRouting

texts:
Intro: It's easy with OSM XML to run my software algorithm converting the XML to my custom software objects representing routing graph: You have ways with easy links to the (ordered) nodes constructing the segment with lat/lon.

Problem: Usually one starts with data as Shapefile, so the easy solution is to use Shape->OSM converter. I want to work directly with the Shapefiles.

Question: It's easy to import Shapefile to PostgreSql and using PostGis to query bounding boxes of the coverage based on geospatial logic. The next step is to use pgRouting in order to parse the raw Shapefile data (roads) to software objects representing the routing graph, for example in Java something like:

class Node() {
    double lat;
    double lon;
    int nodeId;
}

class Segment() {
    LinkedList byOrderNodes;  //of type class Node above
    int segmentId;
    boolean oneWay;
}

class graph() {
    ArrayList segments;  //of type Segment above
}

How to achieve this with pgRouting - What queries and functions to use?

Note - I don't mind between Python/Java/etc.


texts: Adding multiple layers from an array in OpenLayers?

texts:
I have a lot of OpenLayers layers that change every day so instead of having to create, and change a long list of these:

var layerone = new OpenLayers.Layer.XYZ("mylayer1", "mylayer1/${z}/${x}/${y}.png", { });

var layercool = new OpenLayers.Layer.XYZ("mylayer1", "mylayer1/${z}/${x}/${y}.png", { });

etc

I'd like to first make an array of layer names:

var mylayers = new Array("layerone","layercool","layeryo","layerhello");

and then create all these layers in a for loop, something like this:

var length = mylayers.length;
for (var i = 0; i < length; i++) {

mylayers[i] = new OpenLayers.Layer.XYZ("mylayers[i]", "mylayers[i]/${z}/${x}/${y}.png", { });

}

How do I first of all create unique var names for each layer in the foor loop and then do the loop? I read somewhere to use window[layers[i]] = new OpenLayers.Layer... or maybe eval? but I'm not sure how to access these later on when doing the map.addLayers();


texts: Which image is shown ontop whilst mosaiking with the FME Rastermosaicker?

texts: I have two Images which overlap and I want to mosaic the two images. One of the images has nodata values in this overlapping area and the other does not. I obviously want the overlapping area to be image data and not nodata values but how do I define which data gets written to the output file? In ArcGIS one can set either match, last or first. But I don´t see a similar option with FME2014.


texts:
I am using pgRouting version 2.1.0.
I am using pgAdmin III.

I have created a street network using Anita Graser's guide: https://anitagraser.com/2013/07/06/pgrouting-2-0-for-windows-quick-guide/

But now I have to create a topology using pgr_createTopology and it seems to error out saying the table name can not be found.

The error message:

NOTICE:  pgr_createTopology('street_network',1e-08,'geom','gid','source','target','true')
NOTICE:  Performing checks, please wait .....

NOTICE:  ----> PGR ERROR in pgr_createTopology: Table street_network not found

HINT:    ----> Check your table name

CONTEXT:  SQL statement "SELECT _pgr_onError(err, reportErrs, fnName, 'Table ' || tab ||' not found',' Check your table name', 'Table '|| tab || ' found')"
PL/pgSQL function _pgr_gettablename(text,integer,text) line 64 at PERFORM
SQL statement "select * from _pgr_getTableName('street_network',2,'pgr_createTopology' )"
PL/pgSQL function pgr_createtopology(text,double precision,text,text,text,text,text,boolean) line 48 at EXECUTE statement

NOTICE:  Unexpected error raise_exception

The table name does exist though, is there any fix to this?

Code I am using:

select pgr_createTopology('street_network', 0.00000001, 'geom', 'gid');

I have also tried to force my search path using:

set search_path = scratch, public;


texts: Calculating shortest distance between points within polygon using QGIS?

texts:
I performed a transect in which I sampled several animals. The location of these animals are represented by a point shapefile. I am interested in calculating a pairwise matrix of distance (in meters) between all sampled animals. These distances will be used subsequently in spatial autocorrelation analyses to assess animal's dispersal capability (using genetic data).

However, calculating the euclidean distance is not adequate for my case because  there is a river at north of these locations and it is considered to be a barrier to movement for the sampled animals. Thus, I rendered a shapefile polygon containing all these points and I intend to calculate the pairwise distance of points within the borders of this polygon. I uploaded a figure to help you understand exactly what I want. This figure contains 4 sampled locations (blue dots) and a yellow polygon from which I want to calculate the minimum distances. The red line represents the euclidean distance between the pair of points displayed. However, this distance to is not realistic because the river is in-between. The green line within the polygon is roughly what I want to estimate (basically a minimum path distance).

Any idea of how to do this with shapefiles or is it only possible to do with rasters?

There is other topic "Length of line on specific point (from point layer)" with a similar problem but that does not do exactly what I want. I have many more locations (besides the four shown) and calculate distances along the border of the polygon would not be realist.


texts: Opening a pop up photo correctly on first click or hover

texts:
My website being developed with others is here:
https://www.victoriasforestryheritage.org.au/
I have used the qgis2web plug in to put three other maps on the site,
https://www.victoriasforestryheritage.org.au/showcase/maps.html
but this one at:
https://www.victoriasforestryheritage.org.au/maps/forestlocations/locationtest3/index.html#7/-36.719/146.133
is the first with photo popups, and it is in very draft form. All photos are 600px by 400px or vice versa.
If you open this map and hover on the photo point at, for example, Stringers Knob in the far East, you will see that one hover opens the photo but the photo "frame" does not open fully. A second hover will do that and the photo displays properly until the page is closed.
Using Inspect I find that this code:

                        	                        Stringer's Knob

                        <img src="./LocationPhotos/vfh0137ed.JPG" <="" td="">

sets a style width of 103px. I know if in Inspect I remove this style and insert auto for the width in the relevant css the popup works correctly for me - I think.
What I cannot do, because of my limited coding understanding, is find these style statements and remove them etc to get the output I want - a final display on first hover.