texts:
I try to run a QGIS plugin in QGIS 3.4 that uses processing to execute algorithms in a row:

    params_snap = {
        'input' : input,
        'type' : 1,
        'tool' : 1,
        'threshold' : 0.000095,
        'output': 'memory:',
        'error' : error,
        'GRASS_OUTPUT_TYPE_PARAMETER' : 2
    }

    snap = processing.runAndLoadResults('grass7:v.clean', params_snap)

    params_break = {
        'input': snap['output'],
        'type': 1,
        'tool': 0,
        'threshold': 0,
        'output': output,
        'error': error,
        'GRASS_OUTPUT_TYPE_PARAMETER': 2
    }

    processing.runAndLoadResults('grass7:v.clean', params_break)

First the v.clean snap algorithm runs. The result is saved in a temporary output layer. This algorithm work without any problems. Afterwards I try to run v.clean break and the input should be the temporarily saved output layer of the first algorithm. But I get the error: Could not load source layer for input: memory: not found.

If I use a filepath instead of 'memory:' in the first output everything works fine and the second algorithm can access the first algorithms output. So I assume that the problem is the 'memory:' statement, but all the sources I found tell to use it.

Edit:

I checked the temporary folder (C:\Users\USER\AppData\Local\Temp\processing_83c42fa467d2461eb67590c719fc22aa\grassdata\temp_location\PERMANENT\vector) and the layer gets successfully created when I run the code. But since it is not located directly in the path C:\Users\USER\AppData\Local\Temp\ I wonder if the path the temporary files are created in is the right one?


texts: Merging vector layers via python in QGIS 2.18.1

texts:
I am currently using the following code to merge two vector layers together:

def append_layers(layer1, layer2, output):
    from processing.core.Processing import Processing
    Processing.initialize()
    import processing.tools
    processing.tools.general.runalg("qgis:mergevectorlayers", layer1, layer2, output)

append_layers(layer1.shp, layer2.shp, output.shp)

This seems to work fine in QGIS 2.14, however it fails in 2.18.1 with the following message:

Error: Wrong number of parameters
ALGORITHM: Merge vector layers

Is there something that has changed between 2.14 and 2.18? Or am i just missing something really obvious?


texts: Overlaying lat/long graticules on projected map using QGIS?

texts:
I am using an equal areas projection of North America and would like to overlay a lat/long grid.

I can do this in the print composer, but only for the coordinates.

Can QGIS do a distorted grid for lat/long coordinates over a projected map? If so, how?


texts: OpenLayers drag control returns wrong XY

texts:
I am trying to use a Drag Control in a web GIS. My problem begins when I finish the 'move' of a point. That is, originally the point has an XY like -8.308567019533697 and 41.376871762432685, displaying correctly in the map. After the move, the point has an XY like 49.01610355274739 and -293.0306348131995, displaying very far from the correct place.

My map:

var opcoes = {units: 'm', projection:
       epsg_3857,restrictedExtent:extent_maximo,maxExtent:
       extent_maximo,controls: []};

map = new OpenLayers.Map('map',opcoes);

The layer of the drag control:

var localizador  = new OpenLayers.Layer.Vector("Localizador", {
        isBaseLayer: false,
        styleMap: new OpenLayers.StyleMap({
                'default': est_loc_def,
                "temporary": est_loc_temp
        }),
        displayInLayerSwitcher: false});


texts:
I have developed a tool in arcobjects on Visual studio 2010,
the tool works fine but once installed my ArcMap drawing the map (refreshing) and printing slows down..

I have used ITopologicalOperator in the program.

Should I release any com objects here if yes what object should I release

Please guide.


texts: Label appears completely different in Layout-view than in exported image in QGIS using maptiler plugin

texts:
I'm using the maptiler vector tiles plugin in QGIS to have a base map that I can style a bit. There is a problem however.
I'm seeing this in the layout-view:

I don't like that the line to the overview map is crossing the label. I also don't know how to resolve this one. I tried manually moving the label. But as far as I know I can't set this helper-line to be an obstacle, can I?
But what I want to change is the symbology of the country names in the exported PNG.
The exported map looks like this:

There must be an option to change that, but I just don't know how. I can go in the label properties dialog of the 'Bright' map tiler layer, but there I don't know what to change specifically. I'd really like to understand what I'm missing here.


texts: Extract Pixel Values for Multiple Polygons and Images

texts:
I have 21 polygons and for each polygon I want to extract the pixel values inside them for Sentinel 1 images from 2017-01-01 to 2017-06-30.

The example below shows how this is done for one polygon. I want this for 21 polygons.
Extract complete pixel values inside a geometry

My expected output is a csv with columns polygon name, lat, lon, VH, VV and system:time start dates.

This is what I have so far.

//Location Data
var test= loc;
print(test);
Map.centerObject( test, 10);

// SENTINEL 1 DATA
var pol = ['VV', 'VH'];
//Load Sentinel1 image location around location 1
var Sentinel1= S1.filter(ee.Filter.eq('transmitterReceiverPolarisation', pol))
                    .filterMetadata('instrumentMode', 'equals', 'IW')
                    .filterDate('2017-01-01', '2017-06-30')
                    .filterBounds(test)
                    .select(['VH', 'VV'])
                    .filterMetadata('resolution_meters', 'equals' , 10).first();

Map.addLayer(Sentinel1, imageVisParam, 'single_image');
print(Sentinel1)

// generate a new image containing lat/lon of the pixel and reproject it to Sentinel1 projection
var coordsImage = ee.Image.pixelLonLat().reproject(Sentinel1.projection())
var joinedImage = coordsImage.addBands(Sentinel1);
print(joinedImage)

// extract lat/lon coordinates as a list
var newfc= test.map(function(feat){
var coords = joinedImage.reduceRegion({
  reducer: ee.Reducer.toList(4),
  geometry: feat.geometry(),
  scale: 10

}).values().get(0)

coords = ee.List(coords)

//Export as CSV
var myFeatures = ee.FeatureCollection(coords.map(function(el){
  el = ee.List(el) // cast every element of the list
  var geom = ee.Geometry.Point([ee.Number(el.get(0)), ee.Number(el.get(1))])
  return ee.Feature(null, {'VH':ee.Number(el.get(2)), 'VV':ee.Number(el.get(3)),
  'Long':ee.Number(el.get(0)),'Lat':ee.Number(el.get(1))})

}))

return myFeatures
})

var table= newfc.flatten()

print(newfc);
print(table)

// Export the image, specifying scale and region.
// Export the FeatureCollection.
Export.table.toDrive({
  collection: table,
  description: 'TRIAL',
  fileFormat: 'CSV'
});

//_____________________________________

Link to locations table: https://code.earthengine.google.com/?asset=users/rawailnaeem/test

Right now it is working fine for 1  image. I need this for each image in the imageCollection, not a mosaic image. So basically my question is how to loop this function over the entire image collection?


texts: Converting mxd to earlier version using ArcPy?

texts:
I am running arcmap 10.2.2 but need to open an mxd saved using 10.3. I do not have access to 10.3. I have an arcpy tool which will do the conversion but it is not working from within 10.2.2.

Does anyone know if it is possible to do this from within 10.2.2. I get an error message saying I do not have write access to the file.

The script is as follows:

import arcpy, sys, os, string

mxdList = string.split(arcpy.GetParameterAsText(0), ";")
outloc = arcpy.GetParameterAsText(1)
version = arcpy.GetParameterAsText(2)

suffix = "_"+ version.replace(".", "")

for item in mxdList:
    item = item.strip('\'')
    mxd = arcpy.mapping.MapDocument(item)
    base = os.path.basename(item)
    base = os.path.splitext(base)[0] + suffix + os.path.splitext(base)[1]
    mxd.saveACopy(outloc + os.sep + base, version)
    arcpy.AddMessage(os.path.basename(item) + " has been converted")


texts: How to add vertex to an existing polyline in QGIS using python?

texts:
I have a Polyline and would like to add new vertex before start point or end point or at any part of it by using python in QGIS.

How can I do that?

I have used approach of following link:

How to add vertex to an existing polyline programatically?

However, when I did its procedure I got a polyline like this:

But I don't want the line to be snapped; just only to insert vertex.


texts: Operations Dashboard's Embed Content clickable

texts:
I want to have images in my dashboard such that I can zoom into those images. I realised that embed content don't have a functionality as such, so I am looking for a way so that I can make my images clickable which will allow them to open into a new tab. From there I can easily zoom in/out.

Currently Operations Dashboard only takes image URL as parameter. All I need is to add an anchor tag with same URL and target="_blank" attirbute.

How can I do this?


texts:
I'm working with this
mosaic from Pluto.
It is projected in simple cylindrical.
I need help to change, using PyQGIS, the center of the projection to the coordinates of a specific point, or to a coordinate related to a point plotted in the mosaic.


texts: pyqgis plugin error list has not attributes

texts:
hello I create a QGIS plugin using pyqgis and I have two buttons in my plugin window button 1(run perform_search(self) function) and button 2(run select_feature(self) function).

to work button 2 function must be first running function from button 1 because that function from button 2 need found list where create that list in function from button 1.

but if I run button 2 I take error ins found list :

found  has not attributes

any idea why ?

button 1 :

def perform_search(self):
    layer = QgsMapLayerRegistry.instance().mapLayersByName("layer")[0]
    ...................................
    self.found = []
    self.results.clear()
    layername='mmm'
    for feature in layer.getFeatures(request):
        abc=feature.attribute("my_name")
        self.found.append([layername,feature.attribute("my_name")])
        self.results.addItem(abc)

button 2 :

def select_feature(self):
    layer = QgsMapLayerRegistry.instance().mapLayersByName("layer")[0]
    # Deselect
    for layer, feature in self.found:
        layer.removeSelection()

    # To find extent of selected items
    centroids = []
    transform = QgsCoordinateTransform(layer.crs(), self.iface.mapCanvas().mapRenderer().destinationCrs())
    layer.triggerRepaint()


texts:
I'm trying to accurately delineate a watershed into sub-basins using dams as pour points. I'm using the hydrology toolset, but I can't seem to get rid of straight edges that are along some of the outermost watersheds. Has anyone else had this problem? Here are a few photos:

In this photo, you can see straight edges along the top, bottom, and bottom left sides of the larger watershed. The thick black line is the given watershed line. The watersheds generated using the watershed tool pretty closely follows it, except for the areas just mentioned.

This next one is a close-up of the top with the DEM I used (5 m cell size).

I think it may be that I only ran the fill tool once? If this is it, how to I check for sinks to make sure I do the right number of iterations? Would it be easier to redo this in Arc Hydro?


texts: Georeferencing in QGIS: retrieve previously georeferenced tiff and points used

texts:
I having a problem going back to a tiff I georeferenced myself then closed to improve the georeference work.

I did it manually by adding points on the map and linking them to an already georeferenced vector. Now, when I first open my tiff (name.tif) in the georeferencer then upload the point file (name.points), the tiff and the points do not match together in the georeferencer while it works perfectly fine on my vector with all the points fitting at the right place in the QGIS window.


texts:
I have a shapefile of points that each have a value A. I want to be able to create cluster regions such that if I sum value A for each point in a region, the sum of value A for each region will be equal.

