texts: Interactive computation of spatial data on a web-map

texts:
All the GIS area is very new to me so I would like to ask about a guidance of my next steps.

This is the web-map I would like to make (if it is possible):

Lets consider the following map:

.

Each cross represents spatial data in form of point. A number between 1-100 is associated to each point. Any other given point on the map is situated inside an imaginary square defined by the 4 closest spatial data points. For that given point, I would like to display a value witch is computed by linear interpolation of the 4 values of the square corners.

So I would like to show for example:

lat: 43.9 deg; long: 18.1 deg, approx. value: 35.5%

Is it possible to create such map? At which layer I should define the interpolation algorithm?


texts: Finding and filtering out similar points between two layers using ArcGIS Pro?

texts:
Are there any tools, libraries, plugins, either standalone or for use with ArcGIS Pro that can aid in the process of identifying very similar points between two layers?

What I mean with similar

I mean points that may be located close by and may have similar values in string attributes. For example, two points 10 meters away labeled "STARBUCKS COFFEE SHOP" and "Star bucks (Street Mall)". These points are supposed to represent the same location, but are not identical.

My specific problem

I have thousands of points collected from various different sources. These sources are supposed to represent the same data but were collected by different people using different methods. As expected, points do not match up perfectly, some have slightly different labels, no dataset is complete and all of them have points that are not available in other layers.

What I'm trying to achieve is aggregate all these layers into a single layer, hopefully identifying and deleting points that represent the same location ("duplicate" points) in order to clean it up.

Currently, I'm doing the following:

Load the two layers (A and B) into ArcGIS Pro
Use the "Select Layer By Location" tool to find all points in layer A that are 5 meters away from any point in layer B and save them into a new layer.
Do the same to find points in layer B that are close to points in layer A.
Remove these points from their original layers.
Manually zoom in to located points and inspect their attributes. If the attributes are similar, delete one of them. If not, leave them as they are.
When finished, aggregate layers A and B and the edited layers into a single layer.
Repeat this with a bigger search radius (10 meters, 15 m, etc.).
Repeat this for all other location types.

Needless to say, this is extremely tedious and time consuming, especially the parts with dealing with selecting layers, selecting points, creating new layers, renaming them and such.

What I've found that didn't help

ArcGIS Similarity Search: Only works with numeric fields, not similar strings.
Finding redundancy between two layers: It's about identical points.
Finding and merging duplicate points in ArcGIS Desktop?: Only takes distance into consideration, which doesn't help make sure points are in fact representing the same location.

Note: I'm a GIS beginner, but a programmer by profession. I've been contemplating building a custom web application for this, but sounds like overkill for what I would consider a rather common task.


texts: Calculating slope from elevation returns hole when using ST_Slope in PostGIS

texts:
I have rasters from the National Elevation Dataset loaded into a Postgres database and am using the built-in function ST_Slope to calculate the slope. However these contain many holes where there is valid elevation data.

Here is my query:

SELECT (ST_DumpValues(ST_Slope(raster), ARRAY[1], False)).valarray as slope
FROM nat_elev_data
LIMIT 1;

I suspect that I need to pass additional parameters but am not sure what.


texts: How to keep basemap high res detail when printing large resolution in QGIS?

texts:
I need to print a map with a0 resolution and I need it zoomed over a large area.

Problem when zooming out is that the basemap also gets zoomed out and loses labels and important details.

Basemap is from Quickmapservices plugin

How to keep the lower resolution basemap details on the print composer?


texts: QGIS - Python errors not reporting to Python Console

texts:
Ive been writing a number of small plugins for use in QGIS, and have found that during development having the traceback calls reporting to the python console plugin to be quite useful.

I Use QGIS on three machines, but have found that now on two of these, all the python errors/tracebacks are going through the generic Python Error Dialog - this only occurs if there is an error on startup of the plugin on the machine which reports the traceback to the python console.

Does anyone know how I may be able to set the behaviour back to reporting to the python console instead of the dialog box?


texts: Automatic "Extract by Expression" processing with PyQGIS

texts:
Refering to this post and particulary the etrimaille's comment, I want to clean my dataset created from OSM data in QGIS.
In each layer, I want to extract the entities having a specific key and value, using the "extractbyexpression" processing.

It works well using directly the former key and value :

new_layer = processing.run("qgis:extractbyexpression", {'INPUT': layer, 'EXPRESSION':'"amenity" ILIKE \'parking\'', 'OUTPUT':'memory:'})['OUTPUT']

But if I use variables in the expression, all the features are selected, without filtering (it selects the children objects too) :

key = "amenity"
value = "parking"
expression = "'"+"\\"+'"'+str(key)+"\\"+'"'+" ILIKE "+"\\"+"'"+str(value)+"\\"+"'"+"'"
new_layer = processing.run("qgis:extractbyexpression", {'INPUT': layer, 'EXPRESSION':expression, 'OUTPUT':'memory:'})['OUTPUT']

I need to proceed this way because I have a lot of layers, and I don't want to write the code for each layer.
I suppose my expression is not correctly written, because the result of the second process should be the same as the first.

Can anyone explain me what I'm doing wrong ?


texts: Comparing string in one column to some others using QGIS?

texts:
I'm trying to write an expression which will return a TRUE or 1 type result if the string in "column3" is the same as the string in either "column2" or "column1".

I've tried "column3" IN ("column2","column1") which would seem logically to do the job, but it just returns a blank cell.

I'm using QGIS 2.6.


texts: Read specific column and row value from a text file using Python

texts:
I have a text file as following:

1.25        177.
1.50        220.
2.00        272.
5.00        427.
10.00       556.
25.00       763.
50.00       916.

and i want to read second last value from second column. I can move onto line of interest but somehow can't figure out a way to read required value. Any help would be appreciative.

a = open("test.txt","r")
b = a.readlines()
a.close()

count = 0
for line in b:
    count += 1
    if count > 6:
        print line,


texts: Calculating the sum of a column based on another column in another table in the field calculator of QGIS

texts:
I have a records table with site numbers and abundances of different species at that site (e.g. site 1 has 6 common bats and 13 pipistrellus bats).

I would like to sum total number (i.e. 6+13=19) at that site into another column within another table of a point shapefile locating the sites in some kind of expression used in the field calculator. Is this possible?

I have tried

aggregate( 'records', 'sum', "Abundance", "SiteNum")

but this has given me the same value (808) for every site in the new column of the point shapefile attribute table i.e. is ignoring the factor of site number.


texts: Select maximum number of points more than x meters apart

texts: I have a dataset of ~15,000 points that are locations along ROV survey tracks where measurements were taken. These points can be less than 5 meters apart and the survey tracks often cross or can be close to each other (<90 meters apart). We would like to run some analyses on these points, but we would like to select points that are at least 150 meters apart to minimize spatial auto-correlation. Is there a good methodology to find the maximum number of points that would fit this requirement?


texts: While loop in Map Algebra ArcPy, associate output raster name with input raster

texts:
I have an ArcMap document open with LandSat images from one day in different bands as rasters. They're named:

LC80541162014003LGN00_B1.TIF
LC80541162014003LGN00_B2.TIF

and so on, B1 through to B9 (bands 1 to 9).

I want to do a calculation on each band and the result of the calculation should be a new raster for each band, with the name of it indicating which band it is. This is what I'm trying, but the string in the output name disallows the process. How do I achieve the same result, get output of TOA_B1, TOA_B2 etc.

import arcpy
from arcpy import env
from arcpy import mapping
from arcpy.sa import *
i = list(range(1,10))
while i<10:
        TOAB_ + str(i) = Raster('LC80541162014003LGN00_B' + str(i)+ '.TIF')*2

To be clear, the calculation within it works on its own

Raster('LC80541162014003LGN00_B' + str(i)+ '.TIF')*2

I have simplified the script here for clarity, I know I could do each calculation separately but for various reasons it will be much more efficient to do it in a loop of some kind.


texts: Can anyone tell me why ArcGIS10 will not print to my Adobe9 "printer" in a Windows7Pro environment.  Multiprocessor system, huge memory.  Makes a .ai but crashes when i try a "print".  ArcGIS10 also crashes when I try and use the native export to pdf function.  Arc is up to date.  Thanks ahead of time to those who respond.


texts: Exporting Grid from R to use it in ArcGIS

texts: i want to export a grid from R into format readable by ArcGIS. how can i do so?


texts: Can QGIS open a SDF file created by HEC RAS?

texts:
I used the "export GIS data" option in HEC RAS and got a SDF file.

Is it possible to open it in QGIS?


texts:
I have a PC windows7
and my QGIS version is 2.14
the QGIS official plugin repository is unavailable!
how to fix it?


texts: Plotting/Exporting the Spatial Random Effects in BYM model - CARBayes - in R

texts:
I am working with visceral leishmaniasis disease cases in a small city with 100 polygons (census tract).

I have run a Bayesian Spatial Modeling - Conditional Autoregressive model (CAR) Poisson (BYM model, CARBayes package) in R.

I would like to know how to plot/export the Spatial Random Effects of my model on a map?

Details:

library(rgdal)
library(CARBayes)

1. Open shapefile

VL <- readOGR(dsn = ".", layer = "VL")
spat.data = readOGR(dsn = ".", layer = "VL")
spat.data2 <- spTransform(spat.data, CRS("+proj=longlat+datum=WGS84 +no_defs"))
names(spat.data2)
spplot(spat.data2)

2. Matrix

W=poly2nb(spat.data2)
W2 <- nb2mat(W, style="B")

3. Equation (number of cases disease is explained by altitude)

eq1 = LV~offset(log(DOGS))+altitude

4. BYM model

modelbym <- S.CARbym(formula=eq1, data=spat.data2, family="poisson", W=W2, burnin=100000, n.sample=300000, thin=20)
print(modelbym)


texts: Mobac .mbtiles files get a no tile_data error

texts:
The symptom of my problems is that when my ios code tries to access the map I get a tile_data error. The maps appear to generate normally.

I have a sample mobac created mbtiles file and it works in xcode like it should.

I have created my own mobac maps and they

preview in finder and xcode ok
appear to have valid data and structure when opened by a sqlite utility app

however they

throw the no tile_data error when the simulator is run
come up as blank previews in MapTiler (from maptiler.com)

FWIW I get the same problem with maps produced on win7 and my mac.

I have tried using mobac versions 1.9, 1.9.11 and 1.9.16 as well as 2A1

I got tripped up briefly by my jdk version but I've got that straight. I can't see what else I need to do. If there's an alternate tool that's newbie friendly let me know.

I've created really detailed maps in QGIS with filters and styles and layers. I want to be able to use it as an alternate source to OpenStreetMap but if I can't even get a basic map to generate I'm a bit concerned!


texts:
I'm uncertain as to why my geometry coordinates are empty.
The dataset I have derived the X and Y coordinates had the same CRS projection as the MODIS data landcover. The following data is MODIS MCD12Q1 yearly landcover data taken from the extent of 17 BCR regions in North America.
Given as:
landcover
class      : RasterStack
dimensions : 7149, 10258, 73334442, 10  (nrow, ncol, ncell, nlayers)
resolution : 463.3127, 463.3127  (x, y)
extent     : -9793968, -5041306, 2716866, 6029088  (xmin, xmax, ymin, ymax)
crs        : +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +R=6371007.181 +units=m +no_defs
names      : y2010, y2011, y2012, y2013, y2014, y2015, y2016, y2017, y2018, y2019
min values :     0,     0,     0,     0,     0,     0,     0,     0,     0,     0
max values :   255,   255,   255,   255,   255,   255,   255,   255,   255,   255

