texts:
I'm attempting to writing a python script that will automate exporting a set of stock maps to JPEG from their mxd files, and I'm having some strange issues getting there.

I've alternatively been getting a Visual C++ Runtime error saying python experienced an abnormal program termination, or the program throws an exception saying "AttributeError: PageLayoutObject: Error in executing ExportToJPEG"

I've tried two main ways of running this process. In one I loop through an array of directories and pull the individual mxd files into the export command, as below:

for line in Direct:
    path = str(line) + "*.mxd"

    listing = os.listdir(path)
    for infile in glob.glob(path):
        mxd = arcpy.mapping.MapDocument(infile)
        infile = infile.split("\\")[-1]
        infile = infile.rstrip('.mxd')
        infile = infile + ".jpg"

        project = os.path.join(destpath, infile)
        arcpy.mapping.ExportToJPEG(mxd, project, resolution = 200)

        del mxd

In the other form, I copy the arcpy.mapping.ExportToJPEG() line over and over with the parameters for each map specified, as below:

mxd = arcpy.mapping.MapDocument(r"Y:\Maps\map1.mxd")
project = "C:/Maps/map1.jpg"
arcpy.mapping.ExportToJPEG(mxd, project, resolution = 200)

mxd = arcpy.mapping.MapDocument(r"Y:\Maps\map2.mxd")
project = "C:/Maps/map2.jpg"
arcpy.mapping.ExportToJPEG(mxd, project, resolution = 200)

mxd = arcpy.mapping.MapDocument(r"Y:\Maps\map3.mxd")
project = "C:/Maps/map3.jpg"
arcpy.mapping.ExportToJPEG(mxd, project, resolution = 200)

I've tried multiple tests to see if my syntax is wrong, and if the script is using too many resources and crashing, but haven't been able to figure out what my issue is.

The weird part is I can't seem to find any pattern or reason to the maps I'm getting these errors on. It seems like it changes every time I alter my script.


texts: Tasselled Cap coefficients for Advanced Land Imager

texts:
It seems that there are co-efficient values; wetness, greenness and brightness, available for all the Landsat series and MODIS but I can't find anything relating to ALI.

Does anyone know the values or where they can be found?


texts: How calculate sequential values based on group field?

texts:
In field calculator i calculate sequential values in field [ORDER_ID]
What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use autoincrement () in Field Calculator.

Parser: Python
Expression: autoIncrement()
Pre-Logic Script Code:

rec=0
def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0):
  rec = pStart
 else:
  rec = rec + pInterval
 return rec

This is the result.
Field ORDER_ID is already calculated manually (i select GROUP_ID and use autoincrement).

What changes script needed to use it in field calculator?


texts: Listing field name aliases in one shapefile/layer using ArcPy?

texts:
I want to use arcpy/python to print out a list of all the field name aliases for a specified shapefile.  So far I have been able to hack a script I found to list all the field name aliases associated with every layer file on my map, but I wish for it to reference one specific shapefile.  Here's what I have so far:

Code:

import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd):
    desc = arcpy.Describe(lyr)
    print lyr.name
    fields =  desc.fields
    for field in fields:
        print field.aliasName

The above returns a list of all field alias names for ALL of the layers in the map.  I want to return just a list for ONE shapefile.

How would I go about referencing just one shapefile/layer in a map document?


texts: I've been using JOSM a lot lately and have grown accustomed to panning the map with a right click (ie. right click, hold and drag) while having a left click activate the selected tool. I'm wondering if it is possible to configure this behaviour in QGIS. I think I've looked through most of the various configurations options and haven't been able to find an option for this. It seems at present that a right click doesn't do anything when the cursor is over the map.


texts:
I am working on a project in ArcMap.
I added an auto cad .dwg to my map, and in ArcMap, and I Georeferenced this .dwg file.
So now the DWG drawing is moved to be exactly on my drawing in ArcMap.
I digitized everything in ArcMap and exported this file to AutoCAD. But my drawing exported was so far.
I think because when I georeferenced an AutoCAD file in ArcMap, in AutoCAD(when I open the file)
it will still be in the old location without georeferencing.
Is there a way to fix this issue?


texts: installing QGIS plugin not listed in plugin manager

texts: I'd like to install rasmover.py which I've been able to find in github  ... I'm working with rasters that cannot be georeferenced precisely ... rasmover may allow me to adjust rasters to a best fit ... any advice on how to install plugins not listed in plugin manager?


texts: How to add arrow symbol in legend of CartoDB?

texts:
I have been trying for some time now to get an arrow to appear in my legend in a CartoDB visualization - it is one of the simple visualization marker options along with the standard "ellipse", so I feel like it should thus be able to be added into a legend.

I've tried various ways tweaking the HTML for the legend, but have had no luck.

Has anyone successfully done this before in CartoDB?


texts: Import rasters to geoserver - Permission denied

texts:
In a Virtualbox, I have Ubuntu server 14.04.2. Installed OpenGeo Suite 4.5 and created a folder inside the geoserver data directory and it was named mydata. In fact it was a copy of the demo folder. I have removed everything inside and loaded the geotif files. the Linux account opengeo is the owner of the mydata folder but still experienced this this permission denied nightmare as showed in figure attached.

What can I try?


texts: Deleting shapefile python (lock?) (QGIS 3.10)

texts:
I have trouble with deleting shapefiles and notice a weird behavior when I am running my scripts
(Version QGIS 3.14.15-Pi)
layer = iface.activeLayer()
path_layer = layer.source()
cloned_layer = clone_vl(layer) # makes a memory layer and copies crs, features, attributes, ...
QgsProject.instance().removeMapLayer(layer.id())
del layer
print(QgsVectorFileWriter.deleteShapeFile(path_layer))

returns False if I run it as a script inside the Python console editor of QGIS
but return True if I execute it line after line directly in the console.
Which seems like something weird is going on, like if I execute the script, QGIS doesn't have the 'time' to unlock the shapefile or something.
What is going on?


texts:
I have about 6000 points that I need to run a computationally intensive analysis on. My thought process is to break this point layer up into six groups of 1000 points each. I'm trying to do this in ArcGIS ModelBuilder in 10.5 using the field calculator tool. The grouping doesn't really matter, but all of the other attributes to use (city, state, zip) will overwhelmingly put more points into one category and not the other 5 because they are spatially clustered. My plan was to use either the ObjectID, or the unique ID field I created (ObjectID number + letter "A")

My code is as follows:

def classify(OBJECTID) :
  if int(OBJECTID) >= 5000 :
    return 6
  elif int(OBJECTID) >= 4000  and int(OBJECTID) <= 4999 :
    return 5
  elif int(OBJECTID) >= 3000  and int(OBJECTID) <= 3999 :
    return 4
  elif int(OBJECTID) >= 2000  and int(OBJECTID) <= 2999 :
    return 3
  elif int(OBJECTID) >=1000 and int(OBJECTID) <= 1999 :
    return 2
  else:
    return 1

classify(!Group_!)

However this code is giving all of my points a value of 1. I can't figure out why. I've also tried this with the int() portions of code removed and tried using a range statement int(OBJECTID) in range (4000, 4999): .

Can anyone help?


texts: AttributeError: 'NoneType' object has no attribute 'is_empty' when trying to set new CRS

texts:
I have geodataframe that has two geometry fields.
I'm trying to set new CRS but every time I get the next error message:

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

when I am able to check the original CRS of the layer:
print('original crs is:',tost.crs)

>>>original crs is: EPSG:4326

but then when I try to set new CRS to the copy:
tast = tost.copy()
tast= tast.to_crs({'init': 'epsg:3857'})
print('projected the copy df to:',tast.crs)

>>>AttributeError: 'NoneType' object has no attribute 'is_empty'

I don't understand why is this hapenning.
What cause this error?
My goal here is to be able to set the crs


texts: R - What is the purpose of .GAL lattice file?

texts:
Could someone please explain to me what the purpose of a .GAL lattice file is?

I want to see if my data are spatially autocorrelated and I've been following Bivand (2013). I have loaded my polygon file of London postcodes. The response variable is broadband speed, and I have various independent variables including number of premises per postcode, number of broadband connections per postcode and whether superfast broadband has been enabled.

I'm not sure what I need to do to generate the .GAL lattice. I can't find an explanation anywhere. Here is Bivand's code:

> NY8 <- readShapeSpatial("NY8_utm18")
> NY_nb <- read.gal("NY_nb.gal", region.id = row.names(NY8))

Thanks!


texts: Automatic numbering when split the polygon in arcgis

texts:
Can anyone help me when I split the polygon the number should be automatically update in the attribute table to the second polygon?

Example : I have the polygon name called 5 in attribute table, when I split the polygon the divided second polygon name In attribute table should be update as 5-1 or 5_1 something like this.


texts: Automatically applying a local ortho projection using the center of the raster layer extent

texts:
I would like to take a raster image read the layer extents, extract the center point and then apply a custom local ortho projection with the origin set to the extracted center point.

Can anyone recommend a way of approaching this? (being able to automate/script this would be great)


texts: Keeping raster table values in new vector file in ArcMap?

texts:
I have calculated the time cost of a series of paths from prehistoric sites to their nearest water sources using the cost path tool.

I now want to convert the raster outputs I created to a vector polyline, but when I do, the new vector table doesn't keep the "PATHCOST" raster values and I am left only with the shape length.

I could copy the data I need manually, but I would have to do this hundred's of times.

How can I do this Automatically?


texts: Postgis meassuring distance between first and third points of a polygon

texts:
I am using ST_DumpPoints() function first to get the list of the different points in the polygon but after doing that, the first point is in one record and the third point is in another record and I don't know how to meassure the distance between them.

So I would need to have first and third points' geometry in the same record so that i can use st_distance() with both geometries.

SELECT c.id,(points).path[2] as index,(points).geom
FROM
(select
id,
ST_DumpPoints(the_geom) as points
from my_polygon_layer) as c


texts:
I have a shapefile with following projection information:

PROJCS["kl2",GEOGCS["kl3",DATUM["D_Everest_1830",SPHEROID["Everest_1830",6377299.36,300.8017]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Polyconic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",76.5],PARAMETER["Latitude_Of_Origin",8.5],UNIT["Meter",1.0]]

How can I convert this datum to WGS 1984?


texts: "Dirty" polygons created when using "Merge selected features" in QGIS

texts: When I selecting features to merge in QGIS 2.14.3-Essen using "merge selected features", I sometimes get "dirty" results with redundant polygon vertices. Is there an ex-ante or an ex-post way to get rid of them? Using Mac OS 10.11.6 El Capitan


texts:
Currently, one can extract features within a bounding box from an mbtiles file using tilelive-copy. However there is no way to extract features within a polygon from an mbtiles file.

The mbtiles-extracts file which comes closest returns all of the tile data if a tile intersects a polygon, but does not return features constrained to the polygon.

Are there libraries that can do this? Take an mbtiles file and a geojson file containing a polygon feature as input and output all the features in the mbtiles file present within the polygon?
Is there a way to do this with sqlite3 and spatialite?


texts: How to create a line in a given distance to an existing one?

texts:
I am looking for a possibility to create a second line in a given distance to an existing line. The existing line is curved, so simply create parallel line segments with CAD tools will not work.

Any solutions?

Addendum:

I mapped vegetation types in the surroundings of small streams. The vegetation types have to be displayed on the map as stream-accompanying lines, parallel to the water bodies. So the second line (vegetation) has different properties compared to the first line (stream) and is a feature of a different shapefile.

The solution I found yet is to create buffers around the streams and to trace their borders, but it is time-consuming.


texts:
I am trying to draw lines that run the length of rows in an orchard. I have a nice binary image that I produced from an optical image (see below). I need to delineate the crop rows with a simple vector line segment running the length of each one.

I discovered that GRASS GIS has a function that will compute lines in the N-S direction you can see from this sort of data (r.houghtransform). I ran the function in the GRASS GUI with this .tif file as input and got no result.
I then found this question which mirrors exactly my problem, and a solution (scroll to markusN's response showing his inputs for the terminal prompt:
problem and solution
However, when I run this exact same code offered in the solution, with only my working directory, CRS and .tif as substitutions, I got no result. The error it returns says this:
GRASS 7.8.5 (Kent):~ > d.vect hough color=red size=2 WARNING: The bounding box of the map is outside the current region, nothing drawn
Thus, I suspect this has something to do with the computational regions not lining up. When I run the code in the GUI, I get a vector layer popping up in my map layers box, but if I zoom to layer it takes me to a blank space with no coordinates. Why is this happening? There is a study site specified by the input raster...


texts:
I've proceed by this tutorial to create routing topology:
Create a Network Topology

They are using osm2pgsql tool for import data and next call pgr_createTopology function.

When I proceed step by stup by this tutorial, and after executing pgr_createTopology, I could not select any route. I find nearest vertices and next I use pgr_dijkstra but I have no result. May be caused it by wrong tolerance which I use?

SELECT pgr_createTopology('planet_osm_roads', 0.00001, 'way', 'osm_id');

At first I try 0.00001, but next 0.001 but still no result. I've tried another datasource, no only osm2pgsql schema and still not works. Which topology should I use if my geometry column is Geometry (Linestring, 900913)?

I can't use osm2pgrouting (RAM is not enough) or osm2po (route is not exact on start and end point).


texts:
I am new to Carto.js and I don't understand how to work with it SQL.

How do I get bounds for this query?

const places = new carto.source.SQL(`SELECT * FROM someTable`);

I saw an example with cartoDb

sql.getBounds('select * from table').done(function(bounds) {
    map.fitBounds(bounds);
});

to get the bounds, but as I understand it is not the same.


texts:
I am using QgsNewVectorLayerDialog for taking user input for creating a new shapefile. When the user clicks OK I am reading the inputs selected by the user using the following code.

dlg = QgsNewVectorFileDialog()
result = dlg.exec_()
if result == 1:
   crs = dlg.selectedCrsI()
   type = dlg.selectedType()
   attributes = []
   dlg.attributes(attributes)

All other parameters are coming fine. However attributes is returning an empty list.
QgsNewVectorLayerDialog.attributes() shows that it needs an list of tuple of QString-QString.
Whether I am passing correctly or not.


texts:
What I am trying to accomplish is to find the number of points that intersect a created buffer. I.E. I have a layer called "Buildings", for each building I have fixed distance buffers (<400m). I also a layer called "bus_stops" that includes points. Now I want to calculated how many bus_stops are within each buffer and have a "bus_stop_count" feature in attribute table. How do I accomplish this using QGIS?

What  I have tried:

I tried joining attributes by location, using the "bus_stops" layer and the buffer layer. But it doesn't work.


texts:
I have a layer in my system that displays nautical sectorlights.
If sectorlights are close together the symbology overlaps, wich I don't want.

I would like:
to see the star at all times, but see the dotted lines, colors and arc-indicator when the layer is active and I hold my mouse on the star.

Are mouseover actions possible in QGIS; Can a mouseover action be invoked as a parameter in an expressionbuilder?

For example:

Enable layer:

if(
[mouseover]=true, 1, 0)

edit: after comments and proposed answers
At the moment I am using a layer without geometry as a reference layer. I keep the attribute table open while working and if i check the box on "sectorlichten-uitgebreid" the symbology will show on screen.
I had hoped to evolve to a mouse-over action, my thoughts:
There is mouse-over functionality beeing used on maptips and, in a way, the snapping-function is doing what I am looking for: when you come within a set px of a point, a purple box (symbology) will appear, indicating you are snapping to a geometry. I had hoped this signal was available to invoke functionality in the expression-builder.


texts: V.kernel not working correctly in grass-6.4.2

texts:
I am using grass-6.4.2 for generation of heat maps of crime data. For testing purpose, I created a vector layer from my places shapefile which is a point data.The places shapefile contains more than 3000 data.I used v.kernel command for generation of raster map as follows:

g.region rows=20 cols=20
v.kernel input=Places@PERMANENT output=raster1 stddeviation=0.001

But the output was a rectangle. I increased the stddeviation value step by step to 10000. The output has Maximum value in output: 1.591528e-11. but the raster image is completely wrong. Please help me in solving this issue.

I checked with rows=600 and columns=600 with a standard deviation of 1000. Here is the output I got:

(Thu Nov 15 11:05:14 2012) Command finished (0 sec)
(Thu Nov 15 11:06:05 2012)
v.kernel input=Places@PERMANENT output=raster3 stddeviation=10000
STDDEV: 10000.000000
RES: 1324.680000    ROWS: 600   COLS: 600

Writing output raster map using smooth parameter=10000.000000.

Normalising factor=648263501.877776.
Maximum value in output: 1.589441e-09.
(Thu Nov 15 11:06:07 2012) Command finished (2 sec)

All I get is several rings with different colors radiating from the center.

Thanks in advance.


texts: Receiving strange characters from GPS tracker, is this HEX or binary?

texts:
I am struggling with a GSM GPS tracker. It looks like a clone of GT02A, and it is a relatively common model.

My problem is that when it sends data to my server, it is not readable. I set it to send on port 333 and then on server I am listening on port 333 and the string received (looking in Putty terminal) looks like this:

Rg!r▒▒▒
xx
;▒
▒1▒▒[▒F▒f▒W
▒1▒▒▒[▒F▒f▒W
▒13▒▒[▒F▒f▒W
▒
xx
}▒
▒1▒▒[▒F▒f▒W
xx
▒1 :m▒F▒f▒W
▒1!▒u▒F▒f▒W
xx
"▒/
▒1#▒▒▒F▒f▒W
▒1$▒▒[▒F▒f▒W
▒1%o▒[▒F▒f▒W

Can anyone tell what the problem is or if this string is a HEX or binary string of some kind that needs to be decoded ?
The device seems to work fine if I request the location by SMS, it sends it correctly, so it is not fried or anything.


texts: Computing volumetric precipitation in Earth Engine


texts: ArcGIS extract by mask improper output for polygon with gaps (holes) inside

texts:
I'm working with ArcGIS 10.1, and I have used a polygon with gaps (holes) inside it. Extract by mask gives an improper output with removing the horizontal section  of the image where those holes are located ( As shown)

http://i.imgur.com/KKV21nm.png

http://i.imgur.com/92y5UIz.png


texts: What vector formats are compatible between GDAL and ArcGIS (without Data Interoperability extension)?

texts:
What vector formats can GDAL write that ArcGIS for Desktop can read without the need for its Data Interoperability extension?

I do not plan to use either Personal Geodatabases or Shapefiles


texts:
I have a problem when I run osm2pgsql for Liechtenstein (small dataset). I have a VM running Ubuntu (64-bit) with 5GB of RAM. This is the error I get:

osm2pgsql --create --slim --cache 512 --number-processes 2 --hstore --style ~/osm/openstreetmap-carto/openstreetmap-carto.style --multi-geometry ~/osm/liechtenstein-latest.osm.pbf
osm2pgsql SVN version 0.88.1 (64bit id space)

Using built-in tag processing pipeline
Using projection SRS 900913 (Spherical Mercator)
Setting up table: planet_osm_point
Setting up table: planet_osm_line
Setting up table: planet_osm_polygon
Setting up table: planet_osm_roads
Allocating memory for dense node cache
Allocating dense node cache in one big chunk
Allocating memory for sparse node cache
Sharing dense sparse
Node-cache: cache=512MB, maxblocks=65536*8192, allocation method=11
Mid: pgsql, scale=100 cache=512
Setting up table: planet_osm_nodes
Setting up table: planet_osm_ways
Setting up table: planet_osm_rels

Reading in file: ~/osm/liechtenstein-latest.osm.pbf
Unable to open ~/osm/liechtenstein-latest.osm.pbf
Error occurred, cleaning up
-----------------------------------------------------------------------
Here is some info about the performance of my machine
#memory usage according to top
KiB Mem: 5208300 total, 1586372 used, 3621928 free, 43784 buffers
KiB Swap: 2096124 total, 0 used, 2096124 free. 532136 cached Mem

My kernel parameters are
kernel.shmall = 18446744073692774399
kernel.shmmax = 18446744073692774399
vm.overcommit_memory = 0


texts: Get field names in attribute table with Python

texts:
I have a geopackage file, with a layer called "MyLayer". Within this I have an attribute table with approx 20 attributes.

I can read in each attribute individually like:

import geopandas as gpd

geopkg = gpd.read_file('MyGeoPkg.gpkg', layer='MyLayer')
A = geopkg['AttributeA']

However, I have multiple GPKG files and they may have a different number of attributes, that may have different names.

I'd like to automatically get a list like:

listOfAttributes = ['AttributeA', 'AttributeB', 'AttributeC']

so I could then do:

for l in listOfAttributes:
    data = geopkg[l]

Is there a way of getting a list of the field names from the layer so I can iterate over them?


texts: Earth Engine: Unable to process images from August or September

texts:
I am unable to load and process images from August or September. I have tried with MODIS and Sentinel 2. Quite strange. Here is the link to the code, also included below.

var sen2 = ee.ImageCollection('COPERNICUS/S2');

var s2f_07 = sen2.filter(ee.Filter.calendarRange(2016, 2018, 'year'))
      .filter(ee.Filter.calendarRange(07,07,'month'))
      .filterBounds(que)
      .map(function (image){
        return image.clip(que);
      });

var s2f_07M = s2f_07.mean();

var s2f_08 = sen2.filter(ee.Filter.calendarRange(2016, 2018, 'year'))
      .filter(ee.Filter.calendarRange(08,08,'month'))
      .filterBounds(que)
      .map(function (image){
        return image.clip(que);
      });

var s2f_08M = s2f_08.mean();

var s2f_09 = sen2.filter(ee.Filter.calendarRange(2016, 2018, 'year'))
      .filter(ee.Filter.calendarRange(09,09,'month'))
      .filterBounds(que)
      .map(function (image){
        return image.clip(que);
      });

var s2f_09M = s2f_09.mean();


texts: Can navigation apps use compass and orientation sensors to improve reactivity and accuracy?

texts:
I've had the impression that Google Maps provides more accurate walking navigation on Android devices which include a compass in addition to a 3-axis accelerometer and GPS receiver. Perhaps this is just my imagination — or a function of better GPS ICs on higher-end devices — but I started thinking about how this might work…

Low speed, changing speed, changing direction

When traveling at low speed and turning and changing speed frequently, GPS bearing can be unreliable. Walking through twisting and turning streets with buildings reducing GPS position accuracy could be a prime example

By combining compass bearing with 3-axis accelerometer (smoothed to correct for walking motion, perhaps) the device should be able to continuously track "North-South" and "Up-Down" vectors with respect to its own axes.

When the GPS-based bearing is unreliable (lost signal, excessive jitter, sudden turn expected) then the device can use its compass-based bearing instead of its GPS bearing. This might allow the device to confirm more quickly that the user has made a 90° right turn onto a side street as expected, or alternatively that the user has turned in the wrong direction.

When acquiring/reacquiring a GPS signal

Suppose a vehicle has just emerged from an underground garage or a roadway tunnel and is at a stop. Or suppose that turn-by-turn navigation has just been initiated in a vehicle parked on a street with 2-way traffic.

Perhaps the GPS position has just been fixed, but there is likely no GPS bearing and no preceding path of motion.

So how can the navigation device figure out the orientation of the vehicle? This will allow it to show an appropriate map heading, and to tell the driver to "start by continuing straight" vs. "start by turning around and going the other way."

The compass and accelerometer can be used to determine which direction the vehicle is facing, based on the assumption that a vehicle-mounted touchscreen device is almost always installed with the screen of the device facing away from the direction of travel.

Do real navigation applications do this?

I'm curious whether real-world navigation applications actually do use magnetic compass and accelerometer data to bootstrap, confirm, or otherwise augment satellite-based positioning and bearing?

What are the problems with the approaches I've outlined?

Are there important cases where these assumptions break down, or where they can be assumed to hold with high confidence? For example, a navigation device built into a car can take advantage of a fixed relationship between the vehicle's long axis and a built-in 3-axis accelerometer, while a repositionable smartphone or GPS tablet has to be more tentative.


texts:
I have a bunch of rasters and a point file.  I need the information from ll the raster files to be added to my points.

My usual workflow is to use the Spatial Analyst sample tool.  It works fine and I can do a spatial join to get the information added to the point file.  However, furstratingly the sample tool never seems to offer useful field headings and with a lot of rasters it can become confusing as to which value relates to which raster.  Does anyone know of a script or workaround that can produce a table with field headings?


texts: PyQGIS Create Point Layer From Table Coordinate System reference

texts:
I am trying to run "Create Point Layer From Table" processing tool.
processing.run("native:createpointslayerfromtable",
               {'INPUT':'C:\\Users\\ABC\\pointfile.xlsx|layername=Sheet1',
                'XFIELD':'POINT_X',
                'YFIELD':'POINT_Y',
                'ZFIELD':'','MFIELD':'',
                'TARGET_CRS':QgsCoordinateReferenceSystem('ESRI:102080'),
                'OUTPUT':'C:\\Users\\ABC\\centroid.shp'})

This works fine if I run tool from within QGIS Python Console. However, if I run it from Spyder (which is properly connected to QGIS), python think that QgsCoordinateReferenceSystem is a variable name and I am getting following error
name 'QgsCoordinateReferenceSystem' is not defined

Any other tool is working fine so it's not issue of link to QGIS.


texts:
I am working with a world map shape file in the Spherical Equidistant Projection (Equirectangular) in QGIS 3.4. When creating a buffer using the VectorGeometry>Buffer function set for distance in meters (no degress), the resulting buffer appears as consistent width around the entire object (continents in this case). This seems wrong to me because in the Equirectangular projection 1000 meters (for example) in latitude direction at the equator appears less than 1000 meters near the poles. I would expect the buffer to get wider as latitude increases from the equator when working in this projection.
My goal is create an map with line widths that when actually applied to sphere will appear with a consistent width line width around the object. The lines need to get wider as they approach the poles to accomplish this.
If not the buffer function, which function would create the result I am attempting to achieve?


texts: Extracting a large layer from NetCDF using R

texts:
i am trying to extract specific data from an .nc file

my nc file has the following variables
   hur-relative humidity
   lat-latitudes
   lon-longitudes
   time-time
   plev-pressure levels

so i want to get the data of relative humidity for a specific plev and specific time

library(ncdf)
ncin<-open.ncdf("akhil.nc")
hur.array<-get.var.ncdf(ncin,"hur")
 error: cannot allocate 2.1 gb vector

as you can see the hur is to big so is there  any way to directly specify the plev values and time values directly into the
get.var.ncdf() function so has to reduce the vector size

i am new to ncdf files


texts: Changing transparency for black background when georeferencing raster

texts:
I georeferenced a raster file and ended up with black background (exact 000000)
The raster file contains a lot of blacks, so setting black to be a transparent color is not a good solution since I would lose the details on the raster file.
I have seen several similar questions from a few years ago. None of the answers is straightforward and works in my case. Hoping there is a better solution in more recent QGIS versions.


texts: Import GPS SINEX (for velocity analysis) into Sarscape or processing with others software

texts:
I try to import GPS snx. into Sarscape 5.2 (use GPS Import tool) and getting error

  115)   )   gps_type : [sinex]
  116)   )   generate_kml : [OK]
  117)   )   generate_shape : [OK]
  118)   )   shape_measure_in_los : [OK]
  119)   )   orbit_interp_val : [100]
  120)   )   ****************************