Is there a way I can solve this problem with ArcPy or cluster analysis? It seems that most clustering solutions are focused on finding areas of high, low, or similar values rather than a statistic of each cluster.


texts: Hide field name and label for Surveyor and show it for Supervisor by Survey123 for ArcGIS

texts: The scenario is, add new field to xls form that represent percentage (%) of accurate collected by surveyor this field is not visible to the surveyor at the same time this field will be visible to the Supervisor so that validate and evaluation the accurate collected data from the surveyor and type the percentage of data accuracy.


texts: Object: Tool or environment  not found error randomly occured in a custom Toolbox used in a Python script

texts:
I have developed a custom toolbox on ArcGIS 10.1. It has the following properties:

Name: SingleFDI
Label: SingleFDI
Alias: FFDI

In a Python script, I used arcpy.ImportToolbox to call a tool named FBFDRwMFDI in the toolbox.

TOOL_BOX_FILE_DIR = r'D:/aaa_workspace/SingleFDI/Models/SingleFDI.tbx'
arcpy.ImportToolbox(TOOL_BOX_FILE_DIR)
model_result = arcpy.FBFDRwMFDI_FFDI(r'D:/aaa_workspace/SingleFDI, str(4))

I occasionally received the Object: Tool or environment <FBFDRwMFDI_FFDI> not found error. This happened roughly once every 5 times.

I am unable to tell why it happened because it was so random!

I read the ArcGIS help document. It states in

  ImportToolbox(input_file, {module_name}),  module_name{String}: If the
  toolbox does not have an alias, the module_name is required.

I would like to know what the module_name stands for in the syntax? Is it meant to be the Alias or Name property of the Toolbox? I ever tried using the Alias property in the ImportToolbox but the same error was still occuring occasionally and randomly.


texts: GPS: what limits the _rate_ of change in altitude?

texts:
I have a GPS tracker/transmitter I use in rockets. I use it to locate and recover a rocket. I realize that Altitude is not the strong suit in GPS, and don't expect it to be really accurate. Neither do I expect the lock on a typical GPS unit to be maintained during the rapid acceleration of a rocket.

However, at apogee, and under parachute, I find that the re-locked-on GPS altitude varies enormously from the verifiable height of the rocket trajectory. A rocket descending from 5000 feet might show between 800 and 1000 feet in height, calculated as an offset from the launch pad altitude (so no, this is not local terrain elevation causing a difference). The GPS-reported altitude will rise, but slowly compared to its ability to track lateral (relative to ground) movement.

I've been told that this might be an intentional limitation of capability, to help prevent malicious use of GPS chips, but I can't find documentation of this, and think instead the chip might just be designed for terrestrial uses of GPS, and not need to track altitude change rapidly (or think that rapid altitude change in a land or sea vehicle must be in error).

Does anyone know what limits altitude rate-of-change?


texts: Multiband TIFF or .vrt to 1 band tif summing up all bands values

texts:
I've got 150 monoband raster files (with 0 and 1 values ) and I want to "fuse" or stack them as I would do it with the raster calculator :
A+B+C.....

I can manage to create a VRT file containing 150 bands but how would I transform it to a monoband TIFF with values going from 0 to 150 ?


texts: How to get wms layer's extent OpenLayers3?

texts:
Here is a part of my code:

var wms = new ol.layer.Tile({
            source: new ol.source.TileWMS({
                url: 'localhost:8080/geoserver/BEIS_WS/wms',
                params: {
                    'LAYERS':'BEIS_WS:mahalle_alan', 'cql_filter':'tmno=1453'
                },
                serverType: 'geoserver',
            }),
            opacity: 0.4
        });
        wms.setProperties({ attributes: {}, type: "exampleLayer" });
        map.addLayer(wms);

I googled but I did not find the answer, is there any way to get wms layer's extent in OpenLayers3? After I added layer, result on console is here:


texts: QGIS crash when looping through features in network analysis (dijkstra)

texts:
My script to compute distance in my network works. Now I want to loop over all features of a point layer to produce multiple distance calculations.
Just iterating over the features work of course and prints all of them correctly. When I add the rest of the script QGIS shuts down immediately after the first iteration, but I am not able to recover an error message.

for f in points_layer.getFeatures():

points_to_tie = [QgsPoint(f['longitudeO'], f['latitudeOr']), QgsPoint(f['longitudeD'], f['latitudeDe'])]

#PROGRESS:
#count += 1
#print "calculating number %s" % count

tiedPoints = director.makeGraph(builder, points_to_tie)
graph = builder.graph()

startId = graph.findVertex(tiedPoints[0])
endId   = graph.findVertex(tiedPoints[-1])
(dtree, dcost) = QgsGraphAnalyzer.dijkstra(graph, startId, 0)
print "Travel time from %s to %s is %s hours" % (f['municipOri'], f['municipDes'], dcost[endId])
del graph
del tiedPoints
del points_to_tie
del startId
del endId
del dtree
del dcost

I thought this question was a good hint, but it doesn't solve it when I delete everything at the end of the loop.
Is there an obvious mistake that I am making?


texts: How to get byte type (eg. Byte or Int16) from GeoTIFF imported into PostGIS

texts:
I have imported a raster into PostGIS, and would like to know the "byte type," ie. if the orignal GeoTIFF was a Byte type or Int16.

Is this possible to do after importing to PostGIS? If so, how? Or must it be done on the GeoTIFF file itself?


texts: Can I use a signature for more than one picture?

texts: I want to use the signature from one picture and use it in other.  Can I do this using ERDAS Imagine?


texts:
I used to use PDAL with conda environment, and in that time I used pipeline command with the simple:

 sudo pdal pipeline -i /Documents/laz2pg.txt

And that did the work.
But, now, at the moment, I have to use PDAL which is installed with Docker environment and I have trouble because I don't really know anything about docker. I find out that the command for information is:

sudo docker run -v '/home/user/Documents/projectX:/data' pdal/pdal:1.7 pdal info /data/pt.las -p 0

But If try analogy to replace pt.las with laz2pg and info with pipeline I get an error that file is not found.

I am using Ubuntu 18.04 Bionic.


texts: Allowing Add/Delete/Update of features (web application): OpenLayers + WFS and GeoServer?

texts:
I've developed a WPF application that has a custom SQL Server database and uses the Esri ArcGIS WPF API to allow users to view, edit and query shapes (features) on a custom map. Maps are created from tiles using the Bing (Quadkey) system. Users can also create multiple layers. This application has a great focus on the editing aspect. Although I use the ArcGIS WPF API from Esri, there are no other services/servers from this company being used for this solution. Layers, features and symbols are stored using custom structures.

But now I'm looking to make the transition to a web application. I've studied and tested different mapping libraries: Leaflet, OpenLayers, Google Maps API, ArcGIS JavaScript API, etc. I know about WMS/WFS and mapping servers like GeoServer and MapServer (but I don't know what would be the best match).

So, finally, my question: what would be the "best" (recommended) solution for a web application using custom (tile) maps that should have a great experience to allow users to add/delete/delete features, query, filter and save them? I know that the "best" solution can vary greatly. But what I'm really looking for is some advice from experience users that have done this.

OpenLayers + WFS and GeoServer would be a good match?


texts: Removing outliers from LiDAR point cloud using ArcMap

texts:
I have a city-wide LiDAR (LAS format) dataset that I'd like to clear of outlier points to process in ArcMap 10.7. I've identified the points using the Locate Outliers tool.
How do I use the resulting point feature class to rid the point cloud of those points?
I understand it's possible with LasTools in ArcGIS Pro, but I do not have access to it.


texts: Understanding difference between collocation and coregistration?

texts:
I'm a little confused on this topic. I need to put 2 SAR images into same coordinate grid.

In ESA SNAP tool, there are 2 options:

coregistration: Radar->Coregistration->Coregistration
collocation: Raster->Geometric Operations->Collocation

SAR images are from COSMO-SKYMED and ALOS1 missions.

What is the conceptual difference between collocation and coregistration?


texts: Erase shapefile (polygon) area from GeoTIFF

texts: I've been reading several posts to do so and one option would be to use gdalwarp -cutline, but I would need to keep what it is NOT inside the polygon area. GDAL or any command-line tool does that?


texts: Measure distance for spatialLine in R returns bad value


texts:
I'm a bit confused about how to use polygonize (raster to vector). Particularly what to put in the field name box. The documentation states that it

"Defines the field name in which the attributes of the connected regions are entered"

What does this mean?

And what does use mask do? It's not mentioned at all (it seems optional, but I'm still curious)


texts:
I'm wanting to create a data layer using some open crime data from Salt Lake City, but I can't figure out the coordinate system they are using. See the link below to view the data. (You'll have to scroll to the far right to see the X and Y coordinates.)

https://opendata.utah.gov/Public-Safety/SALT-LAKE-CITY-POLICE-CASES-2016/trgz-4r9d

I'm new to GIS.


texts: Providing warnings and accuracy features on map for legal reasons

texts:
I work in a big corporation and one of my many responsibilities is making maps for field-workers. I usually make them very basic maps, as they know what infrastructure to look for, they just need the basic road directions, and they know what rate of accuracy our data is in. As a one-time assignment, My boss asked me to make a map for a new contractor and as one of the regular features is "dangerous places" (that the field workers should avoid) he said I should write a so-called legal comment on the map that states the user should not rely only on the map and to state the accuracy. And that got me thinking.
I know none of you are lawyers, and neither am I, but what do you do on your maps?
Right now, I only put the statement on "outside jobs".
Is that a mistake?
Should I put it also on "inside" jobs?
Do I have Individual responsibility and can be sued personally, or does my company "vouch" for me?
The question was more aimed as to ask if the disclaimer is really needed, but versions are welcome as well.


texts: Averaging hourly temperature netcdf files to daily .tif or netcdf file?

texts:
I have a set of 3-hourly temperature netcdf files over the last 16 years. Each file is only one time dimension, the 3-hourly temperature for each pixel. I would like to create a new .tif or netcdf file (preferably .tif) of the daily average temperature. This would be equivalent to something like the Mosaic to New Raster tool in ArcGIS but for netcdf files. I prefer to use python - arcpy, netcdf4, numpy, or similar packages. Following is what I have so far, which selects the daily netcdf to be averaged.

def averagerasters():
    raslist = glob.glob(pathlist[0] + "/*.nc")
    startind = 0
    endind = 20 #Too expensive to iterate through entire 50k files
    while startind <len(raslist):
        avglist =[]
        firstras = raslist[startind]
        matchras = firstras[-37:-30]
        for ras in raslist[startind:endind]:
            if matchras in ras:
                avglist.append(ras)
        print "Here is average list", str(avglist)
        outname = matchras+'.tif'

        ####code to created averaged daily raster####

        startind+=len(avglist)
        endind =startind+20


texts: Adding Elevation Data to a Satellite Image Raster File from DEM

texts:
I have a satellite image raster file of an area and a DEM of the same area. I can Extract Values to Points by using this DEM as it contains the 'z' value i.e the elevation information in meter.  The image raster file is a color image which is georeferenced and has no 'z' values. I'm trying to add the 'z' value of the DEM to this image raster file using ArcGIS 10. I have tried this process:
Adding the 3 Bands of the image Band 1, Band 2, Band 3 along with the DEM file to Composite Bands tools and to create a new composite raster. But I failed to find whether the 'z' value of the DEM is added to the newly created image raster after Composite Bands tools operation.
My objective is to make this image raster file associated with the elevation value of the DEM.
Is there any error in this process?


texts: QGIS v3 Default CRS For New Projects settings not available, cannot enable OTF

texts:
I would like to be able to enable on the fly transformation in version 3, I have followed the user guide instructions but I seem to be missing the options in the 'Options' window to allow this.
In the version 3 user guide the following instructions are given to enable the 'enable on the fly transformation' to be seen in the Project CRS window. This screenshot shows the image of the 'Options' window in the user guide.

  here are three ways to enable On The Fly CRS Transformation:

    Select Project Properties ‣ CRS from the Project ( or Settings) menu. You can then activate the checkbox Enable on the fly CRS transformation (OTF) checkbox in the CRS tab and select the CRS to use (see Coordinate Reference System Selector)

    Click on the geographic CRS status icon in the lower right-hand corner of the status bar, leading you to the previous dialog.

    Turn OTF on by default in the CRS tab of the Settings ‣ Options dialog by selecting checkbox Enable ‘on the fly’ reprojection by default or Automatically enable ‘on the fly’ reprojection if layers have different CRS.

However, when I got to Settings, Options, CRS these options are missing (see screenshot). How can I activate them please?


texts: I need to generate random floating numbers between 0 and 1 in the field of attribute table for ArcGIS 10.3 version.


texts: Creating summarized view of data in ArcGIS Online to use in dashboard bar chart

texts:
I have a table hosted in ArcGIS Online which basically records the number of new COVID-19 cases, recovered cases and deaths every day. I need to display these three series in a single bar chart which summarizes the data in monthly time intervals.
Using a serial chart I can group the categorie axis with the timestamp field and set minimum time scale of a month...but for the values I can only set 1 field and thus only have 1 bar for each month. I want to have three bars for each month.
Is there a way I can do this in ArcGIS Online without creating a new table?


texts: Defining zoom on tileset extents using CesiumJS

texts:
I work on windows 10  with Cesium 1.72.
NodeJS and Cesium work well.
I succeed in adding a tileset format3D tiles (Meshs + associated texture).
However, I would like to define a zoom on my tileset area.
Currently, the display, the viewer remains global and the camera don't move toward my area of interest.
My wish is that once the tileset is ready to be displayed, the camera will move and position itself above the tileset. The little script works fine with my cesium3D tiles version 0.0 file. But does not work for the moment with my cesium 3D tiles 1.0 version.
I don't know where the error could come from. I don't have an error message in the console. My tileset is loading fine but
the camera does not move over my tileset. When running the code, the camera does not move and remains in a global "globe" grip and no zoom is performed. I am therefore obliged to go manually to the area of interest.
Below is an excerpt from the tileset.json file:
> {"asset":{"version":"1.0"},
> "geometricError":10000,
> "properties":{"Height":{"maximum":197.2902062288683,"minimum":158.81894164623267},
> "Latitude":{"maximum":0.86549605155357123,"minimum":0.86536928860221218},
> "Longitude":{"maximum":0.069327552218852465,"minimum":0.069115786360719259}},
> "root":{"boundingVolume":{"sphere":[4133254.630298804,286568.64019880601,4833172.8602689737,596.59912274524095]},
> "children":[{"boundingVolume":{"sphere":[4133289.5021612602,286493.75629316899,4833147.6480717165,514.11988103071815]}

Below, my little javascript script :
> // Cesium viewer set up
> var viewer = new Cesium.Viewer("cesiumContainer", {
>
> });
>
> // tilset setup
> var tileset = new Cesium.Cesium3DTileset({
>   url: 'http://localhost:8080/riaom/tileset.json'
> });
>
> // Add the tileset to the 3D scene
> viewer.scene.primitives.add(tileset);
>
> // Zoom on Tileset
> tileset.readyPromise.then(function (tileset) {
>   viewer.scene.camera.setView({
>     // Final position has to take into account the whole tileset
>     destination: tileset.root.boundingVolume.rectangle,
>   });
> });


texts:
I know awhile back they changed the licensing model to license by the core.

So if you have one server license, and you want to install it on a four core server?

Do you need four licenses to be legit?
If you want to restrict Server from using the other 3 cores, does ESRI provide information on how to do this?


texts: Why does MapBox serve trasparent pixels only below a certain zoom level?

texts:
We're using MapBox to serve a raster tileset.

At low zoom levels the transparent pixels are seethrough:

When you zoom in though it goes black (we've added oppacity):

Questions:

Why is this
How to stop it with MapBox?
Will it work out-of-the-box with gdal2tiles?
Any other references about best practice for serving partially transparent raster tiles?

To reproduce the behaviour: http://npct0.vs.mythic-beasts.com/msoa/?r=isle-of-wight

Context: https://www.jtlu.org/index.php/jtlu/article/view/862


texts: Creating tiled rasters with colors for Leaflet without R?

texts:
I have a .tif files with only NAs and 1s. Then, I use gdaldem color-relief to give the tif colors. Then I use gdal2tile.py on these tif files for tiling maps. But the tiled maps don't show any colors, only black and white.

In R I can add colors for rasters with leaflet. But I am not using R, what can I do to create color rasters for leaflet?

----- Edit ------
The color.txt file looks like this:

0, 255 255 255 255
0, 0 0 0 0

Then I did gdaldem color-relief -of GTiff test.tif colot.txt output.tif. The output.tif does have colors. Then, I use gdal2tiles.py -z 1-6 output.tif tile_folder And from the output tile maps, there is no colors.


texts: Create Polygon from holes in polygon ArcGIS

texts:
I have a polygon feature class with holes in it, which I'll refer to as Polygon 1:

I wish to create a polygon set of circles/clipped circles that are the holes as denoted 1->6 below. I believe I could accomplish this with the Clip tool and use of an overlaying polygon with the hole deleted, specifically this polygon, which I'll refer to as Polygon 2:

My understanding of the clip tool is that then I need to clip Polygon 2 by Polygon 1 leaving only the circles/clipped circles 1->6. As such I ran the Clip tool with the following inputs:

Input Features = Polygon2

Clip Features = Polygon1

I did not get the expected output, but rather a replica of Polygon1, see here:

I also tried reversing the inputs, the result is exactly the same.

What is the error in my understanding or my approach?


texts: Python objects in my ArcMap addIn aren't instantiated

texts:
I've got a weird problem.  My addin throws problems intermittently where it doesn't recognize buttons or tools when I try to toggle the visibility in my code.  It seems as though the objects aren't instantiated as trying to toggle them works after I try to interact with them.  What is the problem and how do I begin to debug it?  My code is far too long to post but if there's something I can provide to help can you let me know?

Here's a scenario:

User starts Arc and clicks a button.  The button tries to enable another button with:

anotherButton.enabled = False

Arc throws an error:

global variable "anotherButton" not defined.

User clicks on "anotherButton" and then tries the first button again.  This time the command executes and "anotherButton" is disabled.


texts: CRS Projection problems prevent spatial merge in R

texts:
Here is an updated sense of where I'm at. I decided to re-read in my data file using ReadOGR.

MyDataFile <- read.csv("reduced1.csv")
class(MyDataFile)
coordinates(MyDataFile)<-~X+Y
class(MyDataFile)

writeOGR(MyDataFile, "Folder", "File", driver = "ESRI Shapefile")
proj4string(MyDataFile)

Checking the CRS at this point gives me 'NA' so I try and assign it

Redefined <- readOGR(dsn="Folder", layer = "File")
proj4string(Redefined) <- CRS("+init=epsg:4326") # WGS 84

  [1] "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84
  +towgs84=0,0,0"

Now for reading in my boundaries file:

Map <-readOGR(".","infuse_dist_lyr_2011")
proj4string(Map)

  [1] "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000
  +y_0=-100000 +datum=OSGB36 +units=m +no_defs +ellps=airy +towgs84=446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894"

So now to transform.

NewMap <- spTransform(Map, proj4string(Redefined))


texts: PHP: Call to undefined function pg_connect() with MS4W for PostgreSQL

texts:
I am trying to add dynamic interactions with my PostgreSQL 12 database to my web page with the PostGIS extension that I use with PgAdmin 4. I use an Apache web server that I installed with MS4W. For dynamics, I chose the PHP language. I managed to configure it to show my errors, but I cannot configure the pgsql extensions to use "pg_connect ()" type functions.

<?php
    $dbconn = pg_connect("host=localhost dbname=xxxx user=xxxx password=xxxx")
    or die('Connexion impossible : ' . pg_last_error());
    $query = 'SELECT * FROM signaletique';
    $result = pg_query($query) or die('Échec de la requête : ' . pg_last_error());
    echo "
\n";
    while ($line = pg_fetch_array($result, null, PGSQL_BOTH)) {
        echo "\t
\n";
        foreach ($line as $col_value) {
            echo "\t\t$col_value	\n";
        }
        echo "\t
\n";
    }
    echo "
\n";
    pg_free_result($result);
    pg_close($dbconn);

But the page returns me:

Fatal error: Uncaught Error: Call to undefined function pg_connect() in C:\ms4w\Apache\htdocs\test.php:4 Stack trace: #0 {main} thrown in C:\ms4w\Apache\htdocs\test.php on line 4

I tested the connection between php and the extension

<?php
    echo extension_loaded('pgsql') ? 'yes':'no';
?>

And the page return "no".

So I went to php.ini to configure the extensions and remove the ";".

And in httpd.conf I added the following line to this position:

I tried the echo "extension_loaded" again but it doesn't work.

So I respected what was written on the different answers from orum and on the php website, but it still doesn't work. I know my code is not orthodox, but it is a test code given by php.net
It's been several weeks that I try different languages, and that I search for script and I currently have all the material to work well in php and finish my project but I have to manage to make it work.
Thank you for your help.


texts: How to check if one polygon intersects with a feature class

texts:
I dynamically create a polygon from an array like this:

import decimal
lines = ['1|421474.904|4467629.2341','2|421590.35|4467592.7209','3|421611.5036|4467661.6442','4|421611.4173|4467661.7276','5|421606.8376|4467666.1544']
pgn = arcpy.Array()
for i,line in enumerate(lines,1):
    crds = line.split('|')
    pnt = arcpy.Point()
    pnt.ID = int(decimal.Decimal(crds[0]))
    pnt.X = float(decimal.Decimal(crds[1]))
    pnt.Y = float(decimal.Decimal(crds[2]))
    pgn.add(pnt)
sr = arcpy.SpatialReference()
sr.factoryCode = 2100 # ΕΓΣΑ 1987
sr.create()
polyg = arcpy.Polygon(pgn,sr)
del pgn, pnt

and I want to check if this polygon intersects with a specific feature class (it has 130.000 features), i.e.:

DX = ur'D:\DX.gdb\DX'

If it does, I want to get the output of the intersection and add it in an existent polygon feature class, i.e.:

output = ur'D:\Test.gdb\polygons'

If not, I want to get a False statement.
Instead of using the Intersect_Analysis Tool is there a faster way to do this?


texts: How can I calculate drainage density in QGIS if I have length for stream and grid line 1 km2? I need to calculate density per km2.


texts: Sorting polygon elements with arcpy.SearchCursor

texts:
I'm wondering if there's a way to sort my records on the fly using a searchCursor.  I know you can't sort using the data access (da) module but can with the legacy function.

Without adding a record for the x,y of the polygon centroid as an attribute does anyone have any ideas?

I could grab the centroid point using SHAPE@CENTROID and then the resulting x,y with @X and @Y.  I don't think I can run those all together though, but if I did it would look something like:

arcpy.SearchCursor(fc, sort_fields="SHAPE@CENTROID@X a; SHAPE@CENTROID@Y a")


texts: Techniques for point-level speed calculation from GPS traces

texts:
I am working with a GPS dataset where GPS speed is not available, only the lat/lon coordinates and timestamp.
Currently, I calculate point-level speed from rate of distance between two consecutive points (distance/delta_time). However, the result usually gave large errors due to the errors in GPS.
Are the other means or techniques to estimate the point-point speed?
EDIT
Currently, I calculate the speed in python using the geopy package, like so:
from geopy.distance import vincenty
A = (Data[i, 0], Data[i, 1])
B = (Data[i + 1, 0], Data[i + 1, 1])
pointSpeed = vincenty(A, B).meters/delta_time[i]


texts: Make given number of points at evenly spaced on line in QGIS?

texts:
I have a shapefile lines representing historical flight paths of aerial photography. I have the number of photos taken for each path and the number of the first and last photo, plus the ID of the flight path.
I can do this manually with the "construct points" tool in ArcGIS, Spatial Join and some grunt work but I want to make this an automated process.
Task includes:

Make points along lines with equal intervals, including both ends, with information on the # of points from the lines shapefile.
Get LineID from the lines shp to the pnts shp (Guessing Spatial Join is the only way to go).
Allocate photo-numbers to points from only knowing first and last photo-number for each line, and the direction of the line.

If nothing else, getting the points on the lines would be a good start.


texts:
Is anyone successfully using SAGA tools in QGIS 3.10.7?
I have downloaded QGIS 3.10.7 on multiple PCs and a Mac. All of them have resulted in the same problem when I try to run SAGA tools. A message similar to:

"The following layers were not correctly generated.
C:/Users/Admin/AppData/Local/Temp/processing_7cf0f5b0db874bb9a6b8fe84b44cb047/2a6b2113845f4739b4dec0f12c451504/C_PROF.sdat"
You can check the 'Log Messages Panel' in QGIS main window to find
more information about the execution of the algorithm."

I've downloaded QGIS from the QGIS Standalone Installer Version 3.14 (64bit) and the OSGeo4W Network Installer (64bit)
Here are images of the 'Log Messages Panel'

I am not seeing anything in the log that suggests why the layers were not correctly generated. It ultimately generates a layer with reasonable looking values, but I am concerned about their accuracy given the warning.
More specifics:

I have tried to run SAGA tools using an ASCII file and TIFF file.
Files that I have tried range from ~250MB to 1.7GB
I am using a projected coordinate system - EPSG:26919 - NAD83 / UTM zone 19N - Projected
I have set the project CRS to match the layer CRS before attempting processing

Anyone successfully using SAGA tools with QGIS 3.10.7? If so, any ideas what is causing this problem for me?


texts: ArcGIS Pro published layer not picking correct display field

texts:
I have published a map service using ArcGIS Pro. It contains 3 group layer and inside each group 10-15 layers. For each layer i have configured the display field in ArcGIS Pro by opening layer properties and selecing the column which i need to be displayed. (This i used to do in ArcGIS Desktop as well). This display field can be checked from ArcGIS Server rest service page.

Now the problem which i am facing is the service which i publish, layers in that are not picking up the correct display field.
I never faced such problem when i was using ArcGIS Desktop.

Anyone faced a similar issue ?

Update: I have updated ArcGIS Pro to 2.4 and issue is still there.


texts: Is there some method on Ubuntu to request newest postgresql postgis package rather than specific version?

texts:
There is postgresql-9.3-postgis-2.1 and there is postgresql-9.4-postgis-2.1. Unfortunately 9.3 is available only on trusty and 9.4 is not available on trusty (see http://packages.ubuntu.com/search?keywords=postgresql-9.3-postgis-2.1 and http://packages.ubuntu.com/search?keywords=postgresql-9.4-postgis-2.1).

So any installation instructions/script must include something along "if your OS version is...". Is there some method to simply install newest postgresql postgis package?


texts: Snapping feature classes together for one section of a polygon and not the whole feature where slivers are visible

texts: I have used the snapping tool to snap the vertex in 2 feature classes together where they contain slivers gaps and overlaps. This works fine however the tool executes this for the whole polygon and snaps vertex/edges and therefore can move lines where lines should not be moved and creates errors rather than fix the issue. How can I specify somehow to only snap those areas where the gaps and slivers are noticeable?


texts: In QGIS 2.12 processing R scripts fails (plots remain blank) due to a wrong variable name - Is there a workaround?

texts:
I am trying to execute r scripts in 2.12. All of them fail. Plots remain blank.

It seems that the variable "Layer[[Field]]" returns NULL: E.g:

  hist(Layer[[Field]],main=paste("Histogram
  of",Field),xlab=paste(Field))

Returns the error that x must be numeric. It seems to me that it does not work because Layer[[Field]] returns Null. In my case the variable "Field" contains the value "6_Farbcode". If I copy the whole code to the R console and replace the variable name "Field" with a number, e.g. 6 for the column of the table it works. So I guess this can be traced back to a syntax error in QGIS?:


texts: Replacing integer values in field using ArcPy for ArcGIS Pro?

texts:
In ArcGIS Pro, to replace a text value in a field using Field Calculator you can use:

!FieldName!.replace("Old Value", "New Value")

However, this does not work on an integer field. For example:

!IntegerFieldName!.replace(1250, 810)

or

!IntegerFieldName!.replace("1250", "810")

Will both produce syntax errors.

So in a Long, Short, or any numeric field, what is the correct way to replace a specific number with another number?

This function will eventually be implemented in a standalone Python script like:

import arcpy
arcpy.management.CalculateField(r"C:\Shapefile.shp", "FieldName", "!FieldName!.replace(1250, 810)", "PYTHON3", None)


texts:
A Sentinel-1 image shown in ENVI is 41% in scale(Fig.1,normal) and 51% in scale(Fig.2, unnormal with mussy in black or white dots).

I don't know the reason for the situation, the pyramid-building error or other reasons?

                                         Fig.1

                                         Fig.2


texts: QGIS2Web - how to include additional mapping functions

texts:
It is my understanding that the QGIS2Web generates a web map from my QGIS project by taking aspects of layers, styles and extent.

What would it take to include map functionality to the web map such as: buffer (radius search), simple attribute data filtering/querying, etc. to the web map?

I'm assuming I would need to add JavaScripts to make this work, but I'm not understanding how or where to add these JavaScripts within HTML to make these functions work with my published QGIS web map.

If it helps, I'm using WordPress.


texts: Increment GPS coordinates by a certain distance given in meters

texts:
Say I have this point:

45.1200,10.5000

From there I want to create another point that is 20 meters north and 10 meter east from the previous point. Is there any equation I can use for doing this?


texts: OpenLayers/GeoServer/Oracle combo input/output scenario

texts:
Im completely new to GIS. I must finish already started project that uses Oracle as DB for geoobjects, Geoserver, OpenLayers. Task is to draw something on a map (OpenLayers must handle that drawing i assume...) and then save it to Oracle database(as a layer i think). Ive looked through some manuals on geoserver, but maybe you can help me to quickly start in this "simple" input/output scenario?
Thank you.


texts: How to create a photo-documentation in QGIS?

texts: I would like to create a photo-documentation in QGIS for some real world objects. The photos aren't geotagged but I now their position on the map. If possible I would like to link them to a point shape. How can I manage this? Would it be possible by means of a database connection using a BLOB datatype or are there other methods?


texts: CartoDB - How do I turn on a scale (in feet / imperial) in the Visualization?

texts: I'm making a map for an architectural site analysis and need to have a scale for the Visualization. Is this a feature in CartoDB?


texts:
Should the python code below work with a hyperlink in ArcMap 10.1 with python 2.7 installed?

import arcpy
def OpenLink ([PARCEL]):
parcel = [PARCEL]
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
subID = parcel[1:7]
folder = "rc" + subID[:1] + "00000"
filename = "s" + subID + "f.tif"
rasterPath = "r:\\rectsubr\\" + folder + "\\" + filename
lyr = arcpy.MakeRasterLayer_management(rasterPath, filename)
arcpy.mapping.AddLayer(df, lyr, "TOP")
return

This code works in ArcMap 10.2 and up.


texts: Comparing hotspots to points using ArcGIS Desktop?

texts:
I've done a simple hotspot analysis of car accidents to show where they are concentrated. I did this in ArcGIS, first using the Getis-Ord hotspot tool with an accident point shapefile. I then used Spatial Analyst to interpolate a raster surface from the GetisOrd to give me a nice heatmap across the city.

What I'd like to next is compare this heatmap with venues, things like liquor stores, schools, malls to see there is a link between them (I was even thinking of times, but that might be a bit to hard).

I have the points for these buildings, and I thought about doing a second hotspot analysis, but then I don't know how to combine this data together or if its even the right way to go about it.

Is there a way to combine the buildings and the accident points into one file and run that through hot-spot?

I've got access to ArcGIS and Spatial Analyst.


texts: Maritime routing using postgres and postgis

texts: I've created a vector grid of 1km x 1km distance(grid being a graph of edges each 1km) but the table itself has billions of rows, would it be wise to run pgr_dijkstra on such a huge data just for the sake of accuracy but trading off query speed?


texts: PyQGIS Layout - Change Image Source QGIS 3

texts:
Looking for a solution to loop through existing layouts in a QGIS 3.6 document and change a source of an image. The image is the same in each of the layouts. What I have is:

from qgis.core import QgsLayerTreeGroup, QgsLayerTreeLayer,
import os,sys
root = QgsProject.instance().layerTreeRoot()
project = QgsProject.instance()
projectLayoutManager = project.layoutManager()
for layout in projectLayoutManager.layouts():
    #print (layout)
    image = layout.itemById("footer")
    print (image)
    image.setPicturePath(r"F:\Documents\Footer.tif")

It seems to find the image just fine. Returns:

<qgis._core.QgsLayoutItemPicture object at 0x0000016071A895E8>

but fails to do anything from the last line:

AttributeError: 'NoneType' object has no attribute 'setPicturePath'


texts: How to export query result on raster table in PostGIS

texts:
I did success query on a raster table in PostGIS (raster data clipped by a vector polygon), now I want to view the query result in QGIS. But how to export the query result to another table. In vector data, it's simple, just "CREATE TABLE schema.someTable AS  (...sql in here...);

How about raster data? Any suggestion?


texts: QField: change display label of entered features

texts:
I'm experimenting with the QField app to visit trees regularly and monitor them over time. The tree inspections is a table related to a shapefile with the tree locations, so that every visit is associated with that particular tree and site. I have noticed that whenever I added a new feature to the list (tree inspections), they are all listed as '0'. I have attached a screenshot to show what I mean:

I can tap on the each entry to find out what variables were stored, but it is not very informative. Is there a way to display them as name of site and the date-time of visit, instead of the 0's?


texts: Using ArcGIS Pro Python 3 as system default

texts:
I know that the Python 3 version installed with ArcGIS Pro comes with a lot of bells and whistles as well as with Conda. However, without changing my system PATH, if I type pythonor condain my Command Prompt, then the commands are not found. Based on this, I am assuming that for some reason, it is not recommended to use the ArcGIS Pro Python install as the system default by adding it to the PATH.

I can add the link to the file path (C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\) to my system environment and then I can set this as the default Python install.

Should I install a separate Python installation for my system to work with non-ArcGIS projects?

Or more generically, is it recommended to use the ArcGIS Pro Python installation as the system wide Python installation for ALL kinds of projects (including those not using arcpy)?


texts: Different behavior of ArcObjects for different languages

texts:
I have the same code in C++ and C# for ArcMap. This code loads a document from disk and trying to get a picture for PictureSimbol object. But in case of C++ error occurs(HRESULT = E_UNEXPECTED 0x8000ffff). C# code works without any problem. Why such a difference may occur? (mxd_file_name the same in both cases)

C++ code

esriCarto::IMapDocumentPtr map_doc(esriCarto::CLSID_MapDocument);
map_doc->Open(mxd_file_name, L"");
esriCarto::IMapPtr mp = map_doc->Map[0];
esriCarto::IFeatureLayerPtr layer = mp->Layer[0];
esriCarto::ILegendInfoPtr inf = layer;
esriCarto::ILegendGroupPtr gr = inf->GetLegendGroup(0);
esriCarto::ILegendClassPtr cl = gr->Class[0];
esriDisplay::ISymbolPtr s = cl->Symbol;
esriDisplay::IMultiLayerFillSymbolPtr mls = s;
esriDisplay::IFillSymbolPtr fs = mls->Layer[0];
esriDisplay::IPictureFillSymbolPtr pfs = fs;

IPictureDisp * pic = 0;
HRESULT hr = pfs->get_Picture(&pic); // hr = E_UNEXPECTED 0x8000ffff catastrophic failure
map_doc->Close();

C#

ESRI.ArcGIS.Carto.IMapDocument map_doc = new ESRI.ArcGIS.Carto.MapDocument();
map_doc.Open(mxd_file_name);
ESRI.ArcGIS.Carto.IMap mp = map_doc.Map[0];
ESRI.ArcGIS.Carto.IFeatureLayer layer = mp.Layer[0] as ESRI.ArcGIS.Carto.IFeatureLayer;
ESRI.ArcGIS.Carto.ILegendInfo inf = layer as ESRI.ArcGIS.Carto.ILegendInfo;
ESRI.ArcGIS.Carto.ILegendGroup gr = inf.LegendGroup[0];
ESRI.ArcGIS.Carto.ILegendClass cl = gr.Class[0];
ESRI.ArcGIS.Display.ISymbol s = cl.Symbol;
ESRI.ArcGIS.Display.IMultiLayerFillSymbol mls = s as ESRI.ArcGIS.Display.IMultiLayerFillSymbol;
ESRI.ArcGIS.Display.IFillSymbol fs = mls.Layer[0];
ESRI.ArcGIS.Display.IPictureFillSymbol pfs = fs as ESRI.ArcGIS.Display.IPictureFillSymbol;
stdole.IPictureDisp pic = pfs.Picture; // works fine
map_doc.Close();

There is no problem with IPictureDisp * pic = 0; Actually I just paste code for IPictureDispPtr pic = pfs->GetPicture() because I do not want an exception instead of error HRESULT. Bellow is an autogenerated code for GetPicture function

inline IPictureDisp * IPictureFillSymbol::GetPicture ( ) {
    IPictureDisp * _result = 0;
    HRESULT _hr = get_Picture(&_result);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
    return _result;
}

C++ code works, if the map is not taken from hard drive but obtained from the same document that loaded in ArcMap. Here's the code:

esriArcMapUI::IMxDocumentPtr document(application_->Document); // application_ is the ArcMap application
esriCarto::IMapPtr mp = document->Maps->Item[0];
// the rest code is unchanged
esriCarto::IFeatureLayerPtr layer = mp->Layer[0];
esriCarto::ILegendInfoPtr inf = layer;
esriCarto::ILegendGroupPtr gr = inf->GetLegendGroup(0);
esriCarto::ILegendClassPtr cl = gr->Class[0];
esriDisplay::ISymbolPtr s = cl->Symbol;
esriDisplay::IMultiLayerFillSymbolPtr mls = s;
esriDisplay::IFillSymbolPtr fs = mls->Layer[0];
esriDisplay::IPictureFillSymbolPtr pfs = fs;

IPictureDisp * pic = 0;
HRESULT hr = pfs->get_Picture(&pic); // same code works fine
map_doc->Close();


texts: Geoserver Admin not launching http://localhost:8080/geoserver/web

texts:
This is similar to this post:

Cannot access GeoServer on http://localhost:8080/geoserver/web

I'm getting error 404 not found for localhost:8080/geoserver/web

I downloaded GeoServer version 2.10.5 and pointed the JRE to here: C:\Program Files\Java\jre1.8.0_121

This is whay I got in the cmd propmpt when checking the JRE version:

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

Do I need to download another version and put it in another location, such as C:\Program Files(x86) and then reinstall GeoServer? A tutorial I'm following says the destination folder will be in Program Files(x86)


texts: Calculating date field with just a year double field [QGIS]

texts:
I have a dataset in QGIS that I originally created in ArcMap. It has two fields for dates, let's call them 'date_from' and 'date_to'. Both of these fields contain only a year i.e. '2012' and nothing else, this was originally sufficient for my needs. They are of the double type.
Upon moving over to QGIS I see that dates need to be in the format 'yyyy-mm-dd'. How would I best go about creating new fields to add the full dates using what I already have? Note that the first of Jan and last of Dec would be sufficient for the new 'from' and 'to' fields.


texts: How to get the file path for layers within a group layer?

texts:
I am trying to use python to remap a set of layer files in a group layer (not within an mxd) but am unable to create a layer object for them so I can use  replaceDataSource. One of my group layers is

C:\Workspace\LayerFiles\Administration.lyr

I've attempted to use arcpy.mapping.Layer with the following paths:

C:\Workspace\LayerFiles\Administration.lyr\Ownership.lyr
C:\Workspace\LayerFiles\Administration.lyr\Ownership
C:\Workspace\LayerFiles\Administration\Ownership.lyr
C:\Workspace\LayerFiles\Administration\Ownership

which all come up with ValueError: Object: CreateObject Layer invalid data source

Is there no way to get a direct path to layers within a group layer? If that's the case is there another means to create a layer object for each one within a loop? Hopefully there's a simple answer, but my search has come up empty so far.


texts: QGIS Composer - Inserting OS Grid Reference

texts: I would like to add an OS grid reference to QGIS Composer, i just need to show the figures.  Running on QGIS 2.18.3.


texts: R: raster stack (time series) loop pixelwise and write layer number of value occurence into a single output layer

texts:
I have a raster stack of gridded RFE 2.0 rainfall data (time series of one year = 365 layers). Now I wanted to identifiy on which date during the year the first rainfall occurs for each Pixel. The date is corresponding to the layer number (nlayers) = DOY (Day of the Year). The result should be a single output raster layer where the pixels are showing the layer number (=DOY) where the first rainfall occured. I am sure a loop would probably solve me problem, but I am really struggling. The occurence of rainfall is true if the value within a Pixel becomes > 0.

    library(raster)
    library(rgdal)

setwd("D:/*/2001") # Location of raster for e.g. year 2001
lst <- list.files(path=getwd(), pattern='.tif')
RFE2001 = stack(lst)
RFE <- RFE2001

## Crop raster stack to extent of study area
e <- extent(10,21,6,15) # extent(xmin, xmax, ymin, ymax)
r <- crop(RFE, e)
crs(r) <- "+init=epsg:4326"

for (i in 1:nrow(r)) {
  for(j in 1:ncol(r)) {
    Value<-r[i,j]
    if (Value > 0) {
      s[i,j]<-Value
    } else {
   .....


texts: How to import data from excel and associate it with individual shapes?

texts:
New user on ArcMap - Working with shapefiles...

Question: the shapefile I am working on, a polygon is a plot of land, each plot of land has a history of owners.  I am currently having to copy/paste the ploygon in mapview, edit the attributes, and repeat...

Data includes the owner, price paid, length of ownership, acreage, etc.

looking for a quicker way to import or "join" or connect excel information with each plot/polygon...

so in short - the issue is one polygon, many owners with differing information of said polygon

Not a python expert yet...

Thanks


texts: Vector arrows over flow velocity map in QGIS

texts:
I have a point layer with X, Y, Vel and VelA parameters where Vel stands for the magnitude of flow velocity and the VelA is a rotation of the arrows so the arrow is pointing on the dominant direction of flow in given area. This point layer is above a raster layer which shows the velocities at color range.

When I go to Layer styling of the point layer and select Size to be the Vel and Rotation to be the VelA the result is somewhat strange - see attached picture. The very same picture is in every point of the point layer - for ilustration I am attaching a larger cut from the map where the points arranged in grid can be seen. When I zoom to the specific one point I see the situation on the second picture.

My aim is to have a single point on map represented by the arrow which size and rotation is given by the attributes.

Any ideas where the problem might be?


texts: Open QGIS project files in exclusive mode / alert if project file already in use

texts:
I have QGIS-Project-Files saved to a network drive and was wondering if it is possible to warn users that a project file is already opened by an other user to prevent concurrent editing of the same project file.

I was thinking of showing an alert like this:

Does anyone have a clue how this could be done?

I found some information on stackexchange but I am not sure if these could be implemented in QGIS in some generic way(not a manually added 'openProject' macro):

https://stackoverflow.com/questions/21126108/ensuring-that-my-program-is-not-doing-a-concurrent-file-write/21149744#21149744

https://stackoverflow.com/questions/11114492/check-if-a-file-is-not-open-not-used-by-other-process-in-python

I know that QGIS shows a warning if I try to save a project file another user has changed since I opened it....
But it would be even better if I got the information in the moment when I open the project that someone else has opened the project, too.

The best option would be to implement this in QGIS core (C++) but a pythonic solution would be also interesting.

A generic C++ solution is probably harder as it has to check the exclusive file access on different OS's (windows, linux, mac).


texts: Seeking block (sub-district) level boundaries for India?

texts: I'm looking for block (sub-district) level shapefiles for India. The GADM database only has files for the 2300 Tehsils, whereas I'm looking for the about 5500 Census blocks (sub-districts) for any year possible.


texts: How to define the similar elevation points from 2 layers in the 4 nearests points?

texts:
I´m using QGIS 2.8.3. and I want to know what is the most similar elevation points value from a layer A to layer B in the 4 nearest points.
My layers have an attribute table with Long, Lat coordinates and elevation values. Any idea?


texts: Getting OSM Nodes and Ways from own Database

texts:
we need OSM Nodes and Ways to use with our own routing algorithm, but we don't want to load all of the data in the RAM of our Server. So we thought about saving all the data in a database and only load some parts for each routing request.
I already had a look at osm2psql and osm2pgrouting but they all don't store just the ways and nodes. It's important to load only ways and nodes as in our special case we have to use our own algorithm.
So the question basically consists of 2 parts:

Let's say we got an osm-file and want to import it in a database. What tools are good for that?
How can we read data fast from the database with the input of a bounding box?


texts: Expressing Raster Calculator expression with Math Toolset?

texts:
I have two rasters containing bathymetry data: one containing the bathymetry of the sea floor, we'll call this raster1, and another containing the difference between two previous scans of the same area, but only where the difference is negative. We'll call this raster2. I have to query raster2 such that any areas where the value is >10% of raster1's value will be highlighted.

I can do this in Raster Calculator in ArcGIS with this expression:

abs("raster2") > 0.1 * "raster1"

However I'm trying to write a script to do this and as we know, you can not use Raster Calculator in Python.  So I tried this code:

outAbs = Abs(raster2)
outTimes = Times(raster1, 0.1)
arcpy.CheckOutExtension("Spatial")
outFinal = outAbs > outTimes

But I get:

RuntimeError: ERROR 010422: Error in processing the environment mask.

To be clear, raster1 and raster 2 are both in GRID format.

Any ideas why I might be getting this error?


texts: Problem with print composer when exporting a map with Google Maps Plugin in the background

texts: Whenever I try to export a map with the Google Maps plugin in the background, it exports but just exports to a blank document. When I turn the Plugin off so it is not in the background, it prints fine. Why is this?


texts: ArcGIS Select attributes X weeks before or after current date

texts:
I'm working on a project where the data gets updated every Monday (an XLSX file which I bring into a File Geodatabase and work with from there). I've been tasked with automating the data massaging. One of our fields contain dates and users are interested in features dated 3 weeks before today's date and 3 weeks after today's date.

Working manually I would just sort the table and select features that match the time criteria then code them accordingly (there is a second field for the coding) but how do I achieve this in ModelBuilder?

I know how to export a selection, but I have no idea how to select a dynamic date threshold. I'm at a loss.


texts: PyQGIS - ComboBox - update selection in procedural programming

texts:
I have a polygon shapefile (p_cities) and I want to present a simple GUI to the user to select a city from a combobox and that city will be highlighted & zoomed in.

The following code does it for the first city appearing in the combobox, but it does not continue working even if I change my selection in the combobox:

from PyQt4.QtGui import *

lyrName = "p_cities"
lyr = QgsMapLayerRegistry.instance().mapLayersByName(lyrName)[0]
idx = lyr.dataProvider().fieldNameIndex( 'name' )
uv = lyr.dataProvider().uniqueValues( idx )
cb = QComboBox()
cb.addItems( uv )
cb.show()
cityName = cb.currentText()

c = lyr.getFeatures(QgsFeatureRequest().setFilterExpression(u' "name" ILIKE \'%s\' ' %cityName))
lyr.setSelectedFeatures([s.id() for s in c])
iface.mapCanvas().zoomToSelected()

It seems that I need to dig into the signals and slots and use "currentIndexChanged" accordingly. However, it would also be great if I could learn doing it in procedural programming.


texts:
I have a very simple leaflet map which has a set of easy buttons whose function is to add and remove layers from the map.

I'd like to set tooltip or mouseover or hover so when the user moves the mouse over the buttons they get a message. Simple.

Here's an example of the code for the layers, then for the buttons:

//layer coding

var buildings = L.geoJson(buildings,{
 style: function(feature, layer){
    return {
        color: "purple",
        fillOpacity: 9,
        weight: 2
    };
},

}).addTo(map);

//button coding

L.easyButton('<img class="icon" src="icons/house.png">',

function(btn, map){

if (map.hasLayer(buildings)){
    map.removeLayer(buildings);
} else {
    map.addLayer(buildings);
};

}).addTo( map );


texts: How do I improve the resolution of a raster layer

texts:
I have a DEM raster layer created from contour lines in Qgis 3.0 using v.to.rast to get my contour raster and then r.surf.contour to get the DEM.

The trouble is, somewhere in the process, the cell size for the resulting raster layer is too big and the 3D map is 'terraced'.

How do I reduce the cell size (make the resolution higher)?


texts: Suitable raster format for elevation data with sub-meter accuracy?

texts:
I've got some elevation data represented in ascii gridded xyz-files which I want to convert to a conventional raster format. What's a bit special is that the elevation values have sub-meter accuracy, as they have one decimal (for example: '101.7')

As a rule I prefer to use open source software and stick to conventional, open, widely supported formats.

So the first thing I tried was to convert the data using gdal to geotiff, but specifying the data-type as Float32/64 distorted the elevation values somewhat.  When I check the pixel-value in qgis it reports it as 101.70001220703125.

The command I use to convert an ascii file into raster is:

gdal_translate -ot Float32 -a_srs "EPSG:32633" -co "TILED=YES" -co "COMPRESS=LZW" -co "PREDICTOR=2"  -co "ZLEVEL=9" file.txt file.tif

Questions:
What would be suitable raster formats for sub-meter elevation data?
Is there any other software I should consider using instead of gdal?
Is this distortion of decimal precision perhaps inherently unavoidable? (Some doubts have been raised in the comments below though).

Edit:
Some more information about the original text format:
I cannot disseminate this data and provide a real example, but the original format is rather trivial. The text files contain UTM coordinates for a specific zone, 33N for example. The spacing between the points are regular, with a spacing of 5 meters between them. Just as an example two adjacent XYZ values would be:
680000 5420000 101.7
680005 5420000 101.3

Actually, it should be possible to use just the above two lines and invoke gdal_translate as described above, it should be sufficient to discern how gdal handles the numerical precision.


texts:
I am writing a feature into postgis behind geoserver using wfst and using jquery ajax call. When the user is authenticated it successfully adds a feature. When user is not authenticated it still returns to the success function instead of error function. When i log the returned data using:
data.getElementsByTagName("ExceptionText")[0].childNodes[0].nodeValue;
I get this exception message:

    Error performing insert: Cannot access critical_areas with the current privileges

Which makes sense as the user is not authenticated, but instead of going to the error function why is it still returning this to the success function? Can you please suggest what i might be doing wrong?


texts:
I am just going through the "Building custom UI elements using add-ins" walkthrough.  ArcGIS integrated development environment (IDE) is installed. No problems creating the ArcMap Add-on project until i get to the part where i am suppose to RIGHT-CLICK in the editor window and select the ArcGIS Snippet Finder...

There is no ArcGIS Snippet Finder on the shortcut menu that pops up (see attached)

An example of what i should be seeing is here: http://help.arcgis.com/en/sdk/10.0/a...0000036s000000

Where is the Snippet Finder?


texts: Shifting/rescaling/standardizing coordinate system in spatial lines data frame using R

texts:
I have a spatial lines data frame object extent: 143516.4, 213981, 3353367, 3399153  (xmin, xmax, ymin, ymax)
I want to standardize x and y coordinates and create the same spatial lines data frame object with a new extent.  I would say I want to rescale but rescale packages only use one argument I need mean(xcoord), mean(ycoord) and move with sd(xcoord) and sd(ycoord)


texts: Why does Floyd-Warshall not return all pairs in my pgrouting SQL?

texts:
As a follow up from
1-center and k-center problem / maxmin facility problem in Post

I have a strange behavior for the Floyd-Warshall algorithm which seems to give not all pairs. Why are so many pairs missing?

The Details:

I took the following steps:

Create a topology from my vertices using pgr_CreateTopology (gives me a network with 5700 vertices and corresponding start and end ids.
Run Floyd-Warshall, end up with 157.000 pairs (in contrast to 5700 * (5700 - 1) = 32 Mio.
Analyze number of pairs calculated -> lowest pair count is 1 pair

E.g. for source node 1481: Gives only 2 pairs, i.e. the source node 1481 (which is close to the end of the graph) is only listed with costs to itself (1481 <-> 1481) and between (1481 <-> 1476). The later is the end node of the vertex which connects 1481 and 1476.

The output from pgr_analyzeGraph():

  NOTICE:  PROCESSING:

  NOTICE:
  pgr_analyzeGraph('network',0.1,'the_geom','gid','start_id','end_id','true')

  NOTICE:  Performing checks, please wait ...

  NOTICE:  Analyzing for dead ends. Please wait...

  NOTICE:  Analyzing for gaps. Please wait...

  NOTICE:  Analyzing for isolated edges. Please wait...

  NOTICE:  Analyzing for ring geometries. Please wait...

  NOTICE:  Analyzing for intersections. Please wait...

  NOTICE:              ANALYSIS RESULTS FOR SELECTED EDGES:

  NOTICE:                    Isolated segments: 6

  NOTICE:                            Dead ends: 1046

  NOTICE:  Potential gaps found near dead ends: 0

  NOTICE:               Intersections detected: 197

  NOTICE:                      Ring geometries: 3

From the docs:

  Floyd-Warshall algorithm (also known as Floyd’s algorithm and other names) is a graph analysis algorithm for finding the shortest paths between all pairs of nodes in a weighted graph.

The sample data provided by pgrouting shows the same behavior:
Take e.g. node 17. Running pgrouting's Floyd-Warshall returns one row, connecting 17 <-> 16. This is not what I would understand under "all pairs". Can someone shed some light on my misunderstandings?


texts: Layer renders twice with EPSG:5514 in WMTS OpenLayers

texts:
I am trying to create a WMTS layer in OpenLayers with the following properties:

Url: http://geoportal.cuzk.cz/WMTS_ORTOFOTO/WMTService.aspx
Matrix set: jtsk:epsg:5514
Projection: EPSG:5514

I am using the projection definition from http://epsg.io/5514 (the default one).

The resulting tiles contain two layers: 1 positioned correctly and another one in the wrong position. Does anyone have idea why is this happening?

Here is also a codepen that I have created https://codepen.io/bampakoa/pen/yWyLog


texts: How to write hyperlinks to local files in GeoJSON properties?

texts:
I am wondering how to make a hyperlink from GeoJSON file properties to the local drive file.
I found two options here:

Clickable hyperlink from GeoJSON field in feature
this option refers to a whole .geojson file, whereas I need to have an unique hyperlink for every single object property included in this file

This option:

How to make a displayed geoJson property a link to another property in a Leaflet popup

Looks better, but I have problems with implementation it into my code, that looks:

var church = L.geoJSON(test, {
  pointToLayer: function(feature, latlng) {
    feature.properties.myKey =
      feature.properties.Title + ", " + feature.properties.Head;
    return L.circleMarker(latlng, geojsonMarkerOptions2);
  },
  onEachFeature: function(feature, layer) {
    layer.bindPopup(
      '
' +
        feature.properties.Title +
        "

Address: " +
        feature.properties.Head +
        "

" +
        feature.properties.Description +
        "
"
    );
  }
}).addTo(map);

Once I put a single link in GeoJSON file property, then works fine:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "Title": "Sitec IS",
        "Head": "7400 Beach Drive",
        "Description": "Gavin Sinclair"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [0.16964435577392578, 52.29220753602784]
      }
    },
    {
      "type": "Feature",
      "properties": {
        "Title": "JHG",
        "Head": "Shortstanton sidings",
        "Description": "Conor Murphy",
        "URL": "JHG"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [0.05458831787109375, 52.29163006501503]
      }
    }
  ]
}

However I would like to have a path to my local file instead of URL...

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {
        "Title": "Priory Court",
        "Head": "188 Albany Road",
        "Description": "MDU",
        "URL": "file:\\\Z:\Fixed Line\Design & Build\2. Clients\Openreach\3. MDU Designs\Coventry\OR66 - Priory Court, Coventry"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [-1.530101, 52.400199]
      }
    },
    {
      "type": "Feature",
      "properties": {
        "Title": "Stretham house",
        "Head": "Flat to leave",
        "Description": "N/A"
      },
      "geometry": {
        "type": "Point",
        "coordinates": [0.211212, 52.344149]
      }
    }
  ]
}

but the code doesn't work at all.
I believe, that problem lies somewhere in the apostrophs/quotation marks. I have an empty text instead or nothing.

Is there some option to make the hyperlink towards a specified path in the local drive file/folder, analogically i.e to the MS Excel?


texts: Digitize image / fantasy map without projection

texts:
I have an image where I know the distance between two points in meters (say 800).

How do I import this image in QGIS (3.8) so that I get this distance when I measure with the tool in the toolbar?

Note: The image shows just a small part of the planet, so there is no distortion to speak of. So unlike other questions, I'm not trying to map a whole planet. If this matters, the planet has the size of Earth.


texts: Is there a way to plot Triangulated Irregular Networks (TIN) in R Jupyter notebooks?

texts:
I was wondering if it is possible to plot TINs (Triangulated Irregular Networks) in Jupyter plots (with R kernel)?
I use R's sf package (in conjunction with PostGIS) and ggplot2 in Jupyter to plot vectors, which works nicely. But I couldn't seem to find a way to plot TINs.
I did quite a bit of search both here in GIS.SE and on the internet, but found very little. There is some hint in this GIS.SE question Creating TIN using R, that the RSAGA package can do some of the TIN handling. In addition,

TINs and some of the other simple feature geometry classes are not
well supported in sf at the moment.

I am not familiar with SAGA or RSAGA, and a quick looking into the RSAGA github site shows that the package seems no longer actively maintained:

RSAGA is no longer under active development and no support is
available. Try Rsagacmd.

Does any one know of a way to plot TIN in R Jupyter notebooks?
(This is with Ubuntu Linux 20.04 LTS)


texts: Cannot activate the Feature Search in ArcGIS Online?

texts:
I'm trying to use the feature search in ArcGIS Online, but until now without any luck. I have followed this instructions: https://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm,  but when I reach the bullet number 6, I can, not find this option (Expand the Find Locations setting if it is not already expanded and check the By Layer check box.)
I have made standard map with ArcGIS Online, Add data to the map (from the internet), from my ArcGIS Server (MapService),  Query data was enabled when data was published to the server, I can see data in my ArcGIS Online map. But I can not find the Option in ArcGIS Online to activate the feature search?
Any ideas?
The instructions that I followed:

Verify that you are signed in and open the saved map you want to configure for feature search.

On the side pane, click the About this Map  button to display the map's details.

Click More Details to go to the map's item details page. Alternatively, you can open the map details from My Content.

Click Edit on the item details page.

Scroll down to the Properties section and locate the Application Settings.

Expand the Find Locations setting if it is not already expanded and check the By Layer check box.

Choose a layer from the drop-down list.
Note:
Hosted feature layers and ArcGIS for Server feature and map service layers with Query enabled are searchable (and therefore appear in the drop-down list). For example, if you are publishing your feature data from ArcMap, you can enable the Query operation through the Service Editor. See ArcGIS for Server Help for more details.

Choose an attribute field in the layer.
Note:
For a field to be searchable (and therefore appear in the drop-down list), it must contain strings or integers and not use a coded domain. Integer fields only support the Equals condition. For the best search results, choose a field with unique values.

Choose whether the result should contain or be equal to the search terms.

Enter hint text that will appear in the search box when the user selects to search in a layer. The same hint appears for all your searchable layers.

Repeat the process to enable search on additional layers.

Click Save.


texts: Using QgsExpression.evaluate() on vector layer closes QGIS

texts:
I am trying to import a csv layer and run QgsExpression.evaluate() to make some computations on existing columns. However, QGIS 2.18, 3.2, and 3.3 all close when it reaches that point.

    layer.startEditing()

    context = QgsExpressionContext()
    scope = QgsExpressionContextScope()

    exp = QgsExpression(expression)
    if exp.hasParserError():
        raise Exception(exp.parserErrorString())

    for f in layer.getFeatures():
        QApplication.processEvents()
        scope.setFeature(f)
        context.appendScope(scope)

        value = exp.evaluate(context)

        computed_values[field_name].append(value)

        f.setAttribute(f.fieldNameIndex(field_name), value)

        layer.updateFeature(f)

    layer.commitChanges()

Is there any way to make it work for shapefile, or just ogr table layer?


texts: Reducing number of point features considering minimal distance and spatial distribution

texts:
I have a certain number of generated node features using FME 2016. They are coming as output of one FME workbench and actually representing characteristic points of underground cables. Total number of these points is several hundreds of thousands and, as you can imagine, they are unevenly distributed accross the area of the city.

My task is to reduce the number of points in the way that there are no two points on the distance less than 50 m. Points should be treated equally and they do not have assigned weights. Point features after reduction should be loaded into ESRI geodatabase.

What I can do is to take each of these points at the time and to remove all others in the circle of 50 meters. In that case my only requirement, that there are no two points on the distance less than 50 meters, will be fulfilled, but distribution of the points is in some areas very poor.

What I am thinking of, is there has to be some kind of comprehensive solution which will not analyze each point individually but complete set of features and result is best possible distribution of the points in complete area.

Don’t hesitate to advise me any kind of ESRI tool or even mathematical approach that you can think of, since as far as I see, we do not have built-in FME transformer which will do this job for me.

Current result

Needed result


texts: Making multiple separate selections from attributes

texts: I am using ArcGIS 10 with ArcEditor license. I have a 10 year composite of month-to-month temperature values for 17 weather stations. That makes 120 months. I have to select each and every month separately and create a layer out of that selection. Is there an easy way to do that so that I can avoid having to make the repetitive 120 selections?


texts: Is there a way to get one World File from QGIS Atlas?

texts:
I used Atlas in QGIS 2.14 to generate an image (map) and an associate world file for each lakes (> 5000) in my database.

I want to be able to see all the data in MS Excel as following:

1st column : Name of the lake (in my case, the file name)
2nd column : 1st line in the world file
3rd column : 2nd line in the world file
4th column : 3rd line in the world file
5th column : 4th line in the world file
6th column : 5th line in the world file
7th column : 6th line in the world file

With each line being one lake.

Is there a way in QGIS (or any other GIS) to get one "super" world file for all my lakes instead of one per lake?

If not, is there any other way to merge all the files to get the same result?

EDIT : In case I'm not asking the right question, what I ultimately want is an MS Excel file with the lakes' name in one column and the corner coordinates of the map (jpg image) in separate columns.


texts: How to get access to layers without geometry?

texts:
I have a QGIS project with some layers without geometry.
I develop a QGIS plugin. I want to get all my layers by:

iface.mapCanvas().layers()

but I get only layers with geometry. How I can get layers without geometry?

My no-geometry layers are just tables in a database. I could connect to the database in order to access data but I would like to know whether it is possible to access them as QGIS layers (in analogous way to QgsVectorLayers).


texts: Converting Numpy array to raster with ArcPy?

texts:
I have been trying to convert a numpy array back to raster after doing some calculation on it and i keep running into errors. Basically I am trying to find flooded areas below a certain sea level eg 2 meters.
Here is my code :

import arcpy ,os ,sys
import numpy as np

#conditioning the raster data
outputRaster = Con(inRas1>=0 ,inRas1,1)
outputRaster.save(outputgdb + rasterName)

#clip the raster layer to study area
clipppedRaster = arcpy.Clip_management(outputRaster,"#",clipRaster,inputFeature,"#","ClippingGeometry","MAINTAIN_EXTENT")
#clippedRaster.save(outputgdb+ outputclip)

#convert raster to numpy array
num_array = arcpy.RasterToNumPyArray(clipRaster,nodata_to_value=0)

floodedAreas = num_array[np.where(num_array <= 2)]
arcpy.AddMessage(np.array(floodedAreas))
rasterflood = arcpy.NumPyArrayToRaster(floodedAreas,x_cell_size=1)
floodedAreas.save (outputgdb + "numpyarray1")

rasterflood = arcpy.NumPyArrayToRaster(floodedAreas,x_cell_size=1)
rasterflood.save(str(floodedArea))

arcpy.AddMessage(np.min(num_array))

But i keep running into the following error:

Traceback (most recent call last):
  File "C:\Python27\dealingwithraster.py", line 57, in <module>
    rasterflood = arcpy.NumPyArrayToRaster(floodedAreas,x_cell_size=1)
  File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\__init__.py", line 2299, in NumPyArrayToRaster
    return _NumPyArrayToRaster(*args, **kwargs)
ValueError: Argument in_array: A two or three dimensional NumPy array is required.

What am I doing wrong here?


texts: QGIS 2.99.0-149 modeler inputs Feature Source vs. Vector Layer

texts:
In QGIS 2.99.0 modeler, there is a obviously a new input type called Feature Source, wich does what Vector Layer did in previous versions (but Vector Layer is still available):

New behaviour, as can be seen so far:

Vector Layer can not be restricted to certain shape types and is not recognized as algorithm input.
Feature Source can be restricted to shape types and is recognized as algorithm input (successor to Vector Layer)

The auld Vector Layer input in QGIS 2.14. etc. modeler:

The new Vector Layer input in QGIS 2.99.0:

The new Feature Source input in QGIS 2.99.0:

Question: What is the difference between the new Vector Layer and Feature Source, provided Feature Source is not restricted to a certain shape type? And if Vector Layer inputs do not appear in algorithm input selections, what is it for?


texts: How to find the number of unmasked images in a collection at a point in Google Earth Engine?

texts:
I would like to know how to count the number of unmasked pixels in a single geometry point i.e. how many images have not been masked at that location.
The following code counts all images, both masked and unmasked at the point of interest, I would like to know the number for each.

//specifies the start and end date
var start_time = ee.Date('2001-01-01');
var end_time = ee.Date('2010-01-01');

//specifies area of interest
var poi = ee.Geometry.Point([1.1370849609375,52.20171539256484]);

//filters landsat 5 collection to date and roi
var landsat5 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR')
.filterBounds(poi)
.filterDate(start_time, end_time);

//creates a cloud mask
var cloud_func = function(img){
  return img.updateMask(img.select(['pixel_qa']).bitwiseAnd(2).neq(0));
  };

//applies the mask
var masked_collection = landsat5.map(cloud_func);

//prints the total number of landsat images
var number_of_landsats = ee.Number(masked_collection.size());
print(number_of_landsats, 'number');


texts: Unreadable GeoJSON file in QGIS fixed by trivial reordering

texts:
I'm having a problem reading a GeoJSON file in QGIS.
The file can be found at this git repository.
When I try to load in the file, I get an error message that it's invalid, but the "Reason:" field is empty.
However, when I trivially reorder the fields under "geometry" to put

"type": "LineString"

at the start instead of at the end, QGIS can load it.
The fixed version of the GeoJSON file is here.
As far as I understand, the ordering of keys in a JSON object is completely immaterial, so I don't see why this change should make a difference.
I'm able to read both files just fine in the web version of ArcGIS.
Is this a problem with the GeoJSON file or have I found a bug in QGIS?


texts: Maximum mathematical variation between non-government, non-state, physically contiguous zip codes?

texts:
I'm programming a matching list for street addresses, and I'm trying to prioritize different aspects of the address based on likelihood of similarity if both addresses are the same physical location. I'm allowing for the zip code to be in any physically contiguous zip code (that doesn't cross a state line) and still be considered a match, but this is where the problem starts.

The first digit of the zip code is obviously a very high priority, but beyond that, I have no idea what the maximum difference is between physically contiguous zip codes within the same state, and not including weird outliers like the IRS zip code. If there are, say 94000 next to 95000, then I need to de-prioritize the second through fifth zip code digits. If, however, the largest difference is 94100 to 94200, I only need to de-prioritize the third through fifth digits.

Any idea of either the answer or how I could go about finding this out?


texts: Geocoding Adresses with varying levels of reporting accuracy?

texts:
I am trying to geocode a database that has, I'll call it "4 tiers", of address types.

They are:

Numbered Street (e.g. 506 Taproom Way)
Cross-street (Happy Road $ Jubilant Blvd)
Hundreds Block (500 block Cranberry St)
Road (Independence Blvd)

I have added a field that classes each tier.

The dataset in question is crowd-sourced (thus, a bit messy) that has compiled incidents where an individual has died from interaction with law enforcement (police use of deadly force). So, I would liken this data to crime type data, but from the opposite perspective. I am validating the dataset and doing hotspot analysis. That is why I want to Geocode the addresses (using ArcMap 10.2).

The first 2 tiers will have an acceptable positional error, but the other two tier (hundreds block and Road) will have greater error. For crime type analysis what type of positional error is acceptable? Is there a way of dealing with the less accurate tiers? Would changing the points to polygons (blocks) or polylines (roads) that represent the incident be better?


texts: Encoding non-mandatory feature properties in WFS/GML?

texts: In what ways can non-mandatory feature properties be encoded in feature type schema (WFS 2.0/GML 3.2.1 with GML features)?


texts:
I am trying to merge several (70 at least) raster files (a digital elevation model, ASTER DEM v2). I am using QGIS and I use the tool "Raster > Miscellaneous > Merge".

I works well and I get the new raster, but the elevation values are not concordant with the values on the original rasters. For instance, there are individual rasters with elevation >2000m, and in the new raster I get values until 1500m.

I have also used "Raster > Miscellaneous > Build Virtual Raster", but the same happens. I have tried as well to merge fewer raster files; it still does not work.

What should I do? Any suggestions?


texts: is it possible to download planet files of OpenSeaMap data?

texts:
I want to visualize OpenSeaMap data on an Android device using Mapsforge. Since I need to do this in a disconnected manner (think boat out to sea) I need to generate a .map file using the Mapsforge Osmosis plugin, however to be able to do that I need a .osm file of the OpenSeaMap data.

Can anyone point to where I might find one or some other way to proceed?


texts: Setting cell size when converting from GeoTIFF to ASCII

texts: I would like to convert a GeoTIFF file to a .asc file using the translate option. When I use the translate tool in QGIS it converts it, but my cell size is something like 0.0002 (the pixel size of the GeoTIFF). I have tried enforcing a cell size of 30m using the -tr command, but I can't seem to get it to work.


texts: Accessing advanced symbol levels with python in ArcMap

texts:
Does anyone know if it is possible to access the symbolgy levels in ArcGIS10 with python?

I have a layer "temp" that I print to a pdf.  The symbology is printed correctly but is drawn in the wrong order (there are overlapping points with different colours). Outside python I can fix this problem by ticking the check box unter properties -> symbology -> Advanced -> Symbol Leves... -> "Draw this layer using the symbol levels specified below"

Can I check this box inside a python script?


texts: Remove layers in sub folders using python- path orientation

texts:
Expanding on my previous question Remove layers using python- path orientation,
i try to remove layers from mxd's (in ArcMap 10.3, Python 2.7.8), that don't appear in the layout view.

The layers located in different disk drivers and in different folders and sub folders and each layer has different path orientation (right to left- different language from English). Only the MXD's located in "D:\desktop\Project".

The data view contain two layers:

The extent of river layer is:

and the extent of land use layer is:

In the layout view i need to zoom to this area only:

and river layer don't appear in this area, although the river extent contain the land use extent inside of it. I using this code:

import arcpy,os
from arcpy import env

env.workspace = r"D:\desktop\Project"
for mxdname in arcpy.ListFiles('*.mxd'):
    print mxdname
    mxd = arcpy.mapping.MapDocument(os.path.join(env.workspace, mxdname))
    df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
    for lyr in arcpy.mapping.ListLayers(mxd, "" ,df):
        print str(lyr.getExtent())
        print lyr.name
        if lyr.getExtent() != None:
            if df.extent.disjoint(lyr.getExtent()):
                arcpy.mapping.RemoveLayer(df, lyr)
                print u'Removed ' + unicode(lyr)
    mxd.save()
del mxd

When i run the code i get project name and all layers name, and no filtering layers is done:

>>>
project.mxd
91903.0350764695 574029.485062387 200813.043872879 654364.436708682 NaN NaN NaN NaN
river
150949.479567489 608397.791172772 163831.70252934 619047.879128692 NaN NaN NaN NaN
land use
>>>

My target is to remove river layer from all MXD's.


texts: I have a land cover vector dataset, and would like to calculate the area of each land cover in ARC, how can this be achieved?

texts: My land cover vector 25m data includes land cover types such as 'Broadleaved woodland' and 'urban'. I have cropped the dataset down to my study area and would like to calculate the area of each land cover in my study area (this information is not included in the attribute table). How can I calculate the area for each land cover?


texts: Summing attribute based on another attribute in QGIS?

texts:
I have an attribute table for buildings in my city. The important fields are Output Area, where the building is located, and TotalArea, a calculated sum of the floorspace of that building.

What I'd like to do is find the total area of all buildings in each output area, and add that data to the output area table.

What's the best way to do this?


texts: Select by attributes for Arabic fonts in SDE/ file geodatabases?

texts:
I have a layer with names of electrical substations in Arabic language.  there is no any problem when searching any Field names in English language whether from the SDE of file goedatabase
I got the same feature class in SDE and file geodatabase. Searching the Arabic names in file geodatabase works very well and has no problem. Searching the Arabic names from the SDE geodatabase has a problem. It doesn't recognize Arabic languages and thus ends up finding nothing.
I am using Arcgis desktop 10.2.1 with arcfm 10.2.1a and Oracle 11G

What might be the issue here?


texts:
I want to add a number of months to a date to get a new date. I have a date-field "date", an integer-field "months" and a date-field "new_date". I want to calculate the "new_date" by adding the "months" to the date. I did it with the expression:
"date"+  to_interval( concat (  to_string("months"), ' months'))
For example: "date"= 2019-06-04, "months" = 12,
the result ("newd_date") is: 2020-05-29, but I want to have: 2020-06-04.
It seems that QGIS is calculating each month with 30 days. Is there a way to add the exact months?


texts: Slow performance on splitting a shapefile by attributes

texts:
I've tried to develop some workflows with the ArcPy module for splitting a shapefile based on the unique values in a specified field. The code works as expected except one thing I am not able to figure out.

import arcpy, os
from arcpy import env

#getting user inputs
in_fc = arcpy.GetParameterAsText(0) #'roads.shp'
outfolder = arcpy.GetParameterAsText(1) #r'C:\GIS\Temp\OutSHP'
fieldname = arcpy.GetParameterAsText(2) #"FEATURE"
createfolder = arcpy.GetParameterAsText(3) #true/false
env.workspace = outfolder

#user chosen NOT to create a folder with the name of feature class
#
if createfolder == "false":

    with arcpy.da.SearchCursor(in_fc, ["{0}".format(fieldname)]) as cursor: #defining a search cursor
        for row in cursor:

            if not arcpy.Exists(os.path.join(outfolder,row[0])): #checking if shapefile already exists
                #Analysis toolbox > Extract > Select GP tool to select features
                arcpy.Select_analysis(in_fc, os.path.join(outfolder,row[0]), ''' "FEATURE" = '{0}' '''.format(row[0]))
            else:
                    print "The shapefile with this name already exists"

#user chosen to create a folder with the name of feature class
#
else:

   with arcpy.da.SearchCursor(in_fc, ["{0}".format(fieldname)]) as cursor: #defining a search cursor
        for row in cursor:
            directory = os.path.join(outfolder,row[0]) #create a path for directory that will be created
            if not os.path.exists(directory): #checking if directory exists
                os.makedirs(directory)

                if not arcpy.Exists(os.path.join(directory,row[0])): #checking if shapefile already exists
                #Analysis toolbox > Extract > Select GP tool to select features
                    arcpy.Select_analysis(in_fc, os.path.join(directory, row[0]), ''' "FEATURE" = '{0}' '''.format(row[0]))
                else:
                    print "The shapefile with this name already exists"

I've created a script tool in ArcGIS which takes an input shapefile, an output folder, a field name and whether user wants to create a folder for each unique value in the specified field before creating a shapefile there (the folder and the shapefile will have identical name except .shp in the end for shapefiles).

The issue is that the tool gets the work done for 5 seconds when user chooses to create folder with the unique name for each feature class and for around 3 minutes if the shapefiles are created directly in the output folder. I am having hard times trying to find out anything that could stipulate this behaviour in the code.


texts: How to get attribute values from vector features visible in the qgis canvas

texts:
I have a vector layer (grid). Currently I select some tiles with the select tool and paste some python code to get information about these features.

layer = qgis.utils.iface.activeLayer()
selected_features = layer.selectedFeatures()
for i in selected_features:
    ...

Now, I want to get the feature values from the tiles which I can see on the map canvas, without selecting them.

There were two possibilities.

Selecting only the features which are fully visible ("contained" in the map canvas)
Selecting all features which are also partly visible ("intersecting" the map canvas)

Is there a way to do this with python?


texts: Creating Random Points Based on Existing Clustering of Points using ArcGIS Pro

texts:
I have a point layer for businesses (50,000) that has similar attributes in terms of the area they are in. I would like to for each cluster of points create a single point that is based on the point cluster but also the same attribute information (location) of those points.
So its not just about creating a single point based on where the points are clustering but for the attribute information of the similar businesses to also help in the creation of the new point.
Is there an existing tool in ArcGIS Pro that can do this?