Here is my dataset with the following X and Y coordinates:
 A tibble: 6 x 8
     X1 encounter    id layer  water  year         X        Y
  <dbl>     <dbl> <dbl> <dbl>  <dbl> <dbl>     <dbl>    <dbl>
1     1    0.0350     1     1 0.0714  2011  -7158197 5814408
2     2    0.0507     2     1 0.0714  2011  -7158197 5812328
3     3    0.0310     3     1 0.111   2011  -7657517 5793608
4     4    0.0585     4     1 0.111   2011  -7661897 5791528
5     5    0.0437     5     1 0.111   2011  -7659707 5791528
6     6    0.0590     6     1 0.125   2011  -7668467 5783208

I proceeded with the following code to reshape the geometry points and corresponding values in the column into a long dataframe format:
bird_buff <- ebird_buff$data[1] %>%
  bind_cols %>%
  st_cast(to = "POINT") %>%
  dplyr::mutate(
    X =  sf::st_coordinates(geometry)[,1], #retrieve X coord
    Y =  sf::st_coordinates(geometry)[,2]  #retrieve Y coord
  ) %>%
  sf::st_drop_geometry()

bird_buff$year <- as.integer(bird_buff$year)
bird_buff$X <- as.numeric(bird_buff$X)
bird_buff$Y <- as.numeric(bird_buff$Y)

agg_factor <- round(2 * neighborhood_radius / res(landcover))
r <- raster(landcover)
bird.raster <- bird_buff %>% st_as_sf(coords = c("X", "Y")) %>% rasterize(r)

output:
class      : RasterBrick
dimensions : 1430, 2052, 2934360, 3  (nrow, ncol, ncell, nlayers)
resolution : 2316.564, 2316.564  (x, y)
extent     : -9793968, -5040379, 2716402, 6029088  (xmin, xmax, ymin, ymax)
crs        : +proj=sinu +lon_0=0 +x_0=0 +y_0=0 +R=6371007.181 +units=m +no_defs
source     : memory
names      : ID, year, encounter
min values : NA,   NA,        NA
max values : NA,   NA,        NA

To download the files:
file1 <- "modis_mcd12q1_umd_2010.tif"
file2 <- "shape.shp"
file3 <- "shape.shx"

dir.create("data", showWarnings = FALSE)
if (!file.exists(file.path("data", file3))) {
  download.file(paste0("https://raw.githubusercontent.com/lime-n/test/main/raster/", file3),
                file.path("data", file3), mode = "wb")
}

ebird_buff <- read_sf("data/shape.shp")
r <- raster("data/modis_mcd12q1_umd_2010.tif")


texts:
I'm newbie to this field and I'm trying to create a hillshade from a SRTM v4 geotiff.

The result is not what I expected. Surface near coast and the fields is very grainy.

I just projected it in UTM and the result is different but it seems that the resolution has dropped quite a lot.


texts: Openlayers which format best for serving lat lon markers from webservice?

texts:
I have a webservice which get GPS data (lat/lon) from android phone every 30 sec.
The webservice (currently) write the data to local log file (any format I decide).
which format/way will be best to read and refresh the layer every X seconds to show the location of the phone on OpenLayers OSM layer ?


texts: Transform 1860s Australian (English?) map coordinates to modern ones

texts:
I hope this is the right place. I found an 1862 reference to a very specific land location, not from where I live in Melbourne, Australia.
However, when I entered the latitude and longitude into Google Earth it placed the point in the sea. I wasn't really surprised, but am now looking for clues as to how I could transform the two values to 'modern' ones. (eg UTM/WGS84).  This is not my area, but I'm ok with maths, Excel, Python etc.
I'd assume it would mean first finding out what the common 1860s Australian (therefore British) projections/datums would have been.
These are the values:
'Longitude E. 9h 39m 39s.3, Latitude S 38 52' 6".6'

He was an Astronomer so, I assume, was giving the Longitude as a Right Ascension...and we multiply (the decimal longitude) by 15


texts: Why do the results of the diverse test for normal distribution of different temperature raster stacks have the same values (2.2e-16?)

texts:
I want to test my dataset for normal distribution. I get the same results with every dataset. What is wrong? why do the results of the diverse test for normal distribution of different temperature raster stacks have the same values (p-value nearly zero p-value< 2.2e-16?)
library(raster)
library(rgdal)
library(nortest)

# load files
files <- list.files("C:/Users/cathe/Documents/Cropped_raster_Gewässerläufe", include.dirs = F, full.names = T)

#stack raster
rasterstack <- stack(lapply(files, raster))
r <- rasterstack
r[] <- 1:length(r)

## crop and mask
r2 <- crop(r, extent(shp))
r3 <- mask(r2, shp)

rc <- crop(rasterstack, extent(r3))
rcm <- mask(rc, shp)

as.vector(rcm)
x <- as.vector(rcm)

nortest::ad.test(x)

cvm.test(x)

ks.test(x, "pnorm", mean(x, na.rm=TRUE), sd(x, na.rm=TRUE))

#RESULTS
Anderson-Darling normality test

data:  x
A = 2422.3, p-value < 2.2e-16

cvm.test(x)

Cramer-von Mises normality test

data:  x
W = 416.03, p-value = 7.37e-10
Warnmeldung:
In cvm.test(x) :
p-value is smaller than 7.37e-10, cannot be computed more accurately

ks.test(x, "pnorm", mean(x, na.rm=TRUE), sd(x, na.rm=TRUE))

One-sample Kolmogorov-Smirnov test

data:  x
D = 0.048852, p-value < 2.2e-16
alternative hypothesis: two-sided


texts: Visio to CAD to GIS, How to geo-reference?

texts:
I have CAD file converted from a MS Visio diagram, representing power line cables. Data source has no spatial reference.  I converted into shapefile and now I am trying to georeference the vector layer against an existing streets layer.

Any ideas, other than:

Rasterize the shapefile
Geo-reference the raster using the Geo-reference plugin
Compute the affine transformation
RastertoVector

Does the Spatial Adjustment vector method in ArcGIS represents a better option?


texts:
I'm trying to get the current map scale in PyQGIS, running outside QGIS, with:

project = QgsProject.instance()
root = project.layerTreeRoot()
canvas = QgsMapCanvas()
bridge = QgsLayerTreeMapCanvasBridge(root, canvas)
# project.read(projectpath)
canvas.center()
canvas.extent()
canvas.scale()

The center and the extent are just perfect! But the scale is quite different from the one reported at QGIS bottom bar.

Testing the same in QGIS gives the same result.

How do I get the current map scale in PyQGIS (3.x)?

I'm using a project coordinate system, using meters.


texts: Create ID field with random starting polygon in ArcGIS

texts:
I have a shapefile composed by parallel strips. The default FID field orders the strips from left to right. I want to create an ID field where strips are ordered from left to right but with the first strip chosen randomly.

Is it possible in ArcGIS?


texts: Strategies to convert scanned map to a proper raster format

texts:
So I scanned some maps looking like the one below.
I georeferenced and rectified the image and stored it as a .tif.
Now my goal is to get a raster with one band with a value for each of the classes in the legend. If there would be no hatched legend entries I could simply use the colour of the classes, but now this dosent work.
Any ideas how to solve this problem?


texts: I have created a polygon shapefile in QGIS by creating the shapefile as a polygon, allow editing of the shapefile, then adding the polygon feature. I have set the CRS to the same CRS as the raster layer I am trying to clip. For some reason, it is giving me the "cutline feature without a geometry" error. I have experimented with other rasters and it does not seem to work. However, it would clip vector layers. Any thoughts?


texts: Converting a polygon into a raster using R

texts:
I'm trying to convert a shapefile into a raster within R. My approach is to read in the raster as follows:

library(rgdal) # Loads SP package by default
demo <- readOGR('F:/data/', 'shapefile') # Creates a SpatialPolygonsDataFrame class (sp)

This works fine, and I can plot it. However it is a large shapefile and I want to convert it into a raster. I've tried the following:

r <- raster(ncol=180, nrow=180)
Demo_ras = rasterize(r, demo, 'pop')  # pop is an integer here

Error message:

Error in function (classes, fdef, mtable)  :
  unable to find an inherited method for function "rasterize", for signature "RasterLayer", "SpatialPolygonsDataFrame"

I'm slightly confused which is the correct order of the arguments. I've also tried this:

Demo_ras = rasterize(demo, r, 'pop')

Which results in the follow error:

Error in .polygonsToRaster(x, y, ...) :
  polygon and raster have no overlapping areas

While it makes sense that a raster cannot be generated for an area that does not cover the SpatialPolygonsDataFrame, I'm not sure what information I need to specify so that the raster should contain the SpatialPolygonsDataFrame area.


texts: Failed to use InsertCursor to add point features

texts:
I have following python script to create a feature class in an SDE database and try to add point features to it.

sde_conn = "d:/sde.sde"
st_fc = arcpy.CreateFeatureclass_management(sde_conn, "LIVE_ST", "POINT","","DISABLED","DISABLED",arcpy.SpatialReference(4326))
rowInserter = arcpy.da.InsertCursor(st_fc, ("SHAPE@X", "SHAPE@Y"))

# FOR loop starts here
    lon = {a number}
    lat = {another number}
    rowInserter.insertRow(([lon, lat]))
# FOR loop ends here

del rowInserter

When I ran the script, I received the following error:

rowInserter.insertRow(([lon, lat]))
TypeError: expect single [X,Y[,Z[,M]]]

Are you able to point me to the right direction to get it fixed? Thanks


texts: ggplot sf not rounding x-axis coordinate ticks properly

texts:
I have an issue plotting an sf object in ETRS89 / UTM zone 32N. It is not displaying the x-axis coordinate ticks well. Instead of 8.649° it is displaying 8.6490000000000000001°. Also see the image below for how it looks to me.
I am using sf_0.9-6, ggplot2_3.3.2 and R version 4.0.2 on Windows 10.