and

 125)   )   ************* ERROR
  126)   )
  127)   )   * Software version       : SARscape ENVI  5.2.0 Aug 17 2015  W64
  128)   )   * Actual step            :  Import GPS-SINEX
  129)   )   * Source File            : source\import_export\sars_import_gps.cpp
  130)   )   * Error Line             : 302
  131)   )   * Error Code             : 280021
  132)   )   * Primary Error Code     : 28
  133)   )   * Primary Error Des      : GPS IMPORT ERROR
  134)   )   * Secondary Error Code   : 20
  135)   )   * Secondary Error Des    : NOT ALL SITE/IDS IN SOLUTION/ESTIMATE BLOCK HAVE ALL VELOCITY ESTIMATES
  136)   )   * Error Parameter        :

Data i took from here: webigs.ign.fr And this error for other data

   145)   )   * Software version       : SARscape ENVI  5.2.0 Aug 17 2015  W64
  146)   )   * Actual step            :  Import GPS-SINEX
  147)   )   * Source File            : source\import_export\sars_import_gps.cpp
  148)   )   * Error Line             : 290
  149)   )   * Error Code             : 280018
  150)   )   * Primary Error Code     : 28
  151)   )   * Primary Error Des      : GPS IMPORT ERROR
  152)   )   * Secondary Error Code   : 17
  153)   )   * Secondary Error Des    : NON-VALID PARAMETER FOUND IN SOLUTION/ESTIMATE BLOCK
  154)   )   * Error Parameter        :

Maybe there are other software capable of importing the snx. or gsi.? Where can I get .gsi data GPS?


texts: Data for Sentinel-2 L2A product (suddenly) missing in GEE for certain dates

texts:
This code returned imagery for two date ranges previously. It suddenly stopped working for the 2nd date range (2018-06 to 2018-09).
I explored setting the cloud cover threshold up to 99 and searching for various dates. No results for the L2A (COPERNICUS/S2_SR) product are returned for any time prior to 2018-12 currently. I have verified that L2A data exists for these dates. The search will return results for the L1C collection (COPERNICUS/S2).
Does anyone have any idea how to again access this data in GEE? Could the part of the collection have been moved?
// Get granules from S2 L2A collection w/in study area
var collection_1 = ee.ImageCollection("COPERNICUS/S2_SR")
    .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 30))
    .filterDate('2019-12-15', '2020-02-15')
    .filterBounds(studyarea);

var collection_2 = ee.ImageCollection("COPERNICUS/S2_SR")
    .filter(ee.Filter.lt("CLOUDY_PIXEL_PERCENTAGE", 30))
    .filterDate('2018-06-16', '2018-09-18')
    .filterBounds(studyarea);

print(collection_1); print(collection_2);// generates JSON lists for images


texts: Convert PostgreSQL geometry to Esri ST_Geometry

texts:
I am trying to create a spatial view in ArcMap where I run a ST_Intersect against a ST_Geometry point dataset and a PostgreSQL geometry polygon dataset.  Both datasets are the same SRID.  I am having an issue converting the PostgreSQL geometry to ST_Geometry.  I haven't ever done anything like this before.  Where I am going wrong?

Below is the query I have been working with.  I am receiving an error on line 6 stating "function sde.st_geometry(geometry, integer) is not unique at [b.shape]"

SELECT a.objectid,
    a.shape,
    b.objectid AS oid
FROM cd.points a,
    sw.risk_polygons b
WHERE sde.st_intersects(a.shape, sde.st_geometry(b.shape, 4326)) = 1
ORDER BY a.objectid;


texts: Error in Google Earth Engine: 'Error generating chart: No features contain non-null values of "system:time_start"'

texts:
I try to apply an expression to the satellite image and then try to chart the mean of the series of images but I'm getting this error:

  "Error generating chart: No features contain non-null values of
  "system:time_start"

Link to the code:
https://code.earthengine.google.com/c977a6ea5b61ec830b15835036e64c97

Code:

var app = function (image)
{
var conv = image.expression(
    'band/(4.4615*10**-4)',  //formula for coverting mol/m2 to DU(Dobson)
    {
        band: image.select('SO2_column_number_density'),
  });

return  conv;
};

// Load the sentinel data
var sentinel = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_SO2')
.filterDate('2019-04-01', '2019-04-21')
.map(app)

//Identify country
var region = ee.FeatureCollection("ft:1p_3AqEj1T9fG0BNu6pGqmP6_HdDOalruzpk54Ne8");
Map.addLayer(region);

Map.addLayer(sentinel)

var TS5 = Chart.image.series(sentinel, region, ee.Reducer.mean(),1000, 'system:time_start').setOptions({
          title: 'pollutants Full Time Series',
          vAxis: {title: 'mol/m2'},
});
print(TS5);


texts:
I have geoserver 2.5.1 running on ubuntu 14.04 server. I tried to compose an image mosaic with ImageMosaicPlugin but I always get a message Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file:data/dalekovod and hints nul. Images are in the right file format because geoserver recognizes them, and I can load each at one of them separately but I have 120 images.

Any idea what could be the problem?


texts: Finding internal angles of polygons using ArcGIS Desktop?

texts:
I'm working on ArcMap 10.3.1. I'd like to retrieve the values of all internal angles of each polygon of a shapefile, and return them as follows:

either concatenated on a new field;
or on a table;
or as a new points shapefile, in which each point corresponds to a vertex of each of the original polygons, with an attribute for "angle".

Whichever way I get the values for the angles is fine.


texts: Scale line is not affected by css color of ol-scale-line class

texts:
I try to change the color of the text inside the scaleline created with Openlayers via new ol.control.ScaleLine. To change the color I refer to the scaleline in my css sheet the following way:

.ol-scale-line {
position: absolute;
width: auto;
bottom: 0.25em;
left: 88%;
color: red;
background: black;
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
border-radius: 2px;
border: 1.5px solid #703841ff;
}

Every other attribute I change works as expected, except the color. Any ideas?


texts:
I've setup a Mapnik tileserver with this steps: https://switch2osm.org/manually-building-a-tile-server-18-04-lts/

This are the specs of my server:

OS: Ubuntu 18.04 LTS
8 vcpu's
28 GB RAM

I've imported an extract of Europe (Belgium-Netherlands-France-Germany). Tile server is running, but tile generation is very slow. When showing tiles in a leaflet map, it can take 30-40 seconds to render one mapview. I've followed the steps from https://switch2osm.org/manually-building-a-tile-server-18-04-lts/ literally.

Is this normal behaviour?


texts: Spatial reference transformation for GRIB files using Python

texts:
I want to use the Python programming language to create a transformation of the spatial reference system used by NOAA in the GRIB files created by their WaveWatchIII model (link to grib files).

Using the following code to import the files:

import gdal

file = 'example.grib'
raw_data = gdal.Open(file, gdal.GA_ReadOnly)
message_count = raw_data.RasterCount
print(message_count) # files are onedimensional
print(raw_data.RasterXSize, raw_data.RasterYSize)#360 181
message = raw_data.GetRasterBand(1) # single banded files

So in each grib file there is only one layer. I have a list of GPS coordinates for which I want to look up the corresponding data value from the grib file. I tried to transform the grib file to a different projection with no success. I have visualized the grib file using the following code:

a = message.ReadAsArray()
plt.figure()
plt.imshow(a, cmap='hot', interpolation='nearest', vmin=0, vmax=10)

This yields the following picture:

The following code is an attempt to change the projection:

import osr
# get projection from grib file
source = raw_data.GetSpatialRef()

# gps coordinate system
target = osr.SpatialReference()
target.ImportFromEPSG(4326)

transform = osr.CoordinateTransformation(source, target)
transform.TransformPoint(34, 59)

The GetSpatialRef() function returns the following:

'GEOGCS["Coordinate System imported from GRIB file",DATUM["unnamed",SPHEROID["Sphere",6367470,0]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST]]

For the list of GPS coordinates I have I want to match it with the closest data point in the grib grid. The transformation in the code above simply returns (59.0, 34.0, 0.0)


texts: Coding Python about raster calculation for create a toolbox

texts:
I want to create a tool box in ArcMap. I wrote this code:

 # Import system modules
  import arcpy, os,sys
  from arcpy import env
  from arcpy.sa import *

  # Set input raster
  InputRaster=arcpy.GetParameterAsText(0)

  # Set local variables
  x = Raster(InputRaster)
  a = arcpy.GetParameterAsText(1)
  b = arcpy.GetParameterAsText(2)
  c = arcpy.GetParameterAsText(3)
  d = arcpy.GetParameterAsText(4)

 #Execute
 outRaster=Con((x>=a)&(x<=b),(x-a)/(b-a),Con((x>b)&(x<=c),1,Con((x>c)&(x<=d),(d-x)/(d-c),0)))
 outRaster.save("C:/Users/sk/Desktop/out.tif")

and when I run it , this Error occurs:

Executing: fuzzy well_dist 100 200 500 1000
Start Time: Sat Dec 29 21:14:42 2018
Running script fuzzy...
Failed script fuzzy...

Traceback (most recent call last):
File "C:\Users\sk\Desktop\Script3.py", line 17, in <module>
outRaster=Con((x>=a)&(x<=b),(x-a)/(b-a),Con((x>b)&(x<=c),1,Con((x>c)&(x<=d), (d-x)/(d-c),0)))
File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\sa\Functions.py", line 3924, in GreaterThanEqual
in_raster_or_constant2)
 File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\sa\Utils.py", line 53, in swapper
result = wrapper(*args, **kwargs)
 File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\sa\Functions.py", line 3921, in Wrapper
["GreaterThanEqual", in_raster_or_constant1, in_raster_or_constant2])
RuntimeError: ERROR 000732: Input Raster: Dataset 100 does not exist or is not supported

Failed to execute (fuzzy).
Failed at Sat Dec 29 21:14:47 2018 (Elapsed Time: 4.85 seconds)

What is wrong ?


texts: Incremental Network Loader failing with ArcSDE Geometric Network

texts:
I've been testing the Incremental Network Loader tool for loading new lines into a geometric network from an outside feature class. The tool worked perfectly on a File GeoDatabase copy of our SDE. Next, I tested the same process on a test version from our ArcSDE. Using the same workflow with the same line file, the tool ran and gave no errors, but none of the new lines appear in the network.

Any ideas why the tool isn't loading into the SDE (versioned) geometric network?


texts: Filter multiple fields in QGIS Query Builder

texts:
How do you filter multiple fields in QGIS' Query Builder?

I tried using the following:

"COUNTRIES" IN ('Thailand','Singapore') AND "ROAD_CATEGORY" IN ('Gravel Rd.','Asphalt Rd.')

...but it returns 0.


texts: Output result of queries to dataset in Model Builder

texts:
I am running a number of spatial queries on a dataset in model builder and want the number of selected features to be saved in a table. I don't want the features themselves but just the number of features that the query found. Is this possible?

I want

ID| Site       |   Number

1 | Brisbane   | 9789

2 | Towoomba   | 8389

etc...


texts: Problems with sde.next_rowid, ArcMap still uses 'old' values

texts:
Due to reasons beyond the scope of this question, I'm forced to import data into an SQL Server SDE database using SQL statements (importing using ArcGIS is not possible). The data already contains ObjectID values that I need to keep.
My idea was to create empty featureclasses first, then import the data, and finally execute sde.next_rowid several times to increase the ObjectID value for objects that will be inserted later. For example, if the data already has ID's 10–20, I need to execute sde.next_rowid 20 times, so that a new record will get ID 21.
Importing the data works, and executing sde.next_rowid too, or at least it seems so: I can see that the values for fields base_id and last_id in the i<reg_id> table are increased. However, if I insert data using ArcMap or ArcGIS Pro, new ObjectIDs still start counting at 1.

The GeoDatabase is version 10.8
SQL Server is version 2019

(Restarting ArcMap or Pro does not fix this)


texts: Expression to define label font in QGIS 3.2?

texts:
I am trying to define the font for features based on values in the attribute table. This is what I have tried in the Expression String Builder next to the Font dropdown in Layer Properties/Labels/Text:

CASE
WHEN  "descriptio"  =  'LABAYKU'  THEN Arial ELSE Times_New_Roman
END

The Expression Builder doesn't report an error, but returns Null and the font of the labels doesn't change. I tried putting brackets around the name of the font but that results in an error. I have been able to define the font size using an expression, but haven't been able to find an example of an expression that lets you customize the font itself.  What would be a valid expression?


texts: Filtering attribute table in QGIS Atlas?

texts:
I have encountered a problem with filtering "show only features visible within a map" in QGIS Atlas ?composer.

I need to have an attribute table with all mileage posts visible within one map. Although posts on map range from 19+500 to 21+900 km attribute table range from 19+400 to 22+200 km, what is the issue?

I am using QGIS 3.4.5 Madeira?


texts: Needing to pan screen for graphics to update in ArcMap?

texts:
Every time I add or change a layer or zoom in/out, I need to use the pan tool to move the  screen a little bit before the screen updates.

Is there a setting that should be changed to fix this?

I am running ArcMap 10.6 on a brand new computer with some pretty beefy hardware, so I don't think it's due to an equipment limitation.


texts: Convert MHHW (mean highest high water) to WGS84, or NAVD88

texts:
I am trying to create a tidal surface to use in mapping sea level rise.
My first step was to create a raster surface from points in ArcGIS. I then used VDatum from NOAA to transform that surface from MHHW to WGS84, since the DEMs I'm using are in WGS84. It's not working yet.

My question is-- am I doing this correctly? These are the instructions I'm using to create a tidal surface:

**VDatum Approach

• Create a grid of points; this can be generated in a number of ways including converting
raster cells to points [Raster to Point]. Point spacing should be on the order of 500 m
(1500 feet); smaller grids will increase the size of the file but add very little real
improvement. Points should be set to have an elevation of zero.

• Use VDatum* to convert the gridded points to the chosen tidal datum (MHHW).
VDatum will only assign values to the points within its model extents; this means inland
points will not typically have a real elevation number and will be assigned a -9999 value.
Defining the elevation of the inland points is an extra step covered under “Extension of
VDatum Water Surface Inland” below.

• Process parameters and steps within VDatum

Select area of interest from drop-down menu in VDatum.
Define Datum Information parameters:
 Input Vertical Datum: Desired Tidal Datum (MHHW)
 Output Vertical Datum: Datum of Digital Elevation Model (NAVD88)**

These are the instructions from NOAA. How could this be correct? How can I get a MHHW surface by starting with a grid of points at zero elevation? Don't I need information about the local tides? It doesn't seem like that's input to VDatum at any point. I am using Puerto Rico as the region, although I am actually mapping not puerto rico but a nearby coast. (that is not what is causing the problem, yet.)


texts:
How can one get coordinates from input consisting of country, route number and distance from the beginning of the route?
For example: (Austria, A1, 0 km), (Belgium, A12, 20 km) etc.
I have looked at multiple geocoding APIs and none of them offers such funcionality.
I have found a partial solution for some cases. Sometimes wikipedia page of the route contains a google maps route under External links. For example: https://en.wikipedia.org/wiki/A2_road_(Latvia) (see extarnal links at the bottom)


texts:
I have a problem running QGIS 3.4.11 Madeira properly. I am getting this error on startup.

Now I know this has been asked probably before but I can't seem to find an answer that works for me. Problems started only after I downloaded PyQT5 in my PyCharm. I think that by doing that pythonpath was overwritten somehow and now QGIS isn't loading the module properly, alas I don't know how to proceed. Also I am running it on Windows 10 if that is of any importance.


texts: Converting raster data from netcdf to image

texts:
I'm rasterizing some wind data from oos.soest.hawaii.edu/erddap/griddap/NCEP_Global_Best to use as an overlay of a final image, but I'm having issues calculating the bounding box of the final image.

Can I safely assume, giving the data is continuous, that each latitude/longitude corresponds to the center of my final pixel? If not, which metadata keys should I have been looking?

In the case that the position is indeed referencing the center of the pixel, then can I say the following?

bounding_south = smallest_latitude - (latitude_resolution / 2)
bounding_north = largest_latitude + (latitude_resolution / 2)

bounding_west = smallest_longitude - (latitude_resolution / 2)
bounding_east = largest_longitude + (latitude_resolution / 2)

Unfortunately I couldn't access the data using gdal_translate to test it.


texts: Get the right coordinates from shapefile with unknown SRC

texts:
I have a a Point Shapefile with unknown SRC, however it's plotted correctly in space, ie. in the right place, along with other files in, my project which is using EPSG:4326.
If I try to set EPSG:4326 to the unknown SRC shapefile it'll be plotted in a different and incorrect place.
I need to get the current coordinates from the points (unknown SRC shapefile), meaning that the coordinates must be correctly where they're now.
Is there any way I can do this?