Here's some sample code, so you can hopefully replicate it yourselves.
test <- structure(list(structure(list(structure(c(477799.11, 477832.22,
                                          477832.22, 477799.11, 477799.11, 5632217.3, 5632217.3, 5632250.43,
                                          5632250.43, 5632217.3), .Dim = c(5L, 2L))), class = c("XY", "POLYGON",
                                                                                "sfg"))), class = c("sfc_POLYGON", "sfc"), precision = 0, bbox = structure(c(xmin = 477799.11,
                                                                                ymin = 5632217.3, xmax = 477832.22, ymax = 5632250.43), class = "bbox"), crs = structure(list(
                                                                                input = "ETRS89 / UTM zone 32N", wkt = "PROJCRS[\"ETRS89 / UTM zone 32N\",\n    BASEGEOGCRS[\"ETRS89\",\n        DATUM[\"European Terrestrial Reference System 1989\",\n            ELLIPSOID[\"GRS 1980\",6378137,298.257222101,\n                LENGTHUNIT[\"metre\",1]]],\n        PRIMEM[\"Greenwich\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433]],\n        ID[\"EPSG\",4258]],\n    CONVERSION[\"UTM zone 32N\",\n        METHOD[\"Transverse Mercator\",\n            ID[\"EPSG\",9807]],\n        PARAMETER[\"Latitude of natural origin\",0,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8801]],\n        PARAMETER[\"Longitude of natural origin\",9,\n            ANGLEUNIT[\"degree\",0.0174532925199433],\n            ID[\"EPSG\",8802]],\n        PARAMETER[\"Scale factor at natural origin\",0.9996,\n            SCALEUNIT[\"unity\",1],\n            ID[\"EPSG\",8805]],\n        PARAMETER[\"False easting\",500000,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8806]],\n        PARAMETER[\"False northing\",0,\n            LENGTHUNIT[\"metre\",1],\n            ID[\"EPSG\",8807]]],\n    CS[Cartesian,2],\n        AXIS[\"(E)\",east,\n            ORDER[1],\n            LENGTHUNIT[\"metre\",1]],\n        AXIS[\"(N)\",north,\n            ORDER[2],\n            LENGTHUNIT[\"metre\",1]],\n    USAGE[\n        SCOPE[\"unknown\"],\n        AREA[\"Europe - 6Â°E to 12Â°E and ETRS89 by country\"],\n        BBOX[38.76,6,83.92,12]],\n    ID[\"EPSG\",25832]]"), class = "crs"), n_empty = 0L)

ggplot() +
  geom_sf(data = test)

I have tried to set xlim in coord_sf() to whole integer numbers however that did not change anything.
ggplot() +
  geom_sf(data = test) +
  coord_sf(xlim = c(477797, 477835),
           ylim = c(5632217, 5632250))

Does anyone of you know what might be wrong here and how to fix it?


texts:
I want to display a GeoTIFF file which is a air pollution map by use of WMS. This GeoTIFF file is an output of WPS. The following is my mapfile and the URL request and the output. I use MapServer for Windows (MS4W).
MAP
    NAME PM10
    IMAGECOLOR 255 255 255
    SIZE 600 800
    IMAGETYPE PNG24 ## use AGG to for anti-aliasing
    OUTPUTFORMAT
        NAME 'AGG'
        DRIVER AGG/PNG
        MIMETYPE "image/png"
        IMAGEMODE RGB
        EXTENSION "png"
    END # outputformat
    PROJECTION
        "init=epsg:3035" #latlon on etrs 1989 laea
    END
    EXTENT 3487500 2297500 4402500 3202500 # meters extents of region2
    WEB
        IMAGEPATH "c:/tmp/ms_tmp/"
        IMAGEURL "/ms_tmp/"
        METADATA
            "ows_enable_request" "*"
            "map" "C:/ms4w/apps/airpollution/config.map"
            "ows_schemas_location" "http://schemas.opengeospatial.net"
            "ows_title" "Sample WMS"
            "ows_onlineresource" "http://localhost:7070/cgi-bin/mapserv.exe?map=C:/ms4w/apps/airpollution/config.map&"
            "ows_srs" "EPSG:3035" #latlon
            "wms_feature_info_mime_type" "text/plain"
            "wms_feature_info_mime_type" "text/html"
            "wms_server_version" "1.1.1"
            "wms_formatlist" "image/png,image/gif,image/jpeg, image/geotiff"
            "wms_format" "image/png"
        END #metadata
    END #web
    LAYER
        NAME "pm10"
        DATA "pm10.tif"
        TYPE RASTER
        STATUS ON
        METADATA
            "ows_title" "pollution"
        END #metadata
        PROJECTION
            "init=epsg:3035"
        END #projection
    END #layer pm10
END #map

I want the output format to be PNG.
This is the URL request I am trying:
http://localhost:7070/cgi-bin/mapserv.exe?map=C:/ms4w/apps/airpollution/config.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&LAYERS=pm10&STYLE=&SRS=EPSG:3035&BBOX=97,5,106,21&WIDTH=600&HEIGHT=800&FORMAT=image/png

What I get as a response is an empty white image.
What I want is an map like image which different values pixels displayed with different colors. I  did the same thing by opening the same GeoTIFF file in ArcMap. I know that I have to classify the raster file by use of SLD, but I get error there that "Could not open SLD sld/sld.xml and save it in temporary file"
I want to be sure that the GeoTIFF file is accepted as an input data. The reason that I think it is not accepted is that when I change the name of GeoTIFF file to something else in .map file I still get the same output (white colored image).


texts: Updating spatial table in Oracle database with SQL query in PyQGIS?

texts:
I am trying to use the Python Console within QGIS 3.4 to update a spatial table in an Oracle database. The goal is to update all values in the field DTM_ELEV in the Oracle table with values from a layer I created in QGIS. Both tables are identical, except the table I created has an additional field LIDAR that I want to use to replace the DTM_ELEV values in the Oracle table. The primary key matching the tables is the field GID.

Right now, I can complete these updates using the SQL Window in the Database Manager, but I want to automate the process with a Python script. Right now, I have successfully connected to the table I want to edit; I just need help with running the SQL queries within my PyQGIS script.

I'm not sure if there's a simpler way to do this.


texts: Make a list of dates of a ImageCollection (Landsat) and use it as a DateFilter on another Dataset (Daymet V3)

texts:
I want to make a comparison of the temperature evolution in a region, using Landsat and Daymetv3, but DaymetV3 have a daily information, and Landsat not. And i want to use the same dates on both.

Do you have some advice?


texts: Deep Learning in QGIS: installing Tensorflow

texts:
I am trying to install tensorflow (with or without GPU support) with the keras API in the QGIS 3.4 LTR python 3 environment but without success. I do have a working install of tensorflow-gpu that I use in anaconda.  I also have a working install of scikit-learn (and others) in the QGIS 3 env.  So I think my method using the OSgeo4 shell and pip seems mostly OK. So from the python console in QGIS I can type:

import sklearn

And that works fine.  But the same thing is not true for tensorflow and keras.  First I tried to install tensorflow-gpu, when using pip I got no error messages. But:

import tensorflow as tf

returns this error:

ImportError: Could not find 'cudart64_100.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 10.0 from this URL: https://developer.nvidia.com/cuda-90-download-archive

I have used Settings>options>System and added all the CUDA paths to my environment variables. These do point to the folder where cudart64_100.dll is found.

If I un-install tensorflow-gpu and downgrade to the cpu version, I get another problem after an attempted import:

AttributeError: type object 'h5py.h5.H5PYConfig' has no attribute '__reduce_cython__'

This seems to be related to v 2.10 of h5py.

Ultimately, is there a solution here?  Is it even possible to install tensorflow in QGIS and use it directly from the PyQGIS console?


texts: Calculate vx, vy and vz components from Lat,Lon, height and Time

texts:
Referring to the following post Calculate velocity x and y components from Lat,Lon and Time

Given the two points with Latitude, Longitude, Height and time

P0 = (Lat0,Lon0, h0, time0)

and

P1 = (Lat1,Lon1, h1, time1)

how can we calculate the velocities in X, Y and Z-directions?


texts:
Is it possible to pause/stop labeling temporarily in QGIS like in Arcmap for all layers at once?

The label toolbar offers no solution.


texts: Creating consistent topology using PgRouting

texts:
I'm developing an application that needs routing information for certain cities. First, I downloaded a openstreetmap datafile (*.osm) and then I imported it into a PostgreSQL database using osm2pgrouting tool (http://workshop.pgrouting.org/chapters/installation.html). After this, I have the following tables:

nodes: that contains simple locations points
ways: that contains ways with some nodes involved
vertices_tmp: stores nodes that may be used for pgrouting funtcions like Djistra, A*...etc.

Would I use nodes that isn't in "vertices_tmp" table for calculate distances between nodes? Or I would only do it with the nodes stored in "vertices_tmp"?

Into ways table there are a field named "the_geom" that encapsulates different locations points (nodes). For example:

  "MULTILINESTRING((1.5897786 42.5600441,1.5898376 42.5601455,1.589992
  42.5605438,1.590095 42.5606795,1.5901782 42.5608026,1.5902238 42.561018,1.5902912 42.5616808,1.5903685 42.561899,1.5904008 42.5620563,1.5903836 42.5624117,1.5904265 42.5627151,1.5904947 42.5628368,1.5905981 42.5629553,1.5906926 42.5631007,1.590802 42.5633238,1.5908604 42.5634883,1.5909501 42.5637139,1.5910869 42.5638755,1.5913053 42.5639639,1.5914994 42.5640237,1.591648 42.5640261,1.5919232 42.5640145,1.5921124 42.5640363,1.5923292 42.5640953,1.592804 42.5643306))"

Can I route with intermediate nodes or only with source/target nodes?

My goal is to be able to routing betweent differents nodes or POIs, depending of its amenity tags, not only driving distance, walking distance too. Furthermore I need to calculate shortest path for source/targets nodes.

Any idea for do this?


texts: Convert/move negative z-values in GTiff to positive

texts: I have a Float32 Gtiff which has the whole range in negative values. Is there a way to move or convert the values to positive values? Preferably with gdal or QGIS. The application I want to use doesn't support negative values.


texts: PostGIS: Finding duplicate label within a radius

texts:
I have data in PostGIS that have value and geometry. If there is a same value within let's say <10 m, I want to detect or remove that value from my table. Here is the small example:

create table points (id serial primary key, val integer, label2);

select addGeometryColumn('points', 'geom', 1, 'point', 2);

insert into points (id, val, label2, geom) values
  (1, 1, aaa, st_geomFromText('POINT(1 1)', 1)),
  (2, 1, bbb, st_geomFromText('POINT(1 2)', 1)),
  (3, 1, aaa, st_geomFromText('POINT(10 100)', 1)),
  (4, 2, ccc, st_geomFromText('POINT(10 101)', 1));

because of data(id) 1 and 2 has the same value and distance<10m, so there just will be:

  id |val| source | geom
-----+------------+------
   3 | 1 |  aaa   | xxx
   4 | 2 |  ccc   | xxx

Do you know how to query that in PostGIS?


texts: adding multiple points to a linestring in PostGIS

texts:
Though a newbie to PostGIS, I'm having trouble solving something that I think should be farily straightforward.

I have two linestring tables, both consisting of simple, 2-node line objects: one has the segments of exploded road centre-lines ('r_lines'), while the other has lines ('a_lines') from an addresspoint to the nearest point on the nearest centre-line segment, which in most cases is neither the start nor end node of that roadline segment.

Ultimately I need to have a table consisting entirely of (connected) 2-pt linestrings.