texts: CRS transform from EPSG 4326 (WGS 84) ? to EPSG 27700 (OSGB 1936 / British National Grid)

texts:
I have a table which is an import of a shp file from www.geofabrik.de/ England > Roads.

I've tried to change the CRS to EPSG 27700 but when I add this back to QGIS along side other layers which are EPSG  27700 (OSGB 1936 / British National Grid) it isn't correct / near these.

I've been using, which runs, but doesn't correct the issue.

UPDATE public.roads_eng SET geom = ST_Transform(ST_SetSRID(geom,4326), 27700);

ALTER TABLE public.roads_eng ALTER COLUMN geom TYPE geometry(MULTILINESTRING, 27700);


texts:
I have a group layer and I want to show the legend of all layers in this group layer.

For one layer in this group I get the Legend with this url: GEOSERVER/KRE_KANAL/ows?service=WMS&request=GetLegendGraphic&format=image/png&width=20&height=20&layer=onelayer.

Now I want to get a legend for all layers in the group. I read here, that this is possible: https://docs.geoserver.org/stable/en/user/services/wms/get_legend_graphic/index.html

But I do not get a legend image. I tried:

GEOSERVER/KRE_KANAL/ows?service=WMS&request=GetLegendGraphic&format=image/png&width=20&height=20&layer=KRE_KANAL
and
GEOSERVER/KRE_KANAL/ows?service=WMS&request=GetLegendGraphic&format=image/png&width=20&height=20&layer=KRE_KANAL:KRE_KANAL

But all the time I get the error

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://172.16.206.128:8080/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" >   <ServiceException>
      java.lang.IllegalArgumentException: Unknown font Dingbats
Unknown font Dingbats
</ServiceException></ServiceExceptionReport>

What is my mistake?


texts:
my datasets are:

Track_02(simple road polyline shp)
***intersected with***
road_cat_cls(polygon for road categorization)
elev_rcls_poly(polygonized classified DEM)
slp_rcls_poly(polygonized classified slope grid)

With Arc, you are able to intersect multiple layers, however in QGIS it is limited to 2 at a time?  Also, the more intersects I run (I intersect the previous output with the next polygon layer in line) it takes longer and longer obviously, and when I get to the last, slp_rcls_poly, it is sticking on 4%.  Lastly, after checking the second output, I am seeing that the intersect has not fully worked, as part of my road is missing from that output.

Any help greatly appreciated.


texts: why can one user register a geodatabase with the server and the other user can not?

texts:
So i have two users; arcgis_db and AD\raclark, one can publish a service the other can not.

It all goes fine till i get to the 'service editor' screen and click 'analyze'. One user, arcgis_db comes back clean and ready to go the other user AD\raclark gets the dread 00179 error 'layers data source must be registered' however the the database i am using is registered with my ArcGIS Server site.

When i look at the server logs i see this...

Server Log

"The connection property set was missing a required property or the property value was unrecognized. Underlying DBMS error[[Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.No extended error.]"

So i can not figure it out. one user can publish a service the other user can not and it stalls out when it comes to registering data with the server.

So what is about the users that is causing this?

arcgis_db is mapped to the 'public' and 'sysadmin' server roles; it is also mapped to the 'Facilities' database as 'db_owner'. So it is the dbo and and 'sysadmin'. its also SQL server authenticated login.

AD\raclark is a mapped to the 'public' server role; he is also mapped to the 'Faclities' database as 'public' and 'data_editor' role (data editor role is given SELECT, INSERT, UPDATE, DELETE privileges on each of the feature datasets / feature classes in the database). He is OS authenticated login.

Also...

SQL Server, Windows Server 2012R, drivers are current and correct, arcgis 10.3, arcgis server 10.3


texts: How to select only one feature of a vector layer from a drop down list using OpenLayers?

texts:
I am working on a project using OpenLayers(v5.3.0) and javascript which displays a vector layer. Using a dropdown list , vector layer features can be selected.

Now the project works like, when I select a feature from dropdown list, it is displayed as selected. When I select another feature, the previous one is also displayed as selected with it.The previously selected feature is not getting unselected.

My requirement is to select one  feature at a time.How can I achieve this. My code is given below.

function selectByDistrict(selectiddist) {
  var view = new ol.View({
    projection: projection
  });

  var select = new ol.interaction.Select({
    layers: function(layer) {
      return layer.get('typename') == 'layerDIST';
    },
    style: [myStyle]
  });
  var districtName = document.getElementById('selectiddist').options[document.getElementById('selectiddist').selectedIndex].text;

  var selectedFeatures = select.getFeatures();
  selectedFeatures.clear();
  var features = layerDIST.getSource().getFeatures();

  if (features) {
    for (i = 0; i < features.length; i++) {
      if (features[i].get('DISTRICT') == districtName) {
        feature = features[i];
        selectedFeatures.push(feature);
        //set style for selected feature
        feature.setStyle(myStyle);
        var polygon = selectedFeatures.getArray();
        var extent = feature.getGeometry();

        var size = (map.getSize());
        view.fit(
          extent,
          size
        );
      }
    }
  }
}


texts: ArcGIS something wrong about raster calculator -3.40282e+038

texts:
I use one raster minus another raster .
import arcpy

... arcpy.env.workspace=r'I:\outcwb\data3'
... data2000=arcpy.Raster('AGB2000.tif')
... data2005=arcpy.Raster('AGB2005.tif')
... data2010=arcpy.Raster('AGB2010.tif')
... data2015=arcpy.Raster('2015_ChinaAGB_Final.tif')
... data05_00=data2005-data2000
...
>>> data05_00.save(r'I:\outcwb\data3\cal_agb\data05_008.tif')

It runs successfully, but I don't know why the output raster has the low value : -3.40282e+038. There should be nodata, but  why it display: -3.40282e+038?


texts: Cant find contour lines raster extraction

texts:
I am trying to create contour plot concentration data to a map. I followded this link  and have interpolated the data as follows:

but, while forming contour lines, I am not finding the raster> Extraction> Interpolation
I tried finding it in plugin but, I don't seem to find it there. What is the error I am making?


texts: Installation error - Background Geoprocessing (64bit) - ArcGIS Desktop 10.7.1

texts:
I'm running ArcGIS Desktop 10.7.1 (Advanced) (ArcGIS_Desktop_1071_fr_169511.exe). When I try to install Background GP (ArcGIS_Desktop_BackgroundGP_107_167531.exe) downloaded from our own company's site (and not ESRI site) I recieve an error that BP 10.7 requires ArcGIS 10.7.

My ArcGIS is 10.7. Already uninstalled and reinstalled ArcGIS. Before this version I was using 10.5 with no problem.


texts: How do I automate custom edge labels for township range in ArcGIS 10?

texts:
I need to label township ranges along the side and top of my map, respectively. I know the grid in the frame properties is a way to label the edges with lat/lon.  I Think there is a way to do the same type of thing with dynamic text objects.

Anyone have experience with this?


texts: Geolocating images with info of another image

texts:
I am trying to use the geolocation information of a tiff image to geolocate another. Both images are frames from the same drone footage, with the drone still over the same position. The one geolocated is a tif and the one to geolocate is a png, and it is to be converted to a tif. However, when I open the new tif in Google Earth Engine, I got it where I want it, but it's almost all white. I have also noticed that the stack created from the original .png has a fourth layer that should not be there, all of it at maximum spectral value of 255. Do you know hwat might be going on? I have also tried with the first image not as a png but as a tif without geolocation and the same happened. I have also tried with bricks instead of stacks. I tried first with rasters, but the result was even worse. All the image was white. Here is my code:
library(raster)
library(rgdal)
library(ggplot2)
library(dplyr)

## Loading image of interest as raster
R_test <-
  stack("Pt6_clear.png")
R_test ## It does not have any CRS
plot(R_test)

## Loading image already geolocated from GIS
frame2 <-
  stack("Pt6_frame2.tif")
frame2 ##
plot(frame2)
# Give image of interest the lat/lon coords of the geolocated image as appear in its metadata in the console
extent(R_test) <- c(-9073461, -9073269, 2974255, 2974366)
# Copy the projection data of the geolocated image as appears in the console to the image of interest
projection(R_test) <- CRS("+proj=merc +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs")
plot(R_test)

## Write new geolocated image into a file
writeRaster(R_test, "R_test_geolocated.tif", format = "GTiff")


texts:
I'm in the process of creating some routes for which I need left and right sections. I have an original streets feature class, which I used "copy parallels" on, and came up with something like the picture below.

I'm wondering if there is any tool that would clean up these roads, erase some dangles and intersecting lines. I've tried using the "trim" tool, but cannot come up with a standard length to trim.

Any ideas?

Using ArcGIS 10.2.1 Advanced


texts: I have delineated a shoreline and created an offset "buffer" of 75' and 250'. When projected onto the screen it appears as though a computation error has occurred and the buffers extend onto the left of the baseline. What may have caused this? I have edited the buffer nodes after the fact to trim out these shapes but would like to know for future reference.


texts: Setting layout extents using expressions in qgis layout editor

texts:
Is there a way to set my extents using a specific feature's bounds in my qgis layout? I thought of using expressions in the "Extents" box, but i am not sure whether it is possible to refer to a feature's bounds directly via the expression editor in the layout. If there is a way would someone please indicate how?
From the layout editor window:

EDIT
I tried the following expression but don't know what to do from there:
get_feature('Segments_f03a4f8c_62f6_4377_b8fb_d6f60a9016ce', "Segment", 2)
What does get_feature return? How can I extract the geometry from that? Can I then use the bounds method to get min and max bound values from the extracted feature?


texts: Using Google Earth Enterprise & ArcGIS platform together?

texts:
I have been fielded a few questions about Google Earth Enterprise (GEE) -which I don't know anything about, I'm having a time finding answers to the two following questions, which can probably be summed up by:

Do you use both GEE & ArcGIS? And, if so, how do you interact between the two?"
Can you consume GEE with ArcGIS? I am pretty sure you can bring ArcGIS created shapefiles into GEE, but does it work the other way around without converting KML data to shapefiles?
Can you use GEE as an image service? My instincts say the answer to this question is "yes", but I am unable to find an actual answer.


texts: Creating legend for data-defined colors in table using QGIS

texts:
I am using QGIS 3.10.6.
I have imported satellite imagery and geological maps from government servers. The polygon tables have a column with a code for colors. Such that I can color code my map with the exact same colors using the embedded color code. I do it through assigning a string to the simple fill for the polygon in the "single symbol" category. Since I am using a single symbol, it seems that I cannot create a legend for all the different units (color codes).
Is there a way to create a legend for polygon tables with data-defined colors using the "single symbol" symbology?


texts: Counting points creating polygon with ArcMap?

texts:
I am using ArcGIS Desktop 10.5.

In land consolidation projects, to determine success of the project, we use shape indices. For this purpose to calculate shape indices, I need to know how many points creates each polygon in attribute table.


texts:
I know this question may be better asked in a Windows Server board but I'm unfamiliar in the extreme with the software and was wondering if anything can be done inside of QGIS.  We have DFS set up and it's not replicating .qgz files because they are inherently marked as temp files.

Is there a way to change this inside the software in anyway and am I correct in thinking that these files are simply the entire QGIS project file zipped?  Aside from trying to mediate the replication issue, I'm also trying to figure out the complete purpose of these files and how they will interact in general purpose and a replication scenario in which they are unmarked as temporary.


texts: Map generation using MapProxy & Openlayer

texts:
I am new to openlayer 5 & mapproxy & I am trying to generate map using MapProxy 1.12 & openlayers5. I am using ubuntu 16.04 & have created virtual environment as in this document https://mapproxy.org/docs/1.12.0/install.html#create-a-new-virtual-environment . I was previously using openlayer2 with mapnik & tilecache (used xml, tilecache.cfg & javascript for openlayer 2) .
I have started the test server & got the demo page 127.0.0.1:8080 (as in https://mapproxy.org/docs/1.12.0/install.html#create-a-new-virtual-environment). And cache tiles are creating but I want to generate tiles from my own database. I am totally confused now . Please help.


texts:
I have a series of observation points with heights specified within a long-integer type field.  Points and DEM are in the same coordinate system.  When I run the Spatial Analyst - Viewshed tool, the output is a DEM rather than a boolean raster.
What is going on?


texts: Why does ITopologicalOperator2 .ConstructUnion produce a somehow invalid polygon?

texts:
I try to add a single buffer around the shape of the selected features. So I step through each selected feature and add it's shape to a GeometryBag. With ITopologicalOperator2.ConstructUnion I create a union geometry. But when I use this geometry to add an element, nothing appears after Refresh.

The code part for adding an element does work, when I directly assign element.Geometry = feature.Shape. So ConstructUnion seems to fail here. Any ideas why?

I already found out, that I have to simplify the shapes before adding it to GeometryBag and to set the SpatialReference on the GeometryBag before.

ESRI.ArcGIS.Carto.IGraphicsContainer graphicsContainer = (ESRI.ArcGIS.Carto.IGraphicsContainer)activeView.FocusMap;

ESRI.ArcGIS.Geodatabase.IEnumFeature enumFeature = (ESRI.ArcGIS.Geodatabase.IEnumFeature)map.FeatureSelection;
enumFeature.Reset();
ESRI.ArcGIS.Geodatabase.IFeature feature = enumFeature.Next();

IGeometryBag geoBag = new GeometryBagClass();
geoBag.SpatialReference = activeView.FocusMap.SpatialReference;
IGeometryCollection geometriesToUnion = geoBag as IGeometryCollection;
while (!(feature == null))
{
  ITopologicalOperator2 shape = feature.ShapeCopy as ITopologicalOperator2;
  shape.IsKnownSimple_2 = false; // see nef001's answer
  shape.Simplify();
  geometriesToUnion.AddGeometry(shape as IGeometry);
  feature = enumFeature.Next();
}

IPolygon poly = new PolygonClass();
resultPolygon.SpatialReference = activeView.FocusMap.SpatialReference; // see Petr Krebs's comment
ITopologicalOperator2 resultPolygon = poly as ITopologicalOperator2;
resultPolygon.ConstructUnion(geometriesToUnion as IEnumGeometry);
IFillShapeElement fillShapeElement = new ESRI.ArcGIS.Carto.PolygonElementClass();
fillShapeElement.Symbol = fillSymbol;
ESRI.ArcGIS.Carto.IElement element = (IElement)fillShapeElement;
topologicalOperator = (ESRI.ArcGIS.Geometry.ITopologicalOperator)resultPolygon;
//element.Geometry = topologicalOperator.Buffer(distance);
element.Geometry = resultPolygon as IGeometry; // To make sure, it's not the Buffering that goes wrong
graphicsContainer.AddElement(element, 0);

Update:
To address Petr Krebs suggestions

I changed the assignment of geometriesToUnion.AddGeometry to feature.ShapeCopy.
I changed the assignment of element.Geometry to resultPolygon instead of the
buffer output.

Both didn't help.

For testing I use a single layer where I select three polygon features. So the are all  polygons and have the same SpatialReference.
resultPolygon.IsEmpty after ConstructUnion is false.

Update 2

Regarding Nef001's answer I added shape.IsKnownSimple_2 = false; but it didn't change the result.

Update 3

Regarding Petr's answer I set the spatial reference before Union() but it didn't help.


texts: Can attribute table in map composer be changed from limit of 99 rows?

texts:
I am using Qgis 2.2. I am about to create a cadastral index map, which are showing the parcels in specific gridcells, also there is an attribute table connected controlled by an atlas function. So by switching from gridcell to gridcell the attribute table automatically changes. Every gridcell has more than 99 parcels (Sometimes up to a few 100)

However, the attribute table in the map composer is limited to 99 rows, so not all parcels can be shown in the attribute table.

How can I increase the limit of 99 rows?


texts: How build NDVI based on multi-bands on different files (one band - one file) in geoserver?

texts: I am using a geoserver. I have several bands (b1, b2, b3..etc) I need to build NDVI based on them, for this I need to have access to each of the bands, but since they are in separate files, when I load data like GEOTIFF, I only see one layer (b1 or b3 or b4). How can I upload 10 land files one at a time and use them? I have all the files, just specifically the GEOTIFF repository allows you to download only 1 file, that is, 1 band in my case.


texts:
I'm using QGIS 3.10 LTR. In my project I have a point layer (location of pictures) with 3 different actions (open file, open folder, open html). This works fine for me.
To this layer I add time by time new objects (new pictures) which are sometime very close to next object.
When I select the layer and the action and click to on an object then sometimes opens a menu with numbers. I think this are the object id's. Is it possible to show an attribute an not the id?
I searched in the settings an here, but couldn't find a solution.


texts: WMS raster deforms, wraps while panning or zooming in and out

texts:
I have set up a WMS raster service in the native EPSG:2462 using GeoServer and I am trying to use it in Autocad Map 2017, the service seems OK at the first insert moment, but then the image wraps while panning or zooming in and out.

The raster EPSG code and project EPSG code are the same, EPSG:2462 so it doesn't have to reproject on the fly.

I noticed that if manually reproject raster and add as a new layer with the native EPSG:32634, and then add it to the project which also has the EPSG:32634 in Autocad Map 2017, the issue disappear. It is a solution, but I don't want to reproject all of my data because of that.

Screenshot of the map:

The vector lines are the path where the image should be close to, but it doesn't, it just get deformed and wrapped around randomly.


texts:
I am trying to reproject a raster and change its resolution with the function projectRaster() in R.

I looked up at the R documentation website (https://www.rdocumentation.org/packages/raster/versions/2.5-8/topics/projectRaster) and found the following code for it:

projectRaster(from, to, res, crs, method="bilinear",  alignOnly=FALSE, over=FALSE, filename="", ...)

I tried to replicate it using the following code:

newproj <- "+proj=aea +lat_1=20 +lat_2=60 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m"

projectRaster(lradin, 94.65157575, crs = newproj, +datum=WGS84, method="bilinear", filename="lradin_1", overwrite = TRUE)

Here, lradin is the raster object, 94.65157575 is the resolution that I am changing to (in meters).

My original raster (lradin) is in WGS1984 coordinate system with a resolution of 0.1° x 0.1° and I need to change it in Asia North Albers Equal Area Conic projection with a resolution of 94.65157575 meters.

When I run the code I get the following error:

Error in projectRaster(r, a, 94.65157575, crs = newproj, method =
"bilinear",  :
 output projection is NA

I am not understanding what the error is. I feel I have written the code according to the documentation website. Could anyone suggest something ?


texts: Getting RuntimeError while creating CreateGISServerConnectionFile using Python

texts:
I'm inexperienced using Python and keep getting a RuntimeError when I try to follow the instructions to create an ags server connection file on this page - https://desktop.arcgis.com/en/arcmap/10.5/analyze/arcpy-mapping/creategisserverconnectionfile.htm.

Here's my code:

import arcpy
outdir = 'C:/Project'
out_folder_path = '\\gis\users\Locators'
out_name = 'automatedScript.ags'
server_url = 'https://MyServer.gislan.local:6443/arcgis/admin'
use_arcgis_desktop_staging_folder = False
staging_folder_path = outdir
username = 'admin'
password = 'admin'

arcpy.mapping.CreateGISServerConnectionFile("ADMINISTER_GIS_SERVICES",
                                            out_folder_path,
                                            out_name,
                                            server_url,
                                            "ARCGIS_SERVER",
                                            use_arcgis_desktop_staging_folder,
                                            staging_folder_path,
                                            username,
                                            password,
                                            "SAVE_USERNAME")

RuntimeError

Traceback (most recent call last):
  File "<string>", line 20, in <module>
  File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\utils.py", line 182, in fn_
    return fn(*args, **kw)
  File "c:\program files (x86)\arcgis\desktop10.5\arcpy\arcpy\mapping.py", line 314, in CreateGISServerConnectionFile
    return convertArcObjectToPythonObject(arcgisscripting._createGISServerConnectionFile(*gp_fixargs([connection_type, out_folder_path, out_name, server_url, server_type, use_arcgis_desktop_staging_folder, staging_folder_path, username, password, save_username_password], True, False)))
RuntimeError

Any thoughts on what I'm doing wrong?


texts:
I want to use GeoNetwork CSW HTTP services from a full Java stack client, and not web client, mainly to use HTTP transactional service.

I'm always redirected on the login HTML page after making a post login request with the proper credential. I receive session id cookies correctly, and I provide it to next level transactional POST request, but I always receive the login HTML page as answer.

My use case is to fill up the CSW catalog in a programmatic way, and not using the web sheet.

Does any tutorial exist on that way of working with GeoNetwork CSW?


texts: Creating same number of points along multiple polylines using ArcGIS Desktop?

texts:
Input:
Polyline Shapefile (all lines are different lengths) and a specified number of points that will be placed on the line (will be same number of points for all lines)
Desired Output:
Point shapefile with a point at each end of the poly line and the remaining points equally spaced spaced along the line.  See picture.  In this example, I would input Polylines A/B/C/D and specify that I want 6 data points.
.
Using the "Construct Points" tool in Editor is not an option, I need this to be done for approximately 70,000 lines.
I have tried ET Geowizards, Hawth's Tools, and have looked through XTools Pro but have not found any solution.  It is imperative that each polyline have the exact same number of points and that a point is created at the start and end of the line.


texts: MCD19A2: Alternative to masking with quality property that does not create zeros in GEE

texts:
Third Edit: The only reason I can think of for my exported zeros is that MCD19A2 reports some missings as zero, but gives them a "Best Quality" value in the AOD_QA band. This means for many regions all pixels get masked out, but some zero measurements stay. Is that plausible?

Second edit: The behavior of .mean() functions is explained in the official tutorials, e.g. here https://developers.google.com/earth-engine/reducers_reduce_region. They do not take into account pixels that are masked out.

First Edit: I'm wondering now whether it is default behavior of ee.Reducer.mean() to return zero if all pixels are missing. I haven't found anything on this in the documentation. Can anybody confirm this?

I'm creating daily pollution averages by ROI with MCD19A2_GRANULES and I want to filter out low quality images. Currently, I'm doing this with a mask, but I get  zeros rather than missings after I take the mean() of the daily ImageCollection and after applying the ReduceRegions to these daily means. I assume that this is due to the mask creating zeros in the band.

Would it make sense to do a .filter(ee.Filter.neq('Optical_Depth_047', 0)) in Line 69 after I map my filterBadObs function over the ImageCollection? The problem is that this would also filter out true zeros.

What would be a better way to filter here?

https://code.earthengine.google.com/93d347f272c81105144c0afff82da125


texts: Solving ERROR 000732: Input Raster: Dataset Con( does not exist or is not supported in for loop?

texts:
I'm trying to reclassify rasters based on standard deviation. I created this code, but I think I'm wrong using "Con". I would like to assign value 1 to rasters >= to threshold and rasters <= to threshold1 and assign NODATA to the remaining.

This is my code:

    import arcpy
    ws2 = r"C:\unsupervised_classification\output\raster_tagliati_su_flowacc"
    v_name_sc_img = r"C:\unsupervised_classification\output\outliers\{0}_out1.img"
    v_name1_sc_img = r"C:\unsupervised_classification\output\outliers\{0}_out2.img"
    arcpy.env.workspace = ws2
    ras_names = arcpy.ListRasters()
    for ras_name in ras_names:
        name, ext = os.path.splitext(ras_name)
        ras = arcpy.Raster(os.path.join(ws2, ras_name))
        mean =float(arcpy.GetRasterProperties_management(ras, "MEAN").getOutput(0).replace(',','.'))
        STD=float(arcpy.GetRasterProperties_management(ras, "STD").getOutput(0).replace(',','.'))
        threshold_sup=mean + 3* STD
        threshold_inf= mean - 3* STD
        expression="Con(" + ras + "=>" + str(threshold_sup) + ",1,setnull([ras])"
        a= arcpy.gp.RasterCalculator_sa(expression, v_name_sc_img)
        expression1="Con(" + ras + "<=" + str(threshold_inf) + ",1,setnull([ras])"
        b= arcpy.gp.RasterCalculator_sa(expression1, v_name1_sc_img)
        a.save(v_name_sc_img.format(name))
        b.save(v_name1_sc_img.format(name))

Arcpy give me this error:

RuntimeError: ERROR 000732: Input Raster: Dataset Con( does not exist or is not supported


texts: Save output raster and automatically open in ArcMap?

texts:
I want to reclass (by Table) raster files, then perform raster addition of the output (reclassed) rasters, then automatically display the final output (raster SUM) in ArcMap. This is the code that I created. Lines 1-32 works well, but when I add line 33

This error will appear:

  "______, line 33, in  SUM.save(SUM) TypeError: type
  is not supported"

# Import system modules
import arcpy
from arcpy import env
from arcpy.sa import *
import os.path

# Set environment settings
path = "mypath"
env.workspace = path.replace("\\","/")

#To overwrite existing files
arcpy.env.overwriteOutput = True

# Local variables:
F1 = "raster1"
F2 = "raster"
TABLE = "F.dbf" #Table to reclass raster
F1_REC = "raster1_reclass"
F2_REC = "raster2_reclas"
SUM = "sum.tif"

# Check out the ArcGIS Spatial Analyst extension license
arcpy.CheckOutExtension("Spatial")

# Reclass by Table F1
arcpy.gp.ReclassByTable_sa(F1, TABLE, "F1_FROM", "F1_TO", "F2_RE", F1_REC, "DATA")

# Reclass by Table F2
arcpy.gp.ReclassByTable_sa(F2, TABLE, "F2_FROM", "F2_TO", "F2_RE", F2_REC, "DATA")

# Process: Add F1_REC and F2_REC
SUM = Raster(F1_REC) + Raster(F2_REC)
SUM.save(SUM)


texts: Where is the "Intersection" tool located in QGIS 3?

texts:
I would like to generate the intersection between lines and polygons lines and polygon in QGIS 3 and extract the id number for each line. I would like to assign a red color to the resulting lines automatically. I would also like to export the results to MS Excel format.

Where is the intersection tool located in QGIS 3?


texts: Fixing "ImportError: No module named qgis.core"?

texts:
First of all, I'm using Python 2.7.3, QGIS 1.8 (Lisboa) on Windows 7 pro 64 bits.  Now let's go to the actual question:

I have written some code (Python) that works well within the QGIS built in Python console, but now I need to run it from outside QGIS (it is too much to ask for the final user to open QGIS, then the python console and to copy and paste the code).

I have been trying to access the QGIS API, but it is missing from my PYTHONPATH. I've tried whatever is on the instructions, plus a bunch of paths like:
 C:\Program Files(x86)\QGIS\apps\qgis\python\qgis and  C:\Program Files(x86)\QGIS\apps\qgis\python. My result so far is always the same:

import qgis.core
ImportError: No module named qgis.core

Any ideas?


texts: Length of line on specific point (from point layer)

texts:
I have a line and a point layer. The points are manually set next to the line at specific places. Now I would like to get the distance between the end/start of the line and the points.

Distance from the black point along red line to start and to end of line:

Distance from Blackpoint #1 along the red Line to Start (i.e. 5km)
Distance from Blackpoint #1 along the red Line to End (i.e. 50km)
Distance from Blackpoint #2 along the red Line to Start (i.e. 10km)
Distance from Blackpoint #2 along the red Line to End (i.e. 45km)

As you can see in the image, the black points are not exactly ON the line. The closest line-node should give the result. I need to know the distances for every black point (I have hundreds of them!).

I'm looking for a QGIS, Python or PostGIS solution. Because the black points and the line are changeing some times, it would be great to have a "dynamic" approach without changeing the geometry of the line.


texts: Downloading Map Tiles from Griffiths Valuation of Northern Ireland?

texts: I would like to download map tiles of Northern Ireland associated with Griffiths Valuation of Ireland in 1867.  These maps have details of property leased by individuals, including farm fields and houses.  These are available on the web at  http://www.askaboutireland.ie/griffith-valuation/index.xml?action=doNameSearch&Submit.x=31&Submit.y=11&familyname=Burns&firstname=James&baronyname=&countyname=DOWN&unionname=&parishname= then click on one of the map icons.    I have used tif copies of the maps then displayed on the web site, ported successfully to QGIS 3.2. But I want something more extensive and useable with good resolution at higher zoom levels to look at individual farms within particular townlands.  I might be able to do this using the tiles which are evident in the displays.  I use georeferencing to line up the resulting 1850s OS tif maps with a more modern map.


texts:
I'm looking for a way of converting CSV file to GeoJSON in C++

I'm currently writing a conversion function that writes a text file with the structure of a GeoJSON file, but this isn't really sexy. Maybe is there a library, or a well done function to do it properly?


texts: Assessing OpenStreetMap coverage for international routing

texts:
I posted the following question on the main StackOverflow website, but was informed that I might get a better response here. Hence I'm copying it below. Note however, that I have an active bounty on the original posting.

I have been using a commercial solution for route distances and travel times for North America and Western/Mid Europe. I am considering expanding the project to cover other countries - and perhaps the entire world. A very limited budget and patchy regional coverage from individual commercial providers, probably make locally-hosted OpenStreetMap the only viable option. Before someone suggests an online solution, my application requires a lot of intensive route calculation - something which would cost a lot or be very impolite (and probably banned) if performed using a web service. The results of the calculations are put back in the public domain, so rediting OpenStreetMaps is not a problem.

My problem is how do I assess the routing data coverage for individual countries in the OpenStreetMap database? Such an assessment could determine if the project is viable, and a suitable order for processing (ie. do the countries with the best coverage first).

High-end commercial data providers can typically supply statistical descriptions, as well as regional descriptions of surveyed coverage. OpenStreetMap is much more patchy - an area typically includes some roads, but not all roads. Individual location errors of a few metres of even 10-20m will not be a problem for my application (I'm looking at city-city distances), but route graph connectivity is. Ie. the road vectors must logically meet correctly at a junction.

Has anyone attempted to create statistics describing data coverage of the OpenStreetMap database?

If not, how would you go about it?

The best I can think of is to take a random sampling of places (eg. cities), and then attempt to calculate routes. There would have to be an assumption that the major roads will tend to be added before the minor roads. Therefore a route between two distant cities would use the logical major road, and not a minor road (which is typically longer/slower) because the major road is missing.

Another problem would be that it is physically not possible to drive between many towns. Often this is due to the presence of islands (where ferries could be used) but often there is no surface route (eg. settlements in Nunavut). So how would such statistics be used when comparing between (say) Tonga and Afghanistan. Afganistan probably has very low data coverage. Tonga is probably better but the settlements are spread out across an archipelago.

Some details about my application: All start and end points are towns and cities with locations taken from the Geonames database. Typically I am looking at the 1000 largest cities in a country that also have a population of at least 1000. Routes are currently calculated in duplicate as both fastest routes and shortest routes. Reasonable road speeds vary according to broad road categories. Estimated travel times are computed alongside road distances. These details are preferences for consistency- they are not set in stone.


texts: QGIS 2.0.1 - problems to add layers - encoding?

texts:
I have just installed standalone QGIS 2.0.1 on a PC with Windows 8.
But, when I open it and try to add layers nothing happens?
I browse to find the file I want and click 'open' but it doesn't turn up as a 'dataset' under 'source'. My first thought was that it is something with the encoding (it says 'system'). The encoding on my other PC with QGIS 1.8.0 is set to 'UTF-8'.

I installed QGIS 2.0.1 on another PC with Windows 8 a few months ago, and it works fine.
What can I have done wrong? Can it be something with the settings?

I have tried with both .shp and .ecw-files.


texts: Upgrading to ArcGIS 10.2 for Server and security vulnerability?

texts:
I have ArcGIS 10.1 Installed on my CentOS server and I have also installed "ArcGIS-101SP1-S-SSEC-Patch-lx" security patch.

Do I need to upgrade ArcGIS for Server to 10.2? If I don't install the latest version Would it be a vulnerability for the current version?


texts: How should I properly release .NET extensions I create?

texts:
This is an extension to the following question:

ArcMap.exe processes stay open after closing ArcMap?

None of the answers go into how to properly write your extension so that it releases when ArcMap exits.  I'm positive it's somewhere in ESRI's help, but I haven't been able to find a complete example.

In my extension am I looking for all created objects and then making them null when they're not used anymore?  For the extension specifically, am I listening for ArcMap to close then making the extension null?  I'm not sure how to do that from inside the extension, or where it should be done from outside the extension.  I can post code if that would be helpful, but would rather get a pointer to the How-To, then I can post code if I can't get it to work.


texts: Absorb data from dxf texts to near lines

texts:
So, I have 2 dxf files, one with lines and another with nodes (they used to be texts measuring the lines), and I need to extract the text from those nodes and assign it to their corresponding lines.
Theres exactly one node for every line, at a distance of around 2 or 4 map units from the corresponding counterpart. I need to join them but adjusting max distance to those 2 or 4 units and also selecting the node with the most close text to the real measure (I mean, if a line is 50mts long and the closest node's text says 6mts, then thas not the right line, avoid it and keep searching more nodes in the specified radius. Thought about using a tolerance, fixed or porcentual)
I dont have a clue about how to do this. I could use a script, even a not efficient one, because is a one time task...
This is what I have got from cadists...

And this is what I need to accomplish

Im using QGis 3.10


texts: Is there a common way of notating which revision of WGS84 is being used?

texts:
In requirements/specifications if WGS84 is indicated, is there a standard way to determine which revision of WGS84 is being referenced? For example, while WGS84 was developed in 1984, the latest revision to it was in 2004.

In my case, what I'm especially concerned about is if there is another revision in the future. What is the standard way for me to indicate that software was designed relative to the 2004 revision of WGS84?

If these revisions are so trivial that it doesn't matter, that is also an acceptable answer. I could not find out what revisions existed between 1984 and 2004 nor what revision exactly was made in 2004.


texts: Create multiple features from a single field

texts: I have a point feature class showing addresses where trees were planted. A single row in the attribute table represents a single address. I have a field in the attribute table called "TOTAL_TREES_DISTRIBUTED" which tells me how many trees were planted at that address. What I'd like to do is transpose or explode? (not sure what the term is here) that "TOTAL_TREES_DISTRIBUTED" field into multiple point features for an address. For example, address 123 Main St has a value of 3 in the "TOTAL_TREES_DISTRIBUTED" field. Currently, my feature class shows 1 feature point at 123 Main St and 1 attribute table row with a value of 3 in the "TOTAL_TREES_DISTRIBUTED" field. Instead, I'd like 3 points located at 123 Main St and 3 rows each representing 1 single tree. So in essence, the way my table is designed is one-to-many...1 feature/row may represent multiple trees. Ideally, I'm looking to migrate this data into a one-to-one format...1 feature/row represents 1 tree. Any advice on how to do this? I'm using ArcGIS Pro 2.5 but willing to tackle a workflow in ArcMap 10x or Excel.


texts: Control source file encoding (properly read windows 1255 encoded shapefiles) in ArcGIS Pro

texts:
My source data shapefile contains multiple attribute fields in Hebrew.
I dragged it into a new empty map in ArcGIS Pro and created a layer. The geometry and English fields of the attributes table are correctly displayed. The Hebrew ones appear as gibberish in latin characters.
I tried the same source file in QGIS. Once I set the layer encoding to Windows 1255, all fields were correctly displayed.
I don't seem to find in ArcGIS Pro any setting that allows to control the source file encoding.
Any ideas?


texts:
I have generated isochrones for London based on my parameters.

However, the isochrones by definition are overlapping polygons.

I would like to show the different polygons of the isochrones using different colors.

I have tried using gradient symbology, but the desired effect is not there since the overlapping polygons are making the different colors interact with each other.

I can separate the polygons into different files and then subtract each polygon from the others so that they don't overlap.

However, since I am relatively new to QGIS, I am wondering whether there is an alternate simpler way to achieve this visual effect?

I am using QGIS 3.4.1


texts: My NDVI mapping on GEE is so strange (same thing for the entire image). Help me?

texts:
I'm trying to generate the NDVI mapping for my classification.
However, I uploaded each band, created my feature collection (with 4 bands), renamed the bands because they are as "b1" for all images in my collection.
After that, I tried to do a NDVI function and visualizing the map. But, my map is with one color in the entire image.
    //calculate NDVI
function add_ndvi(img) {
  var ndvi = img.normalizedDifference(['b4', 'b3'])
  .rename('NDVI');
  return(img.addBands(ndvi));
}

var NDVI33 = mar03.map(add_ndvi).select('NDVI');
print(NDVI33, 'NDVI');
Map.addLayer(NDVI33, {min:-1, max:1, palette: cores}, 'NDVI33');

I need help to generates the right map.
Thanks for any help,
Best regards,
Nayara


texts:
I need to measure agricultural fields. I have Points (gpx format) of the perimeter of the  field and geotagged pictures on the same perimeter.
I use the pictures to verify the measurement.

I already do load in QGIS the polygon shape of the field and point shape of pictures.
I also can use map tips to show the picture as moving above the point, but a field can have more than 100 pictures and is laborious to go with the mouse above each of the points.

I can also use Time Manager to show the picture points as time goes by.
What I would like to do:
is to use the Time Manager to not just show the point (location of the picture) but the map tip too.
At the end I would like an automatic mode to verify easily the field measurement watching (as if it was a film) the points and images show themselves as time goes by.

I'm using QGIS 2.18; Time Manager 2.4.1


texts: WMS Layers from Azure Geoserver not loading with multiple users

texts:
I am loading multiple WMS layers into a leaflet web application from an Azure virtual machine Geoserver that pulls data from a PostGIS database on the same machine.

The layers load through quickly and work well with a couple of people using the application. However, once many people start loading the layers through multiple instances of the application the layers do not load.

I am looking for a steer on what the possible solutions to this may be as I imagine it will not just be one simple fix.


texts: Script sometimes stuck at arcpy.SplitRaster_management

texts:
my problem is that my script sometimes stuck then it use arcpy.SplitRaster_management.

import arcpy
import os

#nearly 700 rows of script

fclist: [ ...] # some fc
rasterlist = [...] # many raster
for raster in rasterlist:
    rasterpro = arcpy.ProjectRaster_management(raster, "in_memory\\rasterpro", 25832)
    for fc in fclist:
        os.makedirs(newfolder + "\\" + filenamenew + "_" + os.path.basename(fc))
        arcpy.SplitRaster_management(rasterpro,
                                    newfolder + "\\" + filenamenew + "_" + os.path.basename(fc), # it is a correct path, which should work fine
                                    filenamenew + "_" + os.path.basename(fc) + "_",
                                    "POLYGON_FEATURES",
                                    "#",
                                    "NEAREST",
                                    "#",
                                    "#",
                                    "#",
                                    "#",
                                    "#",
                                    "#",
                                    fc)

# some more rows of script

Most of the times it works just fine, but sometimes the script just stops there and doesn´t go on. If i restart the script, sometimes it works without problems, then sometimes the first itteration does not work. So the problem does not occur after a set number of itteration, the same Feature Class or with the same raster!

Did i do something wrong with my inputs in arcpy.SplitRaster_management?

EDIT: If i run the script inside my Editor (Pyzo), the problem does not occur. Only if i use it inside a Toolbox in ArcGIS Pro.

EDIT2: I wrote a second shorter script, to look if i can repeat the error. I used other FC and other raster.

import arcpy
import os
arcpy.env.overwriteOutput = True
path = r"D:\Projekt"

FC1 = path + r"\tool_und_gdb\polyfc.gdb\polyfc1"
FC2 = path + r"\tool_und_gdb\polyfc.gdb\polyfc2"
FC3 = path + r"\tool_und_gdb\polyfc.gdb\polyfc3"
fclist = [FC2, FC2, FC3]
arcpy.env.workspace = r"D:\Projekt\raster.gdb"
list = arcpy.ListRasters()
x = 1
for raster in list:
    for fc in fclist:
        name = os.path.basename(raster) + "_" + os.path.basename(fc) + "_"
        arcpy.AddMessage(name)
        arcpy.SplitRaster_management(raster,
                                    r"D:\Users\Jakobsm\Desktop\test",
                                    name,
                                    "POLYGON_FEATURES",
                                    "#",
                                    "NEAREST",
                                    "#",
                                    "#",
                                    "#",
                                    "#",
                                    "#",
                                    "#",
                                    fc)
        arcpy.AddMessage(x)
        x +=1

The same error happens, if i use the script inside of a Toolbox in ArcGIS Pro, but not if i run the script inside of my Python Editor.


texts: Error - Grass 7 doesn´t run because isn´t not sucessfully installed

texts:
I am having problems to run GRASS7 from the processing tool. Always run the following error that is not corrected instaled. I ve reinstall QGIS several times, even tried different versions,as also tried many solutions present in similar questions in StackExchange as copy msys, etc.., but so far unsucessfully.

What could be the problem?


texts: Protecting data in file geodatabase (making read-only)?

texts:
What kind of steps can I take to protect data in a file gdb, or even the entire gdb, so that it can't be modified inadvertently? (e.g. by a tool like Rubbersheet that modifies data in place.)

I understand the file-gdb does not have the concept of users or permissions, and that to use those we must use an RDBMS. What's the best I can do, given that using file-gdb is a requirement?

Note: I'm using ArcGIS Desktop 10.3 but did not tag the question that way as some answers may be relevant to other platforms.


texts:
Background: I have a single geoJSON data object that backs multiple Vector Layers of its features.  I do this because the feature data has many attributes and can be presented in many different ways, and by having multiple layers, I can quickly switch between visualizations.

My issue comes into play when I update the data in the corresponding backing-data store.  Since the features were only loaded once (Strategy.fixed), they do not see the updates to the underlying store, and instead retain the properties they were initially loaded with.

I was hoping there was a strategy or eventing mechanism already created that I can alert my layers that it's underlying data has changed and to refresh it's features as required.  As of now, I have to either a) update each feature in each of my layers and then redraw those that changed or b) remove and add all the features on each of my layers for them to see the changes.

I imagine that the Refresh strategy could somehow be of assistance, but that would bring it's own issues (namely intervals instead of instant updates and the need more for more than just inline geojson object declarations).

Thanks for any help or suggestions.


texts: Generate QGIS maps automatic after updating an Access 2010 or Filemaker Pro 12 database

texts:
I want to develop a database which consist an interaction with QGIS. After updating the data in the database I want to push on a button and start a process in QGIS. After finishing the process in QGIS I want to import the results in the database. Therefor I need or want to build an executable which starts a process in Python. The part in QGIS is already covered, but is it possible to start the processes in QGIS with an external executable? I have found information about starting an external executable from Python, but I want to do it the other way round. Has anyone experience with starting Python processes from an executable? And which executable can be recommended?

Thanks in advance.


texts: Reading and writing tiff image and locate pixels and bands of images in R?

texts:
I am new in R.

I want to know how to read and write tiff format image in R and how to use R to locate pixels and bands of images
My environment is in Windows
when I try to read tiff image
it shows

readTIFF("Z:/For bo/July1.tif", as.is=TRUE)
Warning messages:
1: In readTIFF("Z:/For bo/July1.tif", as.is = TRUE) :
  TIFFReadDirectory: Unknown field with tag 33550 (0x830e) encountered
2: In readTIFF("Z:/For bo/July1.tif", as.is = TRUE) :
  TIFFReadDirectory: Unknown field with tag 33922 (0x8482) encountered
3: In readTIFF("Z:/For bo/July1.tif", as.is = TRUE) :
  TIFFReadDirectory: Unknown field with tag 34735 (0x87af) encountered
4: In readTIFF("Z:/For bo/July1.tif", as.is = TRUE) :
  TIFFReadDirectory: Unknown field with tag 42113 (0xa481) encountered

how to solve it?