I haven't been able to figure out how to introduce the one endpoint of the a_lines into the r_lines to create new segments, and the problem seems to be that one r_line segment might be intersected by several a_lines. So a previously described method for adding vertices to linestrings by breaking and re-merging can't be directly applied, unless I could do it iteratively (which I don't know how to do).

I have also tried dropping all the points into one table and then creating a new linestring with the grouping method described here. This did create lines, but not the ones I was expecting, as they frequently seemed to double-back on each oter.

Grateful for any suggestions.

(And apologies for the purely textual description: as a new user of little reputation I'm prevented from uploading a helpful illustration.)


texts: Creating ArcMap where two parts of different imagery basemaps are visible at once?

texts:
I'm using ArcMap to create
backgrounds for a book of poetry
where the backgrounds of poems
are satellite imagery.

I would like to have a section of my map be from a BW image and another from a color image, but I can only figure out how to view one basemap at a time.

Would I be able to dictate boundary between two the layers?


texts: geoTIFF raster // random display errors only in QGIS

texts:
Sometimes I experience display issues with geoTIFF in QGIS (also had this once in TatukGIS). Now i have a situation in latest  QGIS running on Linux KDE.
The image is kind of disturbed (s. example). If you move it it randomly gets different defects.

On another QGIS station it's shown perfectly. Also in other photo applications like GIMP, or even simple windows viewers.

What might be the reason? Looks like a rendering, or openGL issue or something like that.

The whole orthophoto is tiled and here's the gdal info about one tile as example:

Driver: GTiff/GeoTIFF
Files: K:\ART_S40-S41_GK4\ART_S40-S41-4-2.tif
Size is 11000, 10500
Coordinate System is:
PROJCS["DHDN / 3-degree Gauss-Kruger zone 4",
    GEOGCS["DHDN",
        DATUM["Deutsches_Hauptdreiecksnetz",
            SPHEROID["Bessel 1841",6377397.155,299.1528128000033,
                AUTHORITY["EPSG","7004"]],
            TOWGS84[598.1,73.7,418.2,0.202,0.045,-2.455,6.7],
            AUTHORITY["EPSG","6314"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4314"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",12],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",4500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","31468"]]
Origin = (4469187.435404540039599,5334060.089342270046473)
Pixel Size = (0.000631639000028,-0.000631639000028)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( 4469187.435, 5334060.089) ( 11d35' 9.21"E, 48d 8'41.06"N)
Lower Left  ( 4469187.435, 5334053.457) ( 11d35' 9.22"E, 48d 8'40.84"N)
Upper Right ( 4469194.383, 5334060.089) ( 11d35' 9.55"E, 48d 8'41.06"N)
Lower Right ( 4469194.383, 5334053.457) ( 11d35' 9.55"E, 48d 8'40.85"N)
Center      ( 4469190.909, 5334056.773) ( 11d35' 9.38"E, 48d 8'40.95"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA
  Unit Type: metre
Band 2 Block=256x256 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA
  Unit Type: metre
Band 3 Block=256x256 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA
  Unit Type: metre
Band 4 Block=256x256 Type=Byte, ColorInterp=Alpha
  Unit Type: metre


texts: Transforming CRS for globcover data using R

texts:
I have two set of data:

raster land cover from [Globcover]:(http://www.fao.org/land-water/land/land-governance/land-resources-planning-toolbox/category/details/en/c/1036356/)
A set of point shapefiles of health facilities in Africa.[Google drive]:(https://drive.google.com/drive/folders/1Oi9Bd_T_W82DXZjN7XUCoAyvM6kCVkYQ?usp=sharing)

I have problems with ensuring that they are aligned after transforming their CRS from geographic coordinate system to projected coordinate system.
Both files has CRS of WGS84. I tried to plot them both in WGS84 and they are aligned perfectly, as shown below.
crs(landcover)

CRS arguments:
+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

crs(healthfac_point)

CRS arguments:
+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

However, when I convert both the CRS of the globcover data and point shapefiles into epsg:32735, they no longer line up.
healthfac_point_projected <- spTransform(healthfac_point, CRS("+init=epsg:32735"))

crs(healthfac_point_projected)

CRS arguments:
+init=epsg:32735 +proj=utm +zone=35 +south +datum=WGS84 +units=m +no_defs
+ellps=WGS84 +towgs84=0,0,0

projection(landcover) <- CRS("+init=epsg:32735")

crs(landcover)
CRS arguments:
+init=epsg:32735 +proj=utm +zone=35 +south +datum=WGS84 +units=m +no_defs
+ellps=WGS84 +towgs84=0,0,0

extent(healthfac_point_projected)

class       : Extent
xmin        : -5832574
xmax        : 4548844
ymin        : 6136173
ymax        : 13175174

extent(landcover)

class       : Extent
xmin        : -180.0014
xmax        : 179.9986
ymin        : -64.99861
ymax        : 90.00139

I also tried this.
healthfac_point_projected <- spTransform(healthfac_point, CRS("+init=epsg:32735"))

crs(healthfac_point_projected)

CRS arguments:
+init=epsg:32735 +proj=utm +zone=35 +south +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0

landcover_proj <- projectRaster(landcover, proj4string(healthfac_point_projected))

Error in (function (classes, fdef, mtable)  :
unable to find an inherited method for function ‘res’ for signature ‘"character"’
In addition: Warning message:
In min(dim(to)[1:2]) : no non-missing arguments to min; returning Inf

Ultimately I would like to create buffers around these point shapefiles and find out the % land cover in each buffer. However, as their extent are different despite transforming their CRS, I cannot do that.
Can you point out what's wrong with the way I have transformed the CRS of both files?


texts: Attribute table not showing data in QGIS 3.2 (prior answers only apply to QGIS 2)

texts:
I've opened a .shp in QGIS 3.2.3 and there is no data in the attribute table. It shows the correct number of rows but no columns.

A previous answer recommended choosing "Show All Objects" under the "General" tab in Options, but that option does not exist in QGIS 3.2.3.

Would anyone be able to provide advice on this?

(I also tried installing QGIS 3.4 to see if that resolved the issue and that didn't work either)

EDIT:
The previous answer I refer to is this one.


texts: How to multiply each pixel of a ImageCollection by a single value

texts: I'm using the python EarthEngine API, Is it possible having a ee.ImageCollection to multiply all pixels of all the images by a single value val?


texts:
I have an oldish (~2000) french guidebook where geographic coordinates are indicated in a system I don't know and I've been unable to find a suitable conversion. For instance, here are 2 points which I'm able to find on a map:

Guidebook1: X=850.41 Y=3312.28
Coord1:     5.51696E 45.06684N
Guidebook2: X=848.45 Y=3312.85
Coord2:     5.49209E 45.0728N

I've tried the following without success: Geographic (degrees, radians, grades), Mercator (km), Lambert 93 (km), Lambert II ext (km), UTM and a few other online converters. It seems to be kilometric and Lambert isn't too far off.

Any idea?


texts: Download a region as KML/OSM from internet Maps

texts:
I need to create a custom Euro Region map from several regions of neighborhood countries.

Say Spanish "Galicia" and Portugal "Norte" regions. So, I need to combine 2 KML/OSM/... files. My question is how to get that 2 files. Can I use the openstreetmap project to EXPORT desired regions as KML, by eg?

If not openstreet map, maybe google earth/maps, bing or other tools are available to export a desired region as KML?

PS. I don't mind using any of mapping formats like GeoJSON or OSM, KML was just an example


texts: Finding definitions of ArcGIS script parameter Data Type options?

texts:
When adding a python script to a toolbox in Arcgis one of the steps is to set parameters and specify what Data Type each requires. The list is long, perhaps a hundred, and many are not immediately understandable. For example I just tried to require data type "Database Connections", but when I run the tool and select "Database Connections\Connection to foobar.sde" I'm told the item is invalid. Aww nuts.

Now I could just ask "what is the "Database Connection" data type?" here on GIS.se and get on with my work, but then tomorrow I'll have to do it again for Disk Connection and Decimate. (might do wonders for my reputation level though...) So lets just get 'em all in one go, I hope:

Where do I find the definitions of all the Data Types available for tool parameters?


texts: How to calculate heuristic shooting star algorithm?

texts:
I have a problem with the shooting star algorithm.  It's my final project and I need some help.

My question is how can I calculate the heuristic shooting star algorithm?
I can use the pgrouting shooting star, but I don't understand how to calculate heuristic shooting star.

I have searched the calculating heuristic shooting star in internet book but I can't find it now.

Can you tell me  about  shooting star algorithm, not just source code , Mr Mario?


texts: How to perform a standard deviation stretch on a raster in QGIS

texts:
Is there a way to perform a (2) standard deviations stretch on a raster image in QGIS 2.2?

I have found the raster styles menu, but the help says there is no help in my language (English) and whilst there is a mean +- standard deviation option, changing this (and pressing apply) seems to have no effect. Ideally I would like to set up such a stretch as standard for rasters (and i am fairly sure how to do this once I work out the setting needed) to try and replicate the standard stretch functionality found in ERDAS.

Thanks for your time.


texts: Difference or Erase layer/shp from another layer using GDAL / OGR?

texts:
Gdal is known for being the fastest library for geospatial data processing. I'm using it in my python script and I'm having issues with performance on a specific task which is Erasing a layer from another layer which takes too much time!

I used first this prebuilt function:

inputLayer.Erase(maskLayer, ResultLayer)

This works fine for a layer with average number of objects but when running it with a layer that has a 200,000 features it takes forever!

So I managed to write this bit of code:

        for featureI in inputLayer:
            geomI = featureI.GetGeometryRef()
            maskLayer.SetSpatialFilter(geomI)
            for featureM in maskLayer:
                geomM = featureM.GetGeometryRef()
                featureI.SetGeometry(geomI.Difference(geomM))
                selfLayer.SetFeature(featureI)

But this will last 1200 min which is too long for my case!

Is there any way to speed things up? Do you have any suggestions to make for me?

I'm using python3.5 with GDAL2,


texts: Is there a way to add custom elements (checkboxes, or more ...) or change some elements properties (colours ?) in the genuine layer tree view of QGIS using PyQgis?


texts: Set my initial bounds to represent India (location) in Geomajas application

texts:
I am new to Geomajas. I followed document and configured my shapefiles as a vector layer on top of Google Maps.

Can any one tell me how can I set my initial map bounds to represent India location in Geomajas application.


texts: In QGIS what data file formats (etc) can be directly edited?

texts:
QGIS allows for opening very many different file formats.

Some of these are directly editable. It is possible to open the data/file, immediately edit the data in QGIS, then save back to the original file.

Many formats can be opened/read, and at the same time it is possible to save/write to that format BUT these require that the data is saved into a second format before editing is possible. This is fundamentally different from the first situation.

The question is what data formats are directly editable by QGIS (the first situation as opposed to the second)?

Reasons a list is helpful...

I think that sometimes QGIS doesn't handle this whole issue terribly well - for example in the past I have had some Excel files look like they are editable but the process ultimately fails - which adds confusion.

Notes at gdal.org provide some information, but it can be very difficult to distinguish between the two situations above - formats which are directly editable, and on the other hand formats which can both be read and written (but aren't directly editable).

It is helpful to have information about QGIS (or ogr) version in answers.


texts:
I have managed to show Lat and Lon

      function init() {

        navigator.geolocation.getCurrentPosition(function(position) {
            document.getElementById('myloc').innerHTML="Latitude: " + position.coords.latitude + "   Longitude: " +
            position.coords.longitude + "<p>";
        });
      }

now i want this lat and lon on OSM map as a point and whenever i refresh the page, I want the point follows my location...

I added this code in my map function itin

var vectorpoint = new OpenLayers.Layer.Vector("VectorPoint");
map.addLayer(vectorpoint);
var point = new OpenLayers.Geometry.Point(position.coords.longitude ,position.coords.latitude);
vector.addFeatures(new OpenLayers.Feature.Vector(point));

any suggestion?


texts: Is there a Web app for building GeoExt tree configurations?

texts:
I have a GeoExt application and looking for approaches for building tree configuration (in JSON format). Now tree configuration is made manually and looks like:

    var treeConfig = new OpenLayers.Format.JSON().write([
    {
        text: "Layers",
        expanded: true,
        icon: "./images/Layers.png",
        children: [
            {
                text: "Nature",
                icon: "./images/globe.png",
                checked: false,
                group: true,
                children: [{
                    nodeType: "gx_layer",
                    layer: "Lakes",
                    icon: "./images/lake.png"
                },
                {
                    nodeType: "gx_layer",
                    layer: "Bogs",
                    icon: "./images/bog.png"
                }]
            }
            ...

But I would like to have web-application which I can use for building such configuration. All layers are published as WFS layers and it is possible to get the list of layers using GetCapabilities request, for example. Please give me any advice or may be known approaches how I can solve my problem.


texts: Converting geographic coordinates into tangent-plane Cartesian with GDAL

texts:
I'm working on reading a variety of geographic raster data (primarily elevation data, land clutter type, and land clutter height) to project them into a local-tangent-plane Cartesian system (east-north-up) for running radio propagation calculations. The geodata comes in a variety of file formats and coordinate systems, all of which GDAL reads in just fine, giving me an array with the banded data and an WKT string describing the coordinates.

It looks like I can create a GDAL CoordinateTransformation object that will project from the geodata coordinates into the Cartesian system given the WKT strings for the two systems.

Is this the right approach? If so, how I do create the WKT string for the tangent-plane system?

I'm currently prototyping in Python so that I can visualize data with MatPlotLib, but will eventually do the coding in C/C++ or Fortran.


texts:
In the README.md file for the CMV Advanced Search widget it says to:

  "Copy js/config/search.js file to js/config folder at your CMV
  installation. Edit file to configure proxy_url and GeometryService_url
  parameters."

I am just curious if the search.js config file should have more content in it then what is currently included. As of now the following code is stored here:

define({
    map: true,
    identifyLayerInfos: true,
    proxy_url: 'http://localhost/cmv/proxy/PHP/proxy.php',
    GeometryService_url: 'http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer'
});

It seems there is something missing, is this accurate?


texts: Writing a plugin for QGIS using Python to access PostGIS and write geometries

texts:
Sorry about the strange title, I didn't really know how to word it.

I currently use MapInfo to do most of my GIS work however I have recently installed PostGIS 1.5 and I really like it so far.

A project that I am going to start working on in the future sometime will involve creating an application for managing stormwater assets, all my previous mapping projects have just been using a MapInfo window embedded in a C# application. Now that I have some data in a PostGIS server it has opened a lot of possibilities.

I tried writing some small sample applications using NHibernate and NHibernate.Spatial in C# but to say it's frustrating is an understatement (sometimes static typed code gives me the shits).

So I was wondering if anyone had any experience writing a QGIS plugin using python to access PostGIS and if you think it would be a viable route to take, and if so anyone had any good places to read about doing such things.


texts: Using Python to connect to Multiple SDE Database Connections

texts:
I am writing a script that accesses multiple sde Database connections. I have set the script to include accessing the environment workspace:

import arcpy

arcpy.GetParameterAsText(0)
arcpy.GetParameterAsText(1)

arcpy.env.workspace = r"Database Connections\somedb.sde"

do some python stuff...

arcpy.env.workspace = r"Database Connections\someOtherdb.sde"

So, I open then tool, enter my parameters and run it. When it gets to setting the workspace, I get the regular popup window to prompt me to enter my username and password to the sde database.

The problem I have it that the tool GUI runs on top of the popup. Any time I try to click on the popup window to enter my username and password, the GUI automatically pops on top again and I can't type anything.

Is there any way for me to build the GUI so that I can enter my username and password aside from using the arcpy.CreateArcSDEConnectionFile_management function? My connection files already exist, so I don't need to create new ones. I just need to log in to it.


texts: Converting SpatialPoints to Normal for exporting .csv

texts:
I have a rasterbrick and point shapefile. I have working code for extracting values of pixels from spatial points, but I need to export results to .csv file. I suppose that the key of this problem is to convert SpatialPointsDataFrame to normal one. But I do not know how to complete this task. Here is part of my code:

library(rgdal)
library(raster)
library(ggplot2)

# setting working directory
vstupni_adresar <- choose.dir(getwd(), "Zadej cestu k pracovnímu adresáři")
prac_adresar <- setwd(vstupni_adresar)

# choose a raster brick
r <- brick(choose.files(caption = "Načti data vstupující do klasifikace"))

# choose directory, where point shapefile is located
vyber_shp <- choose.dir(getwd(), "Vyber adresář, kde se nachází trénovací data")

# extract values from shapefile
sdata <- readOGR(dsn = vyber_shp, layer = "trenink")
sdata@data <- na.omit(data.frame(sdata@data, extract(r, sdata)))

# export to vsv
df <- fortify(sdata)
csv_zapis <- write.csv(df, file="Data_extrakce.csv")


texts:
I am trying to create a shapefile without XY coordinates.  I have the address, but not coordinates and there are too many entries to enter them manually.  I am then going to join that to another data set (also without coordinates), but with a corresponding column.
Is this possible/ how would I do this?


texts: Units for Area on QGIS - need to convert to square meters

texts:
I have a shapefile with building footprint outlines. I am trying to identify buildings that are a certain size in meters squared. The shapefile that I has, has a SHAPE_Area column, but I cannot tell what unit it is.

How can I tell what the units currently are?

The CRS for this layer is EPSG:2260, NAD83 /New York East (ftUS).


texts: OpenLayers 3 transform coordinates to custom projection

texts:
I am trying to convert WGS84 coordinates (EPSG:4326) to Amersfoort RD New (EPSG:28992) with OpenLayers 3.

I declared EPSG28992:

Proj4js.defs["EPSG:28992"] = "+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +no_defs";

Got the projection from OL:

var EPSG28992 = new ol.proj.Projection('EPSG:28992');

Now I defined my transform function as:

function transformLatLong(lattitude, longitude)
{
    var coordinates = ol.proj.transform([longitude, lattitude], 'EPSG:4326', EPSG28992);
    console.log(coordinates);
}

The problem is that ol.proj.transform returns just the same long lat coordinates (i.e. did not transform anything).

What am I missing here?


texts: Creating MapTips programmatically for programmatically-created KML layer using ArcGIS API for Silverlight?

texts:
The few examples and forum posts that I have found all use KML layers defined in XAML at design-time with nested MapTip templates binding to one or more Placemark attributes e.g. name or ExtendedData values (using the ExtendedDataConverter class provided in the example here).

I am looking for a way to programmatically configure map tips on a programmatically-created KML layer at runtime. I can display empty map tips if I assign a MapTip instance to every Graphic in the KmlLayer, but cannot figure out how to dynamically bind the MapTip to the Attribute data in the Graphic. I have inspected the graphic elements and confirmed that they do indeed contain the correct attribute data from the KML document.

Does anyone have an idea as to how this can be accomplished?


texts: How to edit feature attributes with openlayers?

texts:
I want to edit object's attributes on WFS layer. I see this example http://gis.ibbeck.de/ginfo/apps/OLExamples/OL26/examples/styles_unique_with_group_wfs.html but popup is horrible. I want to use ExtJs form to editing.
So how to edit attributes in this case?


texts:
I'm trying to do Subtraction between two rasters.
and I'm getting this error

  000539 : Error message from Python.

Description
The calculation used by the Calculate Field or Calculate Value tool is invalid. The error message provided will list the specific Python error.

Solution
This error code covers a number of Python errors:

Example error 1: exceptions.TypeError: cannot concatenate 'str' and 'int' objects.
The above is a Python-specific error. The calculation is attempting to add or concatenate a string and a number.

Example error 2: Invalid field shape@distance
The above is an error using the geometry object. The distance method is not a valid method of the geometry object.

For specific Python issues, consult the external Python help for the version of Python you are using, or consult the Calculate Field or Calculate Value help for more information on these tools.

I could really use some more explanation..


texts: Understanding ArcGIS Flow accumulation result?

texts:
I have modified an existing DEM to produce two sinks - the brightest pixels, both with a dot drawn on them below.

I have verified that they are, in fact, the lowest points with the ID tool and have confirmed that flow should follow successively lower elevation values to the center point with the "interpolate line" graph.

I would expect that the flow accumulation result over this area would show the highest value at these low points. In fact that's what I'm trying to force in my model - I want these depression to act like a catcher's mitt for flow lines in the area since my pour points are not perfect.

However the result I get is that the low point shows a flow accumulation of "0" and there are multiple flow lines into each depression that do not connect and do not flow to the low point. all flow lines terminate at the pixel immediately before the low point rather than merging into it

Is this the expected behaviour for this tool?


texts: Storm water Geometric Network Tracing Catch Basins

texts:
I am using ArcGis 10.3 and am trying to trace a geometric network from a catch basin to a catch basin lead to a mainline ultimately to a storm pond.

Flow direction is set correctly using digitized direction
Traces when the flag is placed at the mainline manhole, the tracing works flawlessly
Problem occurs when I trace from a catch basin, it will highlight to the lead by stop at the mainline, what could I be missing?

My mainline and CB leads are in the same feature class.
CB points and manholes are in the same point feature class.

CB and MH Points:Simple Junction

Mainline and CB Leads fc: Complex Edge


texts:
I'm trying to perform some raster calculations (ex:A+B, A*(A>0)) using gdal_calc.py, but I'm stuck with an error when I try to make this simple test command:

import subprocess
import sys

subprocess.call([sys.executable, 'C:\\PROGRA~2\\GDAL\\gdal_calc.py', '-A', 'd:\\mnt_5x5.tif', '--outfile=d:\\test.tif', '--calc="A+1" '])

When I run it in CMD, it gives the following error:

0 ..
Traceback (most recent call last):
  File "C:\PROGRA~2\GDAL\gdal_calc.py", line 329, in <module>
    main()
  File "C:\PROGRA~2\GDAL\gdal_calc.py", line 326, in main
    doit(opts, args)
  File "C:\PROGRA~2\GDAL\gdal_calc.py", line 282, in doit
    myResult = ((1*(myNDVs==0))*myResult) + (myOutNDV*myNDVs)
TypeError: ufunc 'multiply' did not contain a loop with signature matching types
 dtype('S11') dtype('S11') dtype('S11')

GDAL is installed properly, since I had no problems running similar scripts with gdalwarp.exe and gdal_translate.exe.
The error mentions something about the numpy class dtype, but I'm not very familiar with numpy syntax.

As seen here it's an easy task, I don't know what I'm missing.


texts:
I am attempting to add a CQL filter to a WFS layer served from GeoServer. The result should display the pipelines which intersect landuse classes but for some reason I cannot get it to work. When using the preview in GeoServer the CQL filter works correctly.

I am storing the filter as a variable as such:

sewer_pipe_intersection_filter = ('Intersects' + '(' + 'geom' + ',' + 'collectGeometries' + '(' + 'queryCollection' + '(' + '"landuse_classifications"' + ',' + '"geom"' + ',' + '"INCLUDE"' + ')' + ')' + ')');

Am I missing something?


texts: Extract polygon from several FC in one process

texts:
I've built a polygon and used Clip (Analysis Tools) in order to extract information from several FC that intersect the polygon. Of course, I used the clip tool for each feature class.

My boss wants a single tool that clips all these feature clases at once and saves the result in different FC. Is there a tool in ArcGIS that does that?

Select by Graphics is cool, but then I have to export the data "manually". I've created this model, but in the case of the model I don't have the liberty of selecting the area I want to clip everytime.

Thank you


texts: Does anyone know where I can find a site that has US. Civil War roads and railroads (transportation routes) available in a ESRI GIS format preferably as a shapefile? I can find scanned maps, but would prefer vectors. I only need Virginia, West Virginia and Maryland, if it exist for the entire US, I will take it! A free site is wanted, but would consider commercial sites as well.


texts: How to apply a Bitmask for radiometric saturation QA in a image collection (earth engine)

texts:
I am new to earth engine and I am trying to apply a radiometric saturation mask in a image collection based on ''radsat_qa'' in earth engine data catalog for landsat reflectance tier 1.

I am trying to apply that radiometric mask in that collection :

var Landsat_5 = ee.ImageCollection('LANDSAT/LT05/C01/T1_SR')
               .filterDate('1984-03-01', '2012-05-01')
               .map(cloudMaskL457)
               //print(Landsat_5.size())


texts: QGIS: Copy all attributes of polyline layer when converting it to point layer

texts:
I want to add attributes from a polyline layer to a vector point layer.

The polyline is railway network. It has been divided into segments automatically, where as the attributes apply for each segment. To process the data further I had to convert the polyline into points. I wanted defined distances in between so I chose to use the plugin QChaninage. Now I got points in my defined distance. But in the attribute table there aren't any of the original attributes that where in the vectorlines table. How can I connect those attributes with my points?

I guess that vectorlines only store attributes at the end or beginning of these segments, but the point layer I created has points laying in between those segments.

I already tried to use tools from the toolbox (e.g Join attributes by location tool) but until now the attributes have been copied only to those points that are located exactly on the segment beginnings or endings of the original polyline.

I hope I am able to make my problem clear enough, if not please feel free to ask for further details. I am quite new to qgis.

edit: I also tried to intersect the original polyline with the attributes I want with my point layer but still only the segment beginnings and endings got the attributes I want, but not all the points.


texts: Possible to use same signature file to classify images from different years?

texts:
I have Landsat images for the same area over 20 years (one photo per year in same season). I would like to detect changes occured in forested area like clear-cut and bark beetle outbreak over time. I would like to use Maximum likelihood supervised classification.

My questions are:

As the signature of change (clear-cut, bark beetle outbreak) is the same over time, can I use the same signature file from one year to classify all 20 years?

in this case I suppose that firstly I have to normalize all scenes over time using Dark Object subtraction or other technique - which one should be the best to detect changes in forested area?

OR

Do I have to create signature file for every year and then run classification?

in that case, there is no problem with changing number of possibly detected classes of change - before outbreak you can find only one class = forest, after outbreak you can find "forest", "clear-cut", "regrowth"...

I can use ERDAS and ArcGIS as software.


texts: How can I change projection of a co-ordinate?

texts:
I want to convert a known co-ordinate which is in UTM projection to transverse mercator projection. I know the central meridian, scale factor, false easting, false northing value. Can someone give me some insight how can I convert this?

As for example, my known co-ordinate is UTM Easting 778582.17 and
UTM Northing 2671407.66. I want to convert it in following projection:

Projection: Transverse Mercator

False Easting: 500000.0

False Northing: -2000000.0

Central Meridian: 90

Scale factor: 0.9996

Latitude of origin: 0.0

Linear Unit: Meter

Datum: WGS 84


texts: How to load Georeferenced Scanned Maps in R

texts:
I have a geo-referenced scanned Map in GeoTiff format, which I would like to load into R. My intention is to plot some vector data (points and polygons) over this map using maptools package.

Is there any way to do this in R?

I have tried the raster and rgdal packages, however they give a gridded raster file, rather than the original image. I would like to load the map as an image itself and not a gridded raster file to plot the vector data.


texts: How to change background color of modified group layer control in Leaflet?

texts:
I've used jQuery append relocate a L.control.layers into an HTML containing. I've also modified them to look a little more like buttons.

var crsh_group_buttons = L.control.layers(crash_grouping, null, {collapsed:false}).addTo(map); // add group control
$('#crash_grouping_html').append(crsh_group_buttons.onAdd(map)) // use this to add html tag to move around/edit control
$('.leaflet-top.leaflet-right').hide(); // use this to remove duplication

The HTML:

And the CSS:

#crash_grouping_html {
  margin: 10px;
}

#crash_grouping_html input[type="radio"] {
  opacity: 0;
  position: fixed;
  width: 0;
}

#crash_grouping_html label {
    display: inline-block;
    background-color: #ddd;
    padding: 5px 10px;
    font-family: sans-serif, Arial;
    font-size: 16px;
    border: 2px solid #444;
    border-radius: 5px;
}

#crash_grouping_html label-background {
    color: #444;
}

#crash_grouping_html label:hover {
  background-color: #dfd;
}

The problem is that the background of the radio buttons within the HTML container ends up white and I'd like it to be clear, i.e. `opacity: 0;.

How do I change the opacity of the background behind the two radio buttons to clear?

I've tried changing the overall opacity, but that impacts the buttons as well. I've also tried placing the buttons in another container, but that doesn't return anything useful as well.


texts: Why is my bands showing black after atmospheric correction using SCP plugin(DOS1) in QGIS or DOS in Erdas?

texts:
I am classifying Landsat TM and Landsat ETM (level 1) scenes for my study area as part of my research(LU/LC). The scenes are in a single tile and span 5 different timelines. I have done the radiometric processing (radiance, TOA and sun corrected TOA).
However, it is showing the bands as a black background. I am not able to figure out how the fix the issue.


texts: rasterize in qgis based on foreign table data

texts:
I have  a few tables imported into QGIS as vector layer. These tables are linked to a vector SHP file with foreign keyas 1:M relation.

So, the data structure is as follows:

shp file linked to table1
shp file linked to table2
table2   linked to table3

Now when I click on a feature in shp file and open form, the data from table1, table2 and table3 all are displayed.

How do I rasterize the vector shp file based on data existing in table3 only (only one column of table3) ?


texts: Configuring ArcGIS Online Crowdsource Reporter App?

texts:
Deploying ESRI AGOL Crowdsource Reporter App and even though editable feature layers visible in map frame, and submitted reports are visible with fields, the form to submit a report does not launch with fields present (after click +submit report button, system hangs and never populates form).

Ideas?


texts: working standalone app .exe from python3 script that imports osgeo gdal?

texts:
I have a script written in python 3.5 that uses osgeo gdal (1.11) to extract maps and file info from geotiff files.
I would like to compile this code to create a standalone app on windows, and I use pyinstaller (3.2) for this.

The code compiles but does not run, i get the following runtime error:

File "site-packages\osgeo\__init__.py", line 15, in swig_import_helper
File "imp.py", line 296, in find_module
ImportError: No module named '_gdal'

this is from compiling test1.py, which has a single line:

from osgeo import gdal

with

pyinstaller.exe --onefile --debug test1.py

and running the resulting test1.exe.

[other tests, not importing gdal, compile and run fine].

It seems there are problems importing osgeo libraries when compiling using pyinstaller and py2exe.

I have seen this question: Working Windows Standalone .EXE From QGIS Python Script Using PyInstaller?
and i guess it is related but because it is specific to a qgis environment i do not know how to adapt the solution to my problem.

I have also seen there is a pyinstaller hook for osgeo libraries:
https://github.com/pyinstaller/pyinstaller/issues/1522, and
https://trac.osgeo.org/gdal/ticket/6364,
and i checked i've got this hook in my pyinstaller folder, but it does not solve the import problem for me.

I have also posted to the pyinstaller mailing list but obtained no answer.

How can I obtain a working executable from a standard python script which imports GDAL ?


texts:
I need to consume data from a REST endpoint that returns features in geojson format within a model in ArcGIS 10.2. Is there a way to access a URL instead of opening a file?

If there is no way to access a URL directly, would this require a custom python script to access the URL and save it to a local file, or is there a better way?


texts: How to find the width and height of the html content dynamically to pass to esri map infowindow.resize?

texts:
There will be a html content stored in a variable with div id to pass into infowindow

map.infoWindow.resize(width,height);
map.infoWindow.setTitle("Callout");
map.infoWindow.setContent(calloutData );
map.infoWindow.show(event.screenPoint,map.getInfoWindowAnchor(event.screenPoint));

How can i pass the width and height to infowindow.resize dynamically? Is there any way the width and height of the html content can be calculated and pass without passing the value by us?


texts: ArcGIS 10.1 calculating area out of Aspects

texts: I have used the aspect tool to visualize the 8(+ Flat) slopes of the different directions, now I would like to get the numbers of the areas for each different direction (+Flat). Anybody knows how that works?


texts: Is there an algorithm to calculate MGRS grid lines?

texts:
I am looking for a utility to calculate MGRS grid lines, or at least an algorithm.  I would like to draw MGRS grid lines on a google or leaflet map.

Seems like most of what I find are shapefiles/vector data. Problem is this won't work if I don't have a connection.  I would like to be able to draw the line dynamically.

Any ideas?


texts: Loss of RGB in Exported Raster to TIFF in QGIS

texts:
I have terrain raster images (jpg format) that I open in QGIS (latest version). I georeference the images (all 4 corner coordinates) then export them as a rendered image (tiff). When done, the images have all lost the original colors of the terrain and are now a blue-green tint when I run/view them in OSG Earth Viewer (from an ".earth file).

How do I keep the raster's original rgb values when exporting to a geotiff?


texts: How to use ArcGIS API for Javascript print task to create a legend for dynamically rendered layer

texts:
I am using v 3.11 of the ArcGIS API for Javascript and executing the PrintTask to generate a printable pdf of a web map. The map has a couple of Dynamic Map Service Layers that are dynamically rendered, i.e. the user can control the layer symbology based on various inputs.

When I execute the PrintTask, the dynamically rendered layers do appear on the printable pdf map. But, I can't get a legend for those dynamic layers to appear on the pdf.  I have tried a couple different approaches:

1) I have excluded the legendLayer array from the 'layoutOptions' object. I was hoping that would automatically generate a legend for all layers on the map, as suggested by the documentation. A legend does appear with the non-dynamic operational layers present, but not the dynamically rendered layers

2) I have created a legendLayer object specific to the dynamically rendered layers, like the code below, but still the layer doesn't appear in the legend.

var printTemplate = new PrintTemplate();
var legendLayers = [];
var legendLayer = new LegendLayer();
legendLayer.layerId = "dynLayer_0";
legendLayer.subLayerIds = [0];
legendLayers.push(legendLayer);
printTemplate.layoutOptions = { "titleText": title, "scalebarUnit": this._localMap.getAppConfig().printing.scalebarUnit, "legendLayers": legendLayers};

Any suggestions on how i can get my dynamically rendered layers to appear in the map legend?

(This same question is posted on the Esri discussion forum here)


texts:
Trying to use ogr2ogr to import a shapefile in PostgreSQL. Here is my command:
cd C:\Program Files (x86)\FWTools2.4.7\bin &&SET PGCLIENTENCODING= Windows-1256 &&ogr2ogr -f "PostgreSQL" -a_srs "EPSG:32639" PG:"host=localhost port=5432 dbname=123q user=postgres password=123456" "C:\Users\Desktop\GDB\test.mdb"

displays Persian text as a question mark , but  when set PGCLIENTENCODING to UTF8 I catch this error

invalid byte sequence for encoding "UTF8": 0x9d


texts:
I loaded the  Natural Earth Quick Start Kit in QGIS 2.8.5, enabled on-the-fly CRS transformation, and changed the CRS to World_Robinson, and this is what shows up:

When zoomed in it looks fine. To be precise, the glitch start to happen somewhere between 1:45,000,000 and 1:46,000,000.

Any idea what's causing this? Am I doing something wrong here?

EDIT: I don't think this is a duplicate issue. At least the "Settings -> Options, Rendering tab, uncheck Enable feature simplification by default for newly added layers" fix does nothing for this problem.

EDIT 2: This isn't limited to Robinson. Pretty much every CRS I tried has graphical glitches when viewing the whole world. And every CRS works fine when zoomed in (at 1:20,000,000 everything works).


texts: Basic statistics function on certain attributes stops at 6% on certain layer in QGIS?

texts:
I am trying to use the basic statistics function in QGIS on an attribute in a vector shapefile but it reaches 6% and then gets stuck and does not load anymore.

It works fine on other layers/other attributes within the same layer, how can I get around this?

There are 335 records in the shapefile and it's point data.


texts: Learning how to use Mapinfo Professional ?

texts:
I am wondering if there is a good website where can I learn how to use Map Info Professional ? I am an advanced ArcGIS user and am a beginner MapInfo. Thanks.

What I mean "Good website" I mean they  can be from site where they give you the steps, documents, powerpoint, pdf related to MapInfo.


texts: Can the ArcGIS Pro deep learning tools detect objects in non-nadir imagery?

texts: I have been asked to look into developing a deep learning tool to identify objects from 360 degree panoramas. Can this be done using the deep learning tools in ArcGIS Pro? I suppose there are two issues here. First is it suitable for images not at a nadir angle and secondly are stitched panoramas a suitable source. Very new to all of this.


texts: Set data defined text angle without setting x and y coordinate using new style labelling

texts:
I have a problem setting angled text labels with the new-style labelling dialog. The situation is this:

I have a shape file which only contains only labelling texts. This is a point layer, and it contains all information needed for the label, like text size, font etc. - while the placement of the label is steered by the cordinates of the geometry of the point, so there are no attributes containing the X and y coordinate. This is legacy data, so I have no choice in the matter - the labels aren't linked to objects in other shapefiles, they're just there by themselves, having originally made up a separate toponym layer.

If I use the old labelling mechanism, I can enter the text angle field in the appropriate place (in my data it's called TextAngle), and the text is displayed at the desired angle. But if I use the new-style labelling dialog, the text angle field in the 'position' section of the 'data defined settings' tab remains greyed out unless I set the fields 'x-coordinate' and 'y-coordinate'. Yet I don't have fields containing x and y coordinates in my data - they are implicit, being the very coordinates my data points occupy. They appear when I get info for the elements as 'derived', but they aren't in the attribute table. If I try and trick the dialog by entering something else in the 'x-coordinate' and 'y-coordinate' fields, I can enter my text angle field, but it has no effect.

Am I missing something? I'd really rather use the new-style labelling, since the buffering is nicer.


texts:
I am looking to create a fishnet of triangles with a specific x,y start location and angle. I essentially want my fishnet to follow the boundaries of a hexagon grid that I have. I found the Jennes repeat shape, but there is no option to anchor it in any way. I would also prefer a method in PostgreSQL. I have been unable to find an example of this using Google.

http://www.jennessent.com/arcgis/repeat_shapes.htm

Following is an image of the pattern that I am looking to repeat. Not only do I want to repeat this pattern, but I need the grid to have a specific anchor point and angle.


texts: QGIS 3 does not load default styles from spatialite (defined in QGIS 2.18)

texts:
I have a set of styles stored in a spatialite db with QGIS 2.18, the layer_styles table looks like this:

Adding a layer in QGIS 2.18 loads the style set as default (waters light blue, categorized):

Using the same spatialite db and loading the same layer in QGIS 3.2 does not load the default style defined in the db:

Trying to Style | Load Style | Database Styles Manager... results in an Error 'Error loading styles. The query was logged':

I noticed that when saving a style to spatialite database from QGIS 3.2 the f_table_catalog column is empty, but deleting the values from the above layer_styles table doesn't have any effect (same behavior, same error).

Even when saving the styles to spatialite db from QGIS 3 with option set 'Use as default style for this layer', the default style is not loaded when adding the layer, after all the above mentioned error does not occur and I am able to load the style manually (even if the style is not recognized as related to layer that just saved it...).

Am I missing some drastic changes in QGIS 3 style management, and ist there a way to continue using my QGIS 2.18 spatialite dbs with the correct styles in QGIS 3?


texts:
Is there a way to write a feature collection from Python memory to an S3 bucket (as Esri Shapefile, zipped Shapefile or something else) without writing it first to disk?

I tried writing to a ZipMemoryFile for later pushing it to s3 with boto3's upload_fileobj but it seems ZipMemoryFile are readonly

import fiona
from fiona.io import ZipMemoryFile
import boto3

# Initialize s3 client
s3 = boto3.client('s3')

# Read example feature collection
with fiona.open('fiona/tests/data/coutwildrnp.shp') as src:
    fc = list(src)
    meta = src.meta

# Write feature collection to file object
with ZipMemoryFile() as memfile:
    with memfile.open(path='test.shp', **meta) as dst:
        for feature in fc:
            dst.write(feature)

# Push to s3
s3.upload_fileobj(memfile, bucket, path)

The code above fails with a fiona.errors.DriverError: '/vsizip/vsimem/f588438c-3a3e-4f9c-80eb-c1f244911f96.zip/test.shp' does not exist in the file system, and is not recognized as a supported dataset name.


texts: Tool to synchronize extents of all running ArcGIS Instances

texts: I am working in 3 ArcGIS 10.0 mxd projects at the same time and am finding it laborious to always have to zoom to the same area in all 3 projects. Does anyone know of a tool or way that I can synchronize all open instances with a single click?


texts: How to return multiple tiles from WMTS request

texts:
Using the WMTS 'GetTile' request, I have been able to retrieve individual tiles from a layer (as specified by values supplied in the tilecol and tilerow paramaters).

Is it possible to retrieve multiple tiles (i.e. for example, an entire layer) through a WMTS request?  I've reviewed the answer supplied here: GeoServer: Receive multiple tiles from layer, but found even using this guidance I could still only retrieve an individual tile.


texts: Incremental updates on GDAL VRT with overviews

texts:
I have quite a big GDAL VRT with a pyramid (TIFFs in smaller zoom levels stored externally in separate folders) and the calculation of those takes quite some time.

I am also having regular updates on the VRT and I don't want to calculate the complete pyramid, because its not necessary. So my question is, do gdal_retile or gdaladdo or any other GDAL tool have the possibility to recalculate all the overviews for one image within the pyramid?


texts: Does OpenLayers have the ability to mask a raster with another layer?

texts:
Does OpenLayers have the ability to mask (in the GIS sense) one raster layer by another vector (or raster) layer?

For instance this would be the ability to show only the parts of one layer that are spatially coincident with another.


texts: Using inline variable in calculate field code block

texts:
I've got a model that just copies features from one feature class and appends them to another. If a user supplies a string variable in the NewName field, it overwrites the values for the Name field in the feature class. However, I can't get this working in the code block.

def calcName(Name, NewName):
    if len(NewName) == 0: #Meaning the user did not enter a variable here
        return Name
    else:
        return NewName

calcName(!Name!, '%NewName%')

This results in the field always being changed to '%NewName%' within the field. It doesn't matter what the string is, it always returns '%NewName%'. I can type potato in the NewName parameter and it will return '%NewName%'.


texts:
I am wondering to change and alter a model on the fly.

I have a whole process( model for the rest is done) that relies on different settings for buffers, and what I am trying to do is after I am not satisfied with the result of X buffer, I would like to go into model builder, and just change the value, and re-do the process, without needing to make a billion different confusing buffer files.

I have looked into erase, and append, but there are no tutorials on how to use erase and append, but from what I have seen, there should be a way:

Upon Starting up, the model erases any previous buffers, and appends the new settings to the same layer.

is this possible the way I imagine it?


texts: Convert IGLD85 to CGVD28 - Vertical Datums

texts:
I have water level data for the Toronto Harbour that states, "74.200 metres above IGLD 1985"

I also have land elevation data around Toronto that uses the Geodetic Vertical Datum of 1928 (CGVD28)

To relate the two datasets I assume I need both sets of data using the same vertical datum.

How do I convert IGLD85 to CGVD28 for the area around the Toronto Harbour?


texts: Create a Rectangle around a point in PostGIS

texts:
I have just started working in PostGIS. I have a table in PostgreSQL that stores Latitude,Longitude. I want to create a rectangle of 500*500 foot around every point. Therefore, used the below given script.

INSERT INTO GridData(latitude,longitude,geom)

SELECT
  latitude,longitude,
  ST_Buffer(ST_SetSRID(ST_MakePoint(longitude,latitude),4326),152.40)
from public.PointData

I am using Geometry data type in GridData and PointData table.The above script has been written to create rectangular shape in GridData table. What is the correct way to do this?


texts: What are the advantages of pgSQL+PostGIS+pgRouting over a simple MySQL+handwritten routing algorithms?

texts:
Goal:

To have a routable set of roads in a database and to have a software that can calculate the shortest path (e.g. simple Dijkstra) through this set in a reasonable amount of time (up to 2 seconds). Required to be usable in the real world by real vehicles.

Problem:

I have written a few parsers to parse .osm nodes and edges into a MySQL database. Then I applied a Java application that loads all the nodes and edges into memory, creates a graph from those and does a Dijkstra's algorithm routing on it. I am satisfied with the speed that it has.

Recently I found out that Openstreetmap project has switched from MySQL to PostgreSQL.

Then I found the pgRouting project.

http://www.slideshare.net/antonpa/shortest-path-search-for-real-road-networks-and-dynamic-costs-with-pgrouting-1097533

I was impressed by the possible advantages:

it can take traffic lights into account;
it can take crossings into account;
it can take signs and restrictions into account;
it even can take slopes into account!
it can take turn restrictions into account;
it even promises to take weather conditions into account.

So the questions are:

Are all those advantages real?
Isn't pgRouting a kind of a blackbox? There are just a few tutorials on how to use it, and even these tutorials introduce even more unanswered questions. Isn't it simpler to build the desired [Goal] system from scratch?
What's the whole purpose of storing routable data the PostgreSQL/PostGIS way (geometry columns, strange database schema) instead of having just two tables - nodes and edges in a simple MySQL database?


texts: Select ArcMap attributes that are in CSV

texts:
Is there an ArcMap 10.1 method for selecting only attribute rows that have an identifier in common with those in a CSV sheet?

I exported an attribute table (5000 rows) and eliminated all but the specific 257 rows I am interested in (based on an APN number). The resulting CSV has the same number of columns with the same headings, just fewer number of rows. Now I am having trouble figuring out how to map only the rows from the attribute table that I am interested in.

Doing a join just appends the tables, but doesn't get me to my goal of eliminating the attribute rows that aren't in my CSV sheet.


texts: In ArcMap, what are the units of curvature? Degrees/100m?

texts: The help function for ArcGIS' curvature tool just says the units are per 100 z units (which in my case is meters). I am not sure what unit per 100 meters it is though.


texts: How to display attributes of features intersecting the Atlas feature in a Print Composer label?

texts:
Is it possible to edit labels with python or an expression?

I have an atlas layer and a shape with countries. the atlas layer has several features and each feature intersects with several countries.

I want a label on my pdf map that gets the country name (attribute in country layer) as a function of the intersection of the atlas layer. is something like this possible?

Example:
Feature 1 of Atlas Layer lays over 3 Countries (C1, C2, C3). I want a label on my map that says: "C1, C2, C3".
Feature 1 of Atlas Layer lays over 2 Countries (C5, C6). I want a label on my map that says: "C5, C6".


texts: Why are my polygons automatically simplified/generalised when merging them in ArcMap 10.2?

texts:
I am creating a small land use map, as an exercise for visual image interpretation. I created a shapefile and started digitising polyogons with the polygon tool. The problem is that some of my polygons are automatically simplified/generalised. Some of the vertices disappear as soon as I finish sketch, which makes my map not very accurate.

Then, I also noticed that merging the polygons simplifies them. I just select polygons and click merge, then I notice gaps between them, some of the vertices having disappeared.

I searched the ArcGIS help, as well as online, to see if there are any editing options that I could change to disable this automatic simplification / generalisation, but I could not find any clear answers, only info about tools that can be used to deliberately achieve this effect. I just want ArcMap to leave my vertices where I put them.

This is my first editing attempt in ArcMap 10.2.
I haven't come across this problem in ArcMap 10.1.

EDIT: I am including some further information.

From my Data frame properties:

Map units: Unknown Units

Display: Decimal degrees

Current coordinate system: No coordinate system.

As background image for my polygon shapefile I am using a scanned true color photo (23X23 cm), scale 1:10,000, in the form of a tiff file, with the following properties:

Columns and Rows: 5959, 5573

Cell Size (X.Y): 4.2333418e-005, 4.2333418e-005

Spatial Reference: undefined

Regarding the tolerance, the only types of tolerance that I have set in ArcGIS so far are the "snapping tolerance" and the "sticky move tolerance". I assume that in your comments you are talking about the X,Y tolerance, about which the ArcGIS Help says it has a default value of 0.001 meters (?)


texts: gdal.rasterizeLayer in QgisPython results in Nan values

texts:
I have a vector layer projected in WGS84. I would like to use gdal.rasterizeLayer() from the python console to convert it to a raster. I would like to burn values from a field. I followed the gdal cookbook and adjusted the code based on the answer to this thread.

Here is the code I used:

import math
import os
from osgeo import ogr, gdal

# 1. Define pixel_size and NoData value of new raster
NoData_value = -9999
x_res = 0.5 # assuming these are the cell sizes
y_res = 0.5 # change as appropriate
pixel_size = 1

# 2. Filenames for in- and output
_in = "D:\...\\polyTry.shp"
_out = "D:\...\\poly2.tif "

# 3. Open Shapefile
source_ds = ogr.Open(_in)
source_layer = source_ds.GetLayer()
x_min, x_max, y_min, y_max = source_layer.GetExtent()

# 4. Create Target - TIFF
cols = int(math.ceil((x_max - x_min) / x_res ))
rows = int(math.ceil((y_max - y_min) / y_res ))

_raster = gdal.GetDriverByName('GTiff').Create(_out, cols, rows, 1, gdal.GDT_Byte)
_raster.SetProjection(source_layer.GetSpatialRef().ExportToWkt())
_raster.SetGeoTransform((x_min, x_res, 0, y_max, 0, -y_res))
_band = _raster.GetRasterBand(1)
_band.SetNoDataValue(NoData_value)

# 5. Rasterize why is the burn value 0... isn't that the same as the background?
 gdal.RasterizeLayer(_raster, [1], source_layer, options = ["ALL_TOUCHED=TRUE", "ATTRIBUTE=id"])

The photo below show the output raster with the green input polygons. Note the Nan values on the left (legend). I also inspected different x, y_resolutions (0.00416, 0.0833333). Additional attempts include creating a floating point and integer raster at both 32 and 64 bit (signed, e.g. gdal.GDT_Float64). All have failed and produced Nan values.

Also note that burn_values = [1] create a raster with all values set to 0.
How can it be solved ?


texts: In QGIS 2.18, I had been using the plugin "Plain Geometry Editor" to view, copy and paste the WKT geometry of features (as a solution to this question). However, this plugin is not available for QGIS 3.0. Is there any new core functionality within 3.0 that will do the same thing? or perhaps another plugin? ("GetWKT" allows me to view and copy, but not paste, the WKT data.)


texts: I want to create a desire line with the Flow Mapper plugin using QGIS version 2.1. After I did, it has failed. The data that I used is pictured below. There may be an error procedure I have used. Can anyone suggest how to do it right?


texts:
I'm currently using gdal version 1.11.2 (also tested this on 2.0.0) to open AWS Landsat-8 data directly from its url.

If I manually test the link in the browser, it works. If I use /vsicurl/ the returned variable is None.

from osgeo import gdal

url = 'http://landsat-pds.s3.amazonaws.com/L8/139/045/LC81390452014295LGN00/LC81390452014295LGN00_B5.TIF'

src = gdal.Open('/vsicurl/%s' %(url))

print src

How can I fix this?


texts:
I am new to QGIS.

I have two layers:

Layer A: Large polygons joining areas, lets call them countries.

Layer B: Smaller polygons(States) containing population count data within the large areas(countries).

I would like to summate all the state count data for each country.


texts: Why is shapefile layer not visible on WMS layer in QGIS?

texts:
In my QGIS project I have added a WMS layer for which the CRS is WGS84 EPSG:4326.

Now I want to show my shapefile layer which has the same CRS.

QGIS shows the layer separately but does not show with the above WMS layer.

Can any one help me to understand why?

I am using Quantum GIS 1.7.0

I made up shapefile for my project for a city area in which point locations are there with some attribute data.

I have directly drag and drop shapefile in QGIS.
is it OK or I made some wrong thing?

please guide me..


texts: Export NDVI raster from Google Earth Engine

texts:
I try to export a raster with NDVI values from Google Earth Engine. Although the export works fine, the original NDVI values (-1 to +1) are translated into 8bit values between 0 and 255 in the resulting image. How can I export the NDVI results conserving the original values?

Below the code, I´m using. If you import the "Sentinel-2 MSI: MultiSpectral Instrument, Level-2A" image collection and set the variable name to sent2_collection, you can run the code.

function add_ndvi_band(image){
  var ndvi = image.normalizedDifference(["B8","B4"]);
  return image.addBands(ndvi);
}

var time_filter = sent2_collection.filterDate("2019-01-01", "2019-12-31");
var time_filter_ndvi = time_filter.map(add_ndvi_band);

Map.addLayer(time_filter.median(), {bands:["B4","B3","B2"], min:0, max:3000}, "Cuautla - true color");
Map.addLayer(time_filter_ndvi.median(), {bands:"nd", min: -1, max: 1}, "Cuautla-NDVI");

var exportar_mapa = time_filter_ndvi.median().visualize({bands: ['nd', 'nd', 'nd'],max: 1.0});

Export.image.toDrive({image: exportar_mapa, description: 'ndvi',  scale: 10});


texts: Creating empty SpatialPoints or SpatialPointsDataFrame in R?

texts:
I have been trying to create an empty SpatialPoints in R but have not found the way yet.

I have tried with this formula:

SpatialPoints(as.matrix(data.table(x = numeric(), y = numeric())))

But it didn't work.
The closest thing I have found on the internet is Creating empty Polygons or SpatialPolygons in R? but that is for polygons and apparently it does not work the same way.

I have sp version 1.2.7


texts: Can the range of Unclassed Colors go outside the range of the data in ArcGIS Pro?

texts: I am mapping fitted data in ArcGIS Pro, coloring with unclassed colors. My data range between 0.89 and 1, but, in order to compare to other maps, I want to be able to adjust the color range to allow values less than 0.89.  I'm having difficulty changing the data range to allow the legend to show colors corresponding to values outside the range of the data. Is there a way to do this?


texts: How to draw contour line between certain elevation range?

texts:
I have a raster and I want to draw contour lines just between certain elevation range.
For example I want to draw contour lines between elevation 700 (m) and 1000 (m) with the interval of 10. So there must be 30 contour lines. I use ArcGIS. Do you have any idea what tool I should use to make it work?


texts:
I have 3 different strings: (Route) is a polyline coming out of a shapefile in which I removed all other routes, the other two (River and Trail) are imported KML's, which I created in google earth.

I am interested in the boundary these three strings form, and would like to make a polygon out of the shape (By connecting the end nodes of "River" and "Trail", this can be done randomly as I will later cut the created polygon with bordering polygons).

I know how to do the second part (connecting end nodes with "Node Tool" and polygonize with "Polygonize algorithm"), but how can I merge all three lines so that QGIS will see them as 1 Linestring?

Finally I would like to make such a Shape (Which I tried and failed since QGIS sees them as separate linestrings I believe).


texts:
Thought I had finally got Python, GDAL and QGIS to play nicely together but just tried to do a batch transform using a bash script to call gdalwarp and it claimed it couldn't read the libproj.dlib file. Tried the exact same transformation in QGIS and it worked. Copied the code from QGIS into bash shell and it failed. QGIS is calling the same GDAL library so I don't get this at all. Anyone got any ideas?
This seems to be connected somehow, not sure how, to the EPSG codes for Swedish grids being changed every five minutes and the libraries not being up to date. That said why does QGIS manage the job when bash doesn't?


texts: Categorized symbology for polygons using QGIS

texts:
In QGIS (using ver. 3.16) , you can use the categorized symbology renderer for polygons to assign a certain color to polygons with the same attribute value. There is also the Topological coloring algorithm to assign a value to each polygon in such a way that no adjacent polygons share the same color. Both works perfect.
However, I want to have a "nested" coloring of polygons - in the same style as this map here:
https://imgur.com/xVWwRid
So there should be a main color for the first order territorial units (say: blue, green, red), whereas all subordinated second order terrritorial units should be assigned a variation of this basic color (like: dark, light... blue, green, red).
A workaround would be to treat each first order territorial unit separately as an own layer and apply to each a categorized styling, using diffent color-ramps: blues, greens, reds. But this is quite cumbersome.
Is there a better way to achieve this?