texts: Merge 2 columns with numbers and NULL cells (QGIS)

texts:
I have an attribut table with 2 columns like this :
Column A     Column B
22            NULL
23            NULL
24            NULL
25            NULL
26            NULL
NULL          52
NULL          53
NULL          54
NULL          55

I want to take the numbers of B (52 to 55) and replace the NULLs of the column A with these numbers like this :
COLUMN A
22
23
24
25
26
52
53
54

Aggregate or concatenate or & or + doesn't work in the field calculator because there are NULL in the process.


texts:
I have encountered problem with GeoPDF consisting both raster and vector objects. While loading to QGIS both of them are rendered as raster layer (vector objects are being rasterized). I have tried to get rid of all raster using Inkscape, as it was only solution I got so far, but it is impossible to find evry "piece" of image, and also it causes loose of reference, so my map is not in correct place anymore.

Is there a way to extract only vector data from this pdf without losing CRS information?


texts:
Using ArcGIS 10.4

I have a feature class with many small catchments.
I also have several raster layers with information for these catchments (derived by zonal statistics). For example the sum of precipitation within each catchment.

Now I realized I need all these information in one big table to have the catchment with its position and size and the information like precipitation next to it (for example to normalize the value by catchment size etc. Of course the sum of rain also depends on the size of the catchment...). The problem is that a join-table does not work because the catchments don't have unique names that are the same in every layer.

So I tried spatial join multiple times. I first had to convert the raster layer into a point data. When I then try to spatial join this to the catchments, it takes hours and then at some point fails.

Any idea how I can solve that?

I was thinking something like get the centroid of every catchment (to not have millions of points, because within each catchment everything is the same anyway) but I have no idea how.

EDIT: With radouxju's advice I was able to solve the problem. BUT something happened that might cause problems in my analysis.

Unfortunately my subcatchments are not 100% precise. Its not an issue for the analyses but might be now. As you can see in the picture the edges are a little off. This seems to leave me with more than one line per catchment with identical ID because there are always little additional river segments (see little identify-window in picture). Any idea how I could/should treat that? Manually delete everything thats smaller than, I dont know, 20 meters?!


texts: QGIS coordinates not displaying correctly

texts:
Making my first Print in QGIS, and for some reason the coordinates are all over the place (see image). Does anyone know what would be causing this?
All of my settings seem quite standard, I will post these as well. This area should be bounded by a rectangle of just a few minutes in span.


texts: Is there a "trim" function in Gdal which would remove a NODATA border

texts: There is a function in R (trim) which removes the NODATA situated in the outer rim of a raster (entire external row or column made of nodata).  It is realy simple but quite slow.  I am looking for a similar function or algorithm in gdal to do that.  Any idea?


texts:
I have a layer control with 8 layers in it. I also have a legend control in lower right. A few layers have the legend tall. Now my issue is on smaller monitors the legend control is on top of the layer control, making it hard to turn on/off layers.

I've looked at panes but didn't see a reference to either control, so I've played with CSS and tried to set the z-index but with no luck. I'm sure it can be done as the legend know how to draw on top of the layer control but where is the setting?

.leaflet-control-layers{
    z-index: 500;
}
.legend {
z-index: 100;
}


texts: Bounding-Box in requests on overpass-turbo

texts:
On the overpass-turbo-page ( see http://overpass-turbo.eu/ ) i have tried to run several requests

see the following:

[out:csv(::id,::type,"name","addr:postcode","addr:city","addr:street","addr:housenumber","website"," contact:email=*")][timeout:300];
area[bbox="1.200,46.373,19.000,49.017"]->.a;
( node(area.a)[amenity=kindergarten];
  way(area.a)[amenity=kindergarten];
  rel(area.a)[amenity=kindergarten];);
out;

the above does not work

the one below does!

[out:csv(::id,::type,"name","addr:postcode","addr:city","addr:street","addr:housenumber","website"," contact:email=*")][timeout:300];
area[name="Bayern"]->.a;
( node(area.a)[amenity=kindergarten];
  way(area.a)[amenity=kindergarten];
  rel(area.a)[amenity=kindergarten];);
out;

the request below spits out a number of data

well - i do not know why the one with the boundingbox does not work?

in the example with the bounding box i have entered a example from Austria

i took the bounding box from Austria:  see here https://stackoverflow.com/questions/5187402/working-out-the-bounding-box-of-a-coutnry

1.200   46.373   19.000   49.017
 1.200,46.373,19.000,49.017

why does it not work?


texts: How to smooth a shaded relief map created with the command r.relief in GRASS 7?

texts:
How can I smooth a shaded relief map created with the command r.relief in GRASS 7?

I read about the plugin r.denoise but I can only find it for GRASS 6...


texts: Different origin between GDAL/Python and ArcMap of a Modis image

texts:
I have a Modis image and i load this image in Python using gdal library

from osgeo import gdal, ogr
INPUT_raster_1 = "C:\\myimage_1km.tif"
ds_1 = gdal.Open(INPUT_raster_1, gdal.GA_ReadOnly)
geoMatrix_1 = ds_1.GetGeoTransform()
(-1770002.4756305092, 926.6254331383334, 0.0, 7444752.081661087, 0.0, -926.6254331383334)

with

top left x (x Origin) = -1770002.4756305092
top left y (y Origin) = 7444752.081661087

when i open the same image in Arcmap 10.0 and i look the layer propreties the origins are differents

with

 top left x (x Origin) = -1769539.16291
 top left y (y Origin) = 7444288.76894

this is the two origins (GDAL and Arcmap/GIS software). The GDAL is translate outside the image


texts:
Great that this forum exists now. I hope it will thrive.

Let me start by saying I did ask this particular question on the official iPhone SDK forum as well.

I have seen a working example of a TiledMapServiceLayer subclass that overrides the GetTileUrl(int level, int row, int col) method to point to a TMS-compliant service. This is in the .NET API. I tried implementing

-(NSString *)tileURL:(NSInteger)level row:(NSInteger)row column:(NSInteger)column

and various variations but to no avail. Is there a workaround for this or does the ArcGIS iOS SDK just not support TMS?


texts: Writing Python variable to NetCDF gives TypeError

texts:
I'm trying to write a Python variable to a new NetCDF file in Linux.

Code Excerpt

import sys
import numpy as np
from numpy import arange, dtype
import netCDF4 as nc4
from netCDF4 import Dataset

my_example_nc_file = '/home/user/file1.nc'
nc = Dataset(my_example_nc_file, mode='r')

lons = nc.variables['longitude'][:]
lats = nc.variables['latitude'][:]
data = nc.variables['data'][:]
time = nc.variables['time'][:]

files = file.shape[0]
dims = file.shape[1:]
npy = np.mean(file, axis=0)
nc_dist = np.sort(file.flatten())[::-1]
result = nc_dist[::files]
index = np.argsort(npy.flatten())[::-1]
tmp = np.empty_like(result)
tmp[index] = result
tmp = np.where(npy.flatten() > 0, temp, 0.0)
result_final = tmp.reshape(dims)

# open a new netCDF file for writing.
ncfile = Dataset('/home/user/file2.nc','w')

# create the x and y dimensions.
ncfile.createDimension('x',lats)
ncfile.createDimension('y',lons)
# create the variable (4 byte integer in this case)
# first argument is name of variable, second is datatype, third is
# a tuple with the names of dimensions.
data = ncfile.createVariable('data',dtype('int32').char,('x','y'))

data[:] = result_final

ncfile.close()

Error Message

Traceback (most recent call last):
File "script.py", line 120, in <module>
ncfile.createDimension('x',lats)
File "netCDF4/_netCDF4.pyx", line 2562, in netCDF4._netCDF4.Dataset.createDimension
File "netCDF4/_netCDF4.pyx", line 3364, in netCDF4._netCDF4.Dimension.__init__
File "/usr/local/lib/python2.7/dist-packages/numpy/ma/core.py", line 4309, in __int__
raise TypeError("Only length-1 arrays can be converted "
TypeError: Only length-1 arrays can be converted to Python scalars

Does the x, y need to be converted to long, lat?


texts: Using OSMFilter to filter for the lack of a tag

texts:
I am looking into filtering the OSM data for lakes, using OSMFilter.

Lakes can be defined by the combination of tags

natural=water
water=lake

However, another definition would be only

natural=water

If the water tag is not defined, it is defaulted to be a lake.

When using OSMFilter, I can easily get first definition

--keep="natural=water and water=lake"

However, I am having issues with getting the second definition, in conjuction with the first. My attempts included

--keep="natural=water and ( water=lake or water!=* )"
--keep="natural=water" --drop="water=* and water!=lake"

and various other permutations which were random stabs in the dark.

In conclusion, would there be a way to filter for the distinct lack of the tag water


texts: Max value from two columns in ArcGIS table query?

texts: I'm looking for a tool that will select just these certain features (mark them in a new column or just delete all other features). It´s the highest number of "OBJECTID" for every number of "arcid".


texts: Retraining a classifier with training data from different images

texts:
I am in the process of conducting a multitemporal image classification in Earth Engine using training data from specific images within an ImageCollection. So far, I was able to classify an image from one day where I had field data (see my code here).
However, I need guidance on how to retrain the Random Forest classifier with training data from additional days (for example image_2 and image_3 in the code). In other words, I will like to build a classifier that does not only consider one image of training data (image and nwfc in the code), but several FeatureCollections that I created for different images (for example, FeatureColllections newfc_2 and newfc_3 in the code).
After this step is done, I would like to apply that retrained classifier to the whole ImageCollection (collection in the code).


texts: QGIS 3.16 crashes when importing GeoPandas

texts:
I've recently installed Pandas and GeoPandas in Ubuntu 18.04 using pip.
Unfortunately, when I import GeoPandas in PyQGIS, QGIS 3.16 crashes and closes.
I'm using: Python 3.6, Pandas 0.24.0, Fiona 1.8, GeoPandas 0.9.0


texts: Minidump Error Messages With Large Dataset

texts:
I'm using QGIS 2.8 on a system running Windows 8.1 (x64) with 12GB of RAM. I am attempting to run analyses of a very large database (.gdb format, 7.17GB).

In attempting to run the "Join attributes by location" function on two vector layers, I get an error message of a minidump to C (i.e, "minidump written to C:\Users\Admin\AppData\Local\Temp\qgis-20150717-131933-1872-4788-1b929ef.dmp"). This also occurs when attempting to run "Intersect" on these two layers.

Restarting the computer hasn't fixed this issue, nor has updating all my plugins. I looked into changing the name of the .qgis2web folder (as recommended at http://hub.qgis.org/), but that didn't work.

Using a similar, but smaller database (also .gdb format, but only 5MB) these functions work fine. This makes me thing the issue has something to do with the size of the dataset.

Anyone have any experience with this issue?


texts:
I would like to create a style file for a layer in Geoserver. I have point geometries and the SLD cookbook does give nice examples for the simple ways to create your symbology.

However, I would like to combine the attribute dependent way and the scale dependent way. My points need to be colored depending on some attribute value and change size depending on the zoom level.

Does anybody have an example on how to do this or even some link where more complicated version of SDL files are available?


texts:
I work for an engineering firm, and my question to the forum is:

Can QGIS produce a stage storage plan for multiple drainage basins? I am attaching an image of what I am talking about.

Currently, we use a combination of Autodesk products to get this map created.  It consists of 3 separate sub-basins with 3 separate elevation tables. However, due to the size of the LiDAR data that we have, along with the large areas that we are working with, it is taking far too long as the software takes a while to regenerate the data.  The president of the company asked me to look at ArcGIS to see if this would be a better solution, and I have dabbled in QGIS to do some other GIS related workflows with it, and I would rather use it to produce the plans, as it is not only free, but seems like it has any plugin imaginable.  Can someone please just let me know if this is possible in QGIS?

Also, I have a training/Resources question.  I know that there are some tutorials out there for QGIS, and they are very good at showing you what the product can do, but does anyone know of any "experts" out there that we could hire to help us with anything QGIS related?  The company I work for is more than happy to pay for training whether it is in person or via the Internet; FYI, we are in Florida.


texts: I am looking for feedback from people who are familiar with both TerraGo and Esri's respective geospatial pdf functions. I understand TerraGo offers a broader spectrum of functionality, but wonder if TerraGo's enhancements have been worth anyone's while.


texts: Aligning Raster and vector layer using PyQGIS when they do not match?

texts:
Relatively new to GIS. I've created a vector layer of points based on row/col position of high population density pixels in a raster layer. The layers do not align even though they have the same CRS, presumably because they do not have the same extent.

Is it possible to edit the extent of the raster to match that of the vector layer or when creating the new vector layer can I define extent based on my raster layer?


texts: NDVI Time Series over Feature Collection of districts

texts:
I am very new to google earth engine and I am having trouble creating a time series of NDVI for a feature collection. I am working with the Landsat 8 NDVI Layer "LANDSAT/LC08/C01/T1_32DAY_NDVI" and a shapefile containing all 594 Indian district geometries as of 2001. My goal is to write a code that takes the mean pixel value of an image for every district geometry so that I can create a time series (or really a panel) of these values for every district and date available in the landsat 8 collection. So far I've tried writing a function that takes an image and a feature and computes the average pixel value. I'd like to have this iterate this function over the entire feature collection but I have no idea how. Would love any guidance as I've got a lot to learn.
//Gathering Landsat NDVI Images for Indian Districts

//Before running this code need to upload the indian district shapefile IND_adm2
//to the assets section of google earth engine

var districts = ee.FeatureCollection("users/nataliasabateranaya/IND_adm2");

//Adding the vector layer of districts form my asset files

Map.addLayer(districts,{},'Districts');

print(districts);

//Map.centerObject(districts, 5);

//Adding Landsat 8 NDVI data filtered for a date range of interest
var ndvi = ee.ImageCollection("LANDSAT/LC08/C01/T1_32DAY_NDVI");

print(ndvi);

//NDVI image for a specific month

var Im0120 = ee.Image("LANDSAT/LC08/C01/T1_32DAY_NDVI/20200101");

print(Im0120);

//Clipping images to district boundaries finding the mean image for the time period

//var dist0 = districts.filterMetadata('ID_2', 'equals', 15713);

//print(dist0);

var clipped0 = Im0120.clip(districts);

print(clipped0);

//Standard visualization parameters given by the dataset documentation
var colorizedVis = {
  min: 0.0,
  max: 1.0,
  palette: [
    'FFFFFF', 'CE7E45', 'DF923D', 'F1B555', 'FCD163', '99B718', '74A901',
    '66A000', '529400', '3E8601', '207401', '056201', '004C00', '023B01',
    '012E01', '011D01', '011301'
  ],
};

//Adding Colorized layer to the map
Map.addLayer(clipped0, colorizedVis, 'Colorized');

//Finding the mean NDVI per each image need to turn this reducer into a function

var meanNDVI = function(image, feature) {
  var baremean = image.reduceRegion({
  reducer: ee.Reducer.mean(),
  geometry: feature.geometry(),
  scale: 30,
  }).values();
  return print(baremean);
};

//Testing add NDVI function
var series = meanNDVI(clipped0, districts);
//Doesn't work because I'm calling the entire feature collection at once


texts: Calculating a percent from attributes in label expression

texts:
I am trying to edit my existing python code in the label expression in order to add one more bit of information to the map.

The purpose is to automate fire maps creation through data driven pages for info/billing purposes. The existing code displays the acreage of the owner agencies responsible the fire. It would be ideal if it will display their ownership as a percentage as well.

Attached is an example of the map currently being produced.

Code for the label in the center of the fire:

def FindLabel ( [BLM] , [BR] , [DNR] , [DOD] , [DOE] , [NPS] , [OS] , [Private] , [SITLA] , [SL_F] , [Tribal] , [UDOT] , [UDWR] , [USFS] , [USFWS] , [USP] ):
xBLM = xBR = xDNR = xDOD = xDOE = xNPS = xOS = xPrivate = xSITLA = xSL_F = xTribal = xUDOT = xUDWR = xUSFS = xUSFWS = xUSP = ""
if [BLM]:
    xBLM = "BLM: {} acres \n".format([BLM])
if [BR]:
    xBR= "BR: {} acres \n".format([BR])
if [DNR]:
    xDNR= "DNR: {} acres \n".format([DNR])
if [DOD]:
    xDOD= "DOD: {} acres \n".format([DOD])
if [DOE]:
    xDOE= "DOE: {} acres \n".format([DOE])
if [NPS]:
    xNPS= "NPS: {} acres \n".format([NPS])
if [OS]:
    xOS= "OS: {} acres \n".format([OS])
if [Private]:
    xPrivate= "Private: {} acres \n".format([Private])
if [SITLA]:
    xSITLA= "SITLA: {} acres \n".format([SITLA])
if [SL_F]:
    xSL_F= "SL_F: {} acres \n".format([SL_F])
if [Tribal]:
    xTribal= "Tribal: {} acres \n".format([Tribal])
if [UDOT]:
    xUDOT= "UDOT: {} acres \n".format([UDOT])
if [UDWR]:
    xUDWR= "UDWR: {} acres \n".format([UDWR])
if [USFS]:
    xUSFS= "USFS: {} acres \n".format([USFS])
if [USFWS]:
    xUSFWS= "USFWS: {} acres \n".format([USFWS])
if [USP]:
    xUSP= "USP: {} acres \n".format([USP])

return "{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}{}".format(xBLM, xBR, xDNR, xDOD, xDOE, xNPS, xOS, xPrivate, xSITLA, xSL_F, xTribal, xUDOT, xUDWR, xUSFS, xUSFWS, xUSP)


texts:
I am using Mapfish Print 3 to print map with grid layers. The printing Engine is working fine.

I want to label grid value in Degree Minutes Seconds Format

Example: 40° 26′ 46″ N or 79° 58′ 56″ W.
How to do that?. can any one help?

Request JSON(http://localhost:8080/print/print/crosses_point_grid/report.png)

Documentation: http://mapfish.github.io/mapfish-print-doc/layers.html#Grid%20Layer

{
    "attributes": {
        "map": {
            "bbox": [
                66.687007759,
                34.5660284950001,
                74.894126892,
                38.491359711
            ],
            "dpi": 254,
            "layers": [
                {
                    "font": {
                        "name": [
                            "Liberation Sans",
                            "Helvetica",
                            "Nimbus Sans L",
                            "Liberation Sans",
                            "FreeSans",
                            "Sans-serif"
                        ],
                        "size": 8,
                        "style": "BOLD"
                    },
                    "gridType": "points",
                    "haloColor": "#CCFFCC",
                    "haloRadius": 4,
                    "indent": 10,
                    "labelColor": "black",
                    "labelFormat": "%1.0f %s",
                    "numberOfLines": [
                        5,
                        5
                    ],
                    "renderAsSvg": true,
                    "type": "grid"
                },
                {
                    "baseURL": "http://localhost:8020/geoserver/watershed/wms",
                    "opacity": 1,
                    "type": "WMS",
                    "layers": [
                        "watershed:mask_basin_and_watershed"
                    ],
                    "imageFormat": "image/png",
                    "styles": [
                        ""
                    ],
                    "customParams": {
                        "CQL_FILTER": "gid=1 AND layer='basin'",
                        "TRANSPARENT": true,
                        "TILED": true,
                        "EXCEPTIONS": "application/vnd.ogc.se_inimage",
                        "scaleMethod": "accurate",
                        "access_token": "None"
                    }
                },
                {
                    "baseURL": "http://localhost:8020/geoserver/watershed/wms",
                    "opacity": 1,
                    "type": "WMS",
                    "layers": [
                        "watershed:Slope"
                    ],
                    "imageFormat": "image/png",
                    "styles": [
                        ""
                    ],
                    "customParams": {
                        "TRANSPARENT": true,
                        "TILED": true,
                        "EXCEPTIONS": "application/vnd.ogc.se_inimage",
                        "scaleMethod": "accurate",
                        "access_token": "None"
                    }
                }
            ],
            "longitudeFirst": true,
            "projection": "EPSG:4326",
            "rotation": 0
        }
    },
    "layout": "A4 landscape"
}


texts: Checking if points are concyclic before solving three point resection?

texts:
I'm trying to write a function that solves the three point resection problem using Tienstra method. I gathered a lot of papers and books about this problem, and each one of them states:

  If the unknown point P lies on a circle defined by the three known
  control points then the solution is indeterminate or not uniquely
  possible. There are, theoretically, an infinite number of solutions
  for the observed angles. If the geometry is close to this, then the
  solution is weak.

Currently my function solves all of the examples found in these books, but I don't know how to check if 4 points are concyclic at the beginning of the function (in order to throw exception).

I hope that you can understand the problem. At the beginning I only have 3 known points and I need to determine fourth point. So I cannot check if 4 points are on the same circle because there are no 4 known points to begin with. I would also like to mention that solution in this special case is sometimes NaN but mostly it is some "random" number.

Are there any methods to catch this kind of an error?

Example:

Let's use a square with these points:

A (0,0)
B (0,1)
C (1,1)
D (1,0)

Imagine that I measured angles from "unknown" point A.

If I put those angles and points B, C, D into my function, than I should expect my result to be (0,0). But because these points are concycllic I am bound to get wrong result, something like (1.615,1.615).

I need to tell the end-user that this answer is wrong because points are concyclic. I just don't see any way to tell if result is correct or not.


texts: Getting the difference between a multipart feature and a single feature using Itopologicaloperator

texts:
I am creating a C# addin for ArcGIS Desktop, where one of the functions is to create a feature from the difference between 2 other features.

In the image below, I want to be able to create a new feature from the difference between either the red and blue polygon or the green and blue polygon (the user will be able to select which on they want to work with).

I have the following code

        ####ADDED CODE#####
        IQueryFilter qf = new QueryFilterClass();
        qf.WhereClause = "CHANGEREFERENCE = '" + cmbDropdownFeatImp.SelectedItem.ToString() + "'";
        IFeatureCursor featureSUOCursor = fcSUOPending.Search(qf, false);
IFeature featureSUO = featureSUOCursor.NextFeature();

        IFeature mergedSUOFeature = null;
        while (featureSUO != null)
        {
            //MessageBox.Show(featureSUO.get_Value(featureSUO.Fields.FindField("CHANGEREFERENCE")).ToString());
            mergedSUOFeature = featureSUO;

            featureSUO = featureSUOCursor.NextFeature();
        }
        ####ADDED CODE#####
            //select all the highways polygons that are intersected by the selected geometry
            ISpatialFilter spaFil = new SpatialFilterClass();
            spaFil.Geometry = mergedSUOFeature.Shape;
            spaFil.GeometryField = publicHighwaysFC.ShapeFieldName;
            spaFil.SpatialRel = esriSpatialRelEnum.esriSpatialRelIntersects;

            //query the results from the spatial filter
            IFeatureCursor geomCursor = publicHighwaysFC.Update(spaFil, false);
            IFeature geomFeat = geomCursor.NextFeature();
            //insert the new feature
            IFeatureCursor insertPHCursor = publicHighwaysFC.Insert(true);
            IFeature insertPHFeature;
            IGeometry newPHShape;
            ITopologicalOperator2 topoOp;

            while (geomFeat != null)
            {
                topoOp = mergedSUOFeature.Shape as ITopologicalOperator2;
                newPHShape = topoOp.Difference(geomFeat.Shape);
             //add the feature as a graphic for this example
             .....
             }

If I select the green polygon and run the above code, I get the the difference between that feature and the blue feature as a brand new feature in purple), which works perfectly and what I want

However, if I select the red feature (which is a mutipart feature), when the same code is run the following happens

It seems that the if the feature is a multipart polygon, it does not create a difference.
So my question is, what is the best way to get the difference between features regardless of whether it is a multipart feature or a single feature?


texts: Error on 'Extract raster values to CSV' in batch process in QGIS

texts:
The Extract values (csv) contained a bug in the script. The below link shows how to correct the bug. Error on 'Extract raster values (CSV)' - Error executing algorithm 1 'Dataset' object has no attribute 'mapToPixel' See log for more details

However, a batch process always stops at the 8th iteration when I use the corrected extract raster values to CSV script (no matter I change the different raster inputs).

Here are the error messages at 8th iteration.

**Algorithm Extract raster values (CSV) starting...**

Prepare algorithm 0: Points from vector
Parameters: Input_raster =D:\IDD_RCP\8.5\Averaged_RCP8.5_Nan_basin\2080-2099\ta\RCP_8_5_mrc3_2080_2099_ta_mon10_RCP_8.tif, Input_vector =D:\Average_Raster_over_Vector\Nan_basin_centroid_WGS.shp
Outputs: Output_layer =C:\Users\NORASET\AppData\Local\Temp\processing\592fdd79ac8f43d4bffc01e05dc89310\Outputlayer.shp
OK. Execution took 1.145 ms (1 outputs).
Prepare algorithm 1: Extract raster values to CSV
Parameters: Input_raster =D:\IDD_RCP\8.5\Averaged_RCP8.5_Nan_basin\2080-2099\ta\RCP_8_5_mrc3_2080_2099_ta_mon10_RCP_8.tif, Input_vector =C:\Users\NORASET\AppData\Local\Temp\processing\592fdd79ac8f43d4bffc01e05dc89310\Outputlayer.shp, Transform_vector_to_raster_CRS =False
Failed

**Error executing algorithm 1 [Errno 9] Bad file descriptor See log for more details**


texts: How to highlight polygons around my geolocation?

texts:
I'm using the ArcGIS JavaScript API to create a map. I need to select/highlight polygons on my feature layers around my geolocation. I use in-build "LocateButton" function for geolocation.
I looked through all examples on Esri developer webpage and none of them are useful.

Do you have any idea how it can be done?


texts: Mapinfo 12.5.1 (64 bit) failing to call *.xlsx workbooks

texts:
My company have upgraded to to Mapinfo 12.5.1 (64-bit) this week. It fails to open tables that call *.xlsx files. Those that call *.xls files have no problem. The error for *.xlsx files is as follows:

If I attempt to open *.xlsx files in this new version of mapinfo (to register them as tables) I get the following error.

The *.xlsx files I am trying to call/open are not being used by any other application, nor are they located in a read-only directory or similar.

Suggested solutions on this forum to similar errors suggest converting *.xlsx files to *.xls format. We have hundreds/thousands of tables that call *.xlsx files, so this would be a major undertaking. Furthermore, I wonder that this may be something different and specific to mapinfo 12.5.1 (64-bit), as the same tables (from the same location) open without issue on earlier versions (e.g. mapinfo 12.5.0).

I hope someone may have a smart solution... :)


texts: Activating a conda environment from within QGIS -- cannot be done due to inherited environmental variables?

texts:
Background
I've been working on a small QGIS Python plugin. Part of the functionality requires a number of packages that have complex dependencies. In my regular Python use, I use conda to manage it. QGIS can be installed via conda, but I quickly run into issues: numba-JIT doesn't work, and I think there's issues with the GIS stack (geopandas, rasterio) versus QGIS (both requiring GDAL for example).
Anyway, I have a working solution, which is to run two Python interpreters (conda & QGIS) and have them communicate via socketserver (this idea: https://stackoverflow.com/questions/43334302/communication-between-two-separate-python-engines).
The problem
This works fine, I'd just like to be able to start the conda interpreter from within the QGIS GUI. My idea was basically to:

Figure out the conda installation (like e.g. VSCode does: https://github.com/microsoft/vscode-python/blob/abfb8c31714ae4252dc1be88e00b365a0137c701/src/client/pythonEnvironments/discovery/locators/services/conda.ts#L36)
Call the conda activate script to set the appropriate environmental variables for the conda environment via a subprocess call.
Start the interpreter of that conda environment.
Start my server on localhost with a specified port, and connect.

However, without exception, I get this error when calling activate.bat {name of environment} (source activate on *nix):
"c:\Miniconda3\Scripts\conda-script.py", line 11, in <module>
    from conda.cli import main
ModuleNotFoundError: No module named 'conda'

All of the options I've tried (direct subprocess call, subprocess to intermediate Windows Batch/Powershell scripts) work fine outside of QGIS, but result in this error when tried from inside of QGIS.
My current hypothesis is that it's the environmental variables being set when starting QGIS are somehow interfering, effectively crippling the conda environment activation.
So I've tried stuff like the ignore switch /i for cmd, or -UseNewEnvironment for Powershell, but to no avail (from: https://stackoverflow.com/questions/8261156/start-new-cmd-exe-and-not-inherit-environment).
The question
Anybody know a workaround?
I feel like there ought to be a relatively easy way to "escape" the QGIS-set environmental variables (which I'm blaming so far). Or is this a fool's errand?
I've currently resorted to asking the user to start an interpreter, and enter the port number in a field in the plugin, which are kinda ugly steps.


texts:
Being new to ArcMap, and ArcPy I have a problem with a script including several geoprocessing functions.
The number of functions inspired a search for a means to save outputs (subsequent inputs) to memory, leading to the 'in_memory' assist provided by ArcMap.

However the following script errors out at the RasterToPolygon_Conversion() and I am unsure why...

import arcpy

arcpy.CheckOutExtension("spatial")
arcpy.env.overwriteOutput = True
arcpy.env.workspace = "C:\\Users\\Important\\testMap.mxd"

DEM_raster_layer = "C:\\canyon.tif"
Camera_point_layer = "C:\\birdsEye.shp"

# Process: Visibility analysis
arcpy.gp.Visibility_sa(DEM_raster_layer, Camera_point_layer, "in_memory\\0", "",\
                      "FREQUENCY", "NODATA", "0.00001201","FLAT_EARTH", "0.13", "", "",\
                      "OFFSETA", "", "", "AZIMUTH1", "AZIMUTH2", "VERT1", "VERT2")

# Process: Visibilty boundries cleanup
arcpy.gp.BoundaryClean_sa("in_memory\\0", "in_memory\\1", "ASCEND", "TWO_WAY")
arcpy.Delete_management("in_memory\\0")

# Process: Visibility raster to polygon(s)
arcpy.RasterToPolygon_conversion("in_memory\\1", "in_memory\\2", "NO_SIMPLIFY", "")
arcpy.Delete_management("in_memory\\1")

Here is the following error return:

  Runtime error  Traceback (most recent call last):   File "", line 32, in    File "c:\arcgis\desktop10.2\arcpy\arcpy\conversion.py", line 244, in RasterToPolygon     raise e ExecuteError: ERROR 000582: Error occurred during execution.

Im guessing there is some syntax or logic mistake in this method?


texts: Testing IIS and Tomcat fails, How to solve it?

texts:
I'm installing and configuring arcims 9.3 and I have many problems with it. I followed all steps in ESRI article here (http://support.esri.com/en/knowledgebase/techarticles/detail/35515), but I have a problem with step 8.

When I verify IIS and Tomcat were installed successfully, when I enter test URL in my browser:

http://localhost/examples/servlets/servlet/HelloWorldExample

An error occurs, HTTP 400 Bad Request. So what can I do about the issue, my OS is Windows 7.


texts: Zonal statistics results in some NULL values in QGIS?

texts:
I used zonal statistics through QGIS to assign raster image values to polygons.
Here, Raster image has value in range from 0 to 238.567.

As a result, some NULL values are assigned to polygons,
even though raster image fully covers those polygons.

When "count" is assigned to zero, statistical values are set to NULL.
But such a polygon is still on the raster image(at least visually).

What's wrong with it ?


texts:
i use QGIS and i want to know how to run a sql code (fichier.sql) in python console in QGIS

I have used this :

impost os
os.system("psql \i C:/fichier.sql -d test2 ")

but it doesn't work
 Any Help !!!


texts: How to open OSM file in Python with GDAL

texts:
I am trying to open a *.osm file in Python with GDAL. But I doesn't work. What am I doing wrong?

import ogr
driver = ogr.GetDriverByName('OSM')
datasource = driver.Open('map.osm')
layer = datasource.GetLayer()

Error looks like this

>>>

Traceback (most recent call last):
  File ".../osm_reader.py", line 3, in <module>
    datasource = driver.Open('map.osm')
AttributeError: 'NoneType' object has no attribute 'Open'

I exported the data directly from the OSM Website.
My Python Version is 2.7.5.

About my GDAL Version I am not sure. And this might be the problem.

Easy Install says

U:\>easy_install GDAL
Searching for GDAL
Best match: GDAL 1.10.1
Adding GDAL 1.10.1 to easy-install.pth file

Using c:\python27\lib\site-packages

GDAL Version says

>>> gdal.VersionInfo()
'1810'

Does 1810 mean GDAL 1.10.1? How do I get this to work?


texts: "select by attribute" error, when using getParameter

texts:
I'm developing an ArcGIS tool by Python. Below is a part of the inputs:

StudyArea = arcpy.GetParameterAsText(0)

LandCover = arcpy.GetParameterAsText(1)

gridcode = arcpy.GetParameterAsText(2)

gridcode is a field from LandCover.

gridcode aims to derive the field which contains land cover class code.

Then I try to select some land cover types (land cover code < 17 and = 21), and the code I write is:

arcpy.SelectLayerByAttribute_management("LC_test","NEW_SELECTION",'gridcode<17 or gridcode=21')

"LC_test" is the feature layer of LandCover

The problem is: in the LandCover shapefile, if the field of Land Cover code is named as "gridcode" as well, the tool works fine.

If the field name is not "gridcode", the tool fails to execute. The error is "invalid expression".

Can anyone help me with this?


texts: I have shapefiles that I ended up having multiple attributes for and I ended up getting 3 group folders that hold different lines on the KMZ.  The groups are for gas lines 0-20 pressure 20-60 and then 60+.  Inside these groups are sections of line that are 20, 30, 45... etc.  Because of this, I want to be able to click on the line in KMZ and have it say "LayerName - XXX PSI".  When I try to do this within QGIS I end up getting rid of the attributes and it is not smart any more. As shown in the picture I already have the Layer as the the name but I want to be able to have the DesignPres attribute next to it.


texts: How to obtain openstreet API key for nominatim (r)?

texts:
I wanted to use r package nominatim for my program written in R.
I tried to run very simple example osm_search('Cracow University of Economics'), however I got the following error:

  Please provide a openstreet API key

I even made an account at https://www.openstreetmap.org/, however it still does not work after specifying the email parameter in the osm_search- I entered the email that I used during registration at OSM.

How do I obtain the right API key to use with nominatim package?


texts:
I have multiple sites that are surrounded by a buffer. I also have a layer which corresponds to areas affected by changes. I am trying to filter out buffers that are not overlapped by the change geometry.

As you can see, the green buffer is not overlapped by the change layer, but the orange buffer is.

I want the result to be a layer like this:

I will be working with possibly hundreds of buffers, so I cannot manually expect each one for overlaps.


texts: Saving WMS layers in ArcGIS Pro so that they are accessible offline

texts:
How do I save WMS data, specifically WMS layers, so that they may be accessible online?
I am using these two databases:

one with layers containing map information:

( https://ags.cga.harvard.edu/arcgis/services/darmc/roman/MapServer/WMSServer? )

one with layers containing topography:

https://image.discomap.eea.europa.eu/arcgis/services/Elevation/EUElev_DEM_V11/MapServer/WmsServer?
Initially, I tried to access these datasets by downloading them - but ArcGIS Pro wouldn't allow me to show these, so I wasn't sure what was going on. I'm a first-time student researcher here and I've never used anything GIS related before.


texts: Using drones in high mountain environments (Andes)

texts:
In my research, I am interested on deriving a [very] detailed vegetation and elevation maps, for this purpose I considered the use of drones (UAV). I do not mean to develop a drone but to acquire a commercial one. My study area is located on the Andes (about 4200 m.a.s.l) and a few years ago we had lifting problems with a prototype (when drones were not that popular), since the air seemed to be thinner than the drone's requirement.

Based on previous expertise or researches could you recommend a drone series/model/brand capable to achieve this task on this environment?

My main field of expertise is not UAVs.


texts: Does SHAPE_Length take into account elevation values?

texts:
Does the Shape_Length attribute take into account the elevation?  For instance, if I have 3 points: A, B, and C

A.X = 10
A.Y = 10
A.Z = 10
B.X = 10
B.Y = 10
B.Z = 50
C.X = 0
C.Y = 0
C.Z = 10

Then I create two lines: L1, and L2.

L1.fromPoint = A
L1.toPoint = C
L2.fromPoint = B
L2.toPoint = C

What I am observing in the results is that the SHAPE_Length attribute is the same for both L1 and L2.  I have verified that all the points and all the polylines are ZAware.

So, am I wrong to assume the SHAPE_Length attribute takes into account the Z of the shapes?

I have no problem storing the Z Values or manipulating them.  I am using IPolyline.

From what I’ve been hearing, SHAPE_Length is 2D only and isn’t editable.


texts: Openlayers 4 custom pop-up for a GeoJSON layer


texts: Wrong minimum in layer properties when displaying raster with classified symbology in ArcMap

texts: I display a raster in ArcMap with classified symbology. ArcMap calculates a minimum of 274,9 for this raster. However, this raster has at least one pixel with value less than 274,9 as the information panel of Identify shows. How can I enforce ArcMap to use the entire value range?


texts: County list of Woodard's American Nations

texts:
I've been looking for county list of Woodard's map of American Nations, however, I only found maps of it and certainly as a beginner in the field, I am unable to transform this map into tabular list of counties in each "nations". I've checked his website but latest comment from visitors in his post about American Nations was 3 years ago.
I'm wondering if anyone have the list of counties for Woodard's American Nations or if there's any cultural map similar to Woodard's that's as defensible as Woodard's


texts: Mapbox - Icon rotations in FeatureCollection

texts:
I'm displaying various ships on a map and I have made real sized polygons to represent them. These are not visible at lower zooms, so I wanted to also add icons representing each ship. The icon is a small arrow that indicates each ship's heading.

var ships = {...};

var shipIcons = {
    "id": "shipIcons",
    "type": "symbol",
    "source": {
        "type": "geojson",
        "data": {
            "type": "FeatureCollection",
            "features": []
        }
    },
    "layout": {
        "icon-image": "arrow",
        "icon-rotate": 0,
        "icon-rotation-alignment": "map",
        "icon-allow-overlap": true
    }
};

for(var key in ships){
    shipIcons.source.data.features.push(
        {
            "type": "Point",
            "geometry": {
                "type": "Point",
                "coordinates": [ships[key].long, ships[key].lat]
            }
        }
    );
}

map.addLayer(shipIcons);

Is it possible for me to create a unique rotation for each icon? I'd rather not create a layer for each as there may be many ships.


texts: QGIS 2.6 python PlugIn Error : NameError: global name 'QMessageBox' is not defined . any idea ? this use to work in QGIS 2.4

texts:
I am wondering why is this code not working ?

 def run(self):
        QMessageBox.information(self.iface.mainWindow(),"Ok", "You pressed F7")

NameError: global name 'QMessageBox' is not defined

I trying to make a Plugin in QGIS 2.6 using python. How can in show a message box in new QGIS 2.6 ?


texts: Get Google Maps driving directions between points in a KML file?

texts:
I'm trying to improve a workflow that currently involves manually composing a multi-destination driving route in Google Maps. I have the ability to export a KML file containing the points we want via RGDAL. I'm hoping to end up with a navigation route starting at one point in the KML and routing through all other points before returning to the starting point.

Is there a way to generate this route in Google Maps or Google Earth? The workflow currently ends with sharing a Google Maps link with coworkers who can then open the link on their phones and view the navigation directions the Maps app. Is there a straightforward way to generate a route like this, starting with a KML file?


texts: Bilinear interpolation of point data on a raster in Python?

texts:
I have a raster that I'd like to do some point interpolations with. Here is where I'm at:

from osgeo import gdal
from numpy import array

# Read raster
source = gdal.Open('my_raster.tif')
nx, ny = source.RasterXSize, source.RasterYSize
gt = source.GetGeoTransform()
band_array = source.GetRasterBand(1).ReadAsArray()
# Close raster
source = None

# Compute mid-point grid spacings
ax = array([gt[0] + ix*gt[1] + gt[1]/2.0 for ix in range(nx)])
ay = array([gt[3] + iy*gt[5] + gt[5]/2.0 for iy in range(ny)])

Up to now, I've tried SciPy's interp2d function:

from scipy import interpolate
bilinterp = interpolate.interp2d(ax, ay, band_array, kind='linear')

however I get a memory error on my 32-bit Windows system with a 317×301 raster:

Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Python25\Lib\site-packages\scipy\interpolate\interpolate.py", line 125, in __init__
    self.tck = fitpack.bisplrep(self.x, self.y, self.z, kx=kx, ky=ky, s=0.)
  File "C:\Python25\Lib\site-packages\scipy\interpolate\fitpack.py", line 873, in bisplrep
tx,ty,nxest,nyest,wrk,lwrk1,lwrk2)
MemoryError

I'll admit, I have limited confidence in this SciPy function, as the bounds_error or fill_value parameters don't work as documented. I don't see why I should have a memory error, since my raster is 317×301, and the bilinear algorithm should not be difficult.

Has anyone come across a good bilinear interpolation algorithm, preferably in Python, possibly tailored with NumPy? Any hints or advice?

(Note: the nearest neighbor interpolation algorithm is easy cake:

from numpy import argmin, NAN

def nearest_neighbor(px, py, no_data=NAN):
    '''Nearest Neighbor point at (px, py) on band_array
    example: nearest_neighbor(2790501.920, 6338905.159)'''
    ix = int(round((px - (gt[0] + gt[1]/2.0))/gt[1]))
    iy = int(round((py - (gt[3] + gt[5]/2.0))/gt[5]))
    if (ix < 0) or (iy < 0) or (ix > nx - 1) or (iy > ny - 1):
        return no_data
    else:
        return band_array[iy, ix]

... but I much prefer bilinear interpolation methods)


texts: Use array[] datatype in QGIS from PostgreSQL

texts:
I'm just a beginner in GIS, so I'll be glad to see any comment here.

I have tables in PostgreSQL which I've connected to QGIS. There are columns in tables with datatype array[]. But it's not easy for users to insert data into column using such view as {a,d,c}. Is there an easy way to edit the data?

I have just some idea to put data in QGIS like 'a,b,c' and make a trigger on INSERT/UPDATE BEFORE which will put data into Postgres table in right look. But it also seems not the best way.


texts: leaflet-> enable/disable statement "easybutton"

texts:
I am using EasyButton plugin of leaflet (link). More specifically I applied EasyBar which unites several buttons.
Plus, at certain zoom levels, I add/remove various layers with zoomend function (link).
Is it possible to apply a function in which I can refer to BOTH button and zoom level?
I don't know the formal code way but the idea something like the following:

  map.on('zoomend', onZoomend);
    function onZoomend(){
        if(map.getZoom()<8) else if btn2.enable(){}};

**and here is my code:

map.on('zoomend', onZoomend);
function onZoomend(){

    if(map.getZoom()<8)(){
    map.addControl(info0);
    map.removeControl(info1);
    map.removeControl(info2);
    map.removeControl(info3);
}

    if(map.getZoom()==8){
    map.addControl(info1);
    map.removeControl(info2);
    map.removeControl(info3);
    }           };


texts: Is there a SWAT model integration for QGIS?

texts:
I am trying to use SWAT (Soil and Water Assessment Tool) for watershed management activities.
It is a set of commandline tools and needs a complex set of input data some of which can be generated from DEMs.

There is a plugin available for ArcGIS and MapWindow which makes life easier. I want to know if there is any project/work going on to integrate SWAT with QGIS.

Or, is there any other soil and watershed modelling tool available for QGIS which can generate/estimate runoffs, sediment load, erosion vulnerability etc. from relevant input data like rainfall, slopes, stream network, soil type, land use etc.


texts:
I have two Imagine files that I need to mosaic. When I added these two in Erdas Imagine, there is a black gap between them, for example, they are not properly aligned. I know very little bit about georeferencing, projection, or coordinate system, but I don't understand them very well.

Can you please explain me to understand how to align those two Imagery ?

I tried to use the "MosaicPro" tool in Erdas Imagine and this can mosaic two imagine files to create seamless single into one Imagery file and how to "stitch" with the the right portion and the left portion?


texts:
I'm working with some CityGML models within 3DCityDB.
For visualization purposes I now want to export some of my buildings to KML with the exporter tool.
When I draw the bounding box over my area of interest I get some coordinates, but after exporting it says

  number of processed geometries: 0

When I try to export only one building using its gml_id I get a kml file, but when I open it in Google Earth Pro I end up somewhere in the middle of the Arctic Ocean without seeing my building. I assume there's a problem with the SRID.
Anyone else encountered this problem or has a solution for it?


texts: Is there a script to batch erase the equivalent of a shp to multiple other shps? (in ArcGIS)

texts:
I'm looking for a way to be able to frequently update a bunch of shapefiles (different land use and other areas). I would like to erase from them the lakes and rivers which are in another shape (hydro.shp).

I could just do them on by one but it doesn't sound really time effective considering that the hydro.shp is often modified. To add to the problem, I have a basic license, so I can't use the erase tool...

So, how to batch erase without the erase tool?


texts: Removing overlapping polygons using QGIS

texts:
I have many polygons in a single shapefile and they are overlapping (first figure).
Is there a tool in QGIS to only keep one overlapping area as the one shows in the second figure?
There is a "update" function in ArcGIS but the polygons must be in separate shapefiles.


texts: Styling individual features in a GeoJSON layer

texts:
I have managed to display a GeoJSON layer with multiple polygons (~150) in a Leaflet map in SharePoint.

I would like to style different features in this GeoJSON layer according to  a colour stored within a column in this GeoJSON layer, called "color".
So far the output is only diplaying by default: "blue"

// Polygons coloured
      $.getJSON("../XX/XX/XX/polygons.geojson",function(data){
        polygons = L.geoJSON(data, {
                style:function(feature) {
                switch (feature.properties.color)
                },
        onEachFeature: function(feature, layer) {
               layer.bindPopup(feature.properties.name);
    }
        });

 layercontrol.addOverlay(polygons, 'POLYGONS');

 document.getElementById('mapid').style.opacity = 1;

 });

I could style the features indivdually like I started in the following script but I dont think it is the most adequate solution since I have more than 100 polygons.

/ polygons
      $.getJSON("../SiteAssets/webparts/Data/WOAs_WGS84.geojson",function    (data){
         woas2 = L.geoJSON(data, {
                        style: function(feature) {
                switch (feature.properties.name) {
                case 'polygon 1: return {color: #00FF7F", opacity:0.7};
                case 'polygon 2:   return {color: "#c917dc", opacity:0.7};
                case 'polygon 3:   return {color: "#FF0000", opacity:0.7};
                case 'polygon 4':   return {color: "#a9fb3a", opacity:0.7};
                case 'polygon 5:   return {color: "#4169E1", opacity:0.7};

and so on

...
                case 'polygon 150 ':   return {color: " #C0C0C0", opacity:0.7};
         },
               onEachFeature: function(feature, layer) {
               layer.bindPopup(feature.properties.name);
         }
         });

            layercontrol.addOverlay(polygons, 'POLYGONS');

               });


texts: How are OSM road segments (LineStrings) split?

texts:
Is there a a protocol followed to break long roads into segments (LineString)? Is it different for different countries. Or is it all random? I couldn't find anything relevant in OSM Wiki.

I've imported OpenStreetMap road data through imposm.org. I understand the distinction between OSM features for example highways and how they map to imposm schema motorways, mainroads and minorroads.

I am specifically curious about the splitting of roads into smaller LineSegments


texts: Adding weather radar data to leaflet from website

texts:
I am looking to add a specific layer from this website (https://www.iweathernet.com/total-rainfall-map-24-hours-to-72-hours) to a leaflet map in R. I have tried the code below, but the data does not seem to add to the map.
library(leaflet)
url='https://www.iweathernet.com/total-rainfall-map-24-hours-to-72-hours'
leaflet() %>%
  addTiles() %>%
  setView(lat=42,lng = -78,zoom=6) %>%
  addWMSTiles(url,layers=0)

Note that I have changed the number to a few different options in:
layers = 0

The website in question has 10 different base maps as options in a dropdown, in addition to 6 different times for retrospective weather data as a dropdown option.


texts: Using thermal image to identify hot spots automatically and converting to point?

texts:
I am working in QGIS 2.18 with thermal image raster data, and I would like to isolate from the total pixels in the image those that form a group of values higher than the average of their closest environment.

The basic idea is to identify those groups of pixels with high values, hotspots, to convert them to points.

In short, use a thermal image to identify hot spots automatically.

Any suggestions?

I did as @Kazuhito did but the result is not very encouraging. The idea is to find a process to identify hot spots in a mosaic of thermal images taken with an RPA.

Problem that I have in many cases, that the mosaic is burned on one side, very high values, or that very high values of temperatures are grouped, which can be rocks, bare ground, etc ...

If I run the local algorithm minimun and maximun of SAGA I get many records.

Would there be some way to preprocess the image to obtain better results?


texts:
Using PyQGIS, i'd like to print the string representation of a point WKB
(like what PostGIS displays in geometry columns).
For example:

p = QgsGeometry.fromPoint(QgsPoint(2, 4))
wkb = p.asWkb()
print toBinString(wkb) # "000000000140000000000000004010000000000000"
print toHexString(wkb) # Would print what PostGIS does

Would you know how i could achieve this?

(Example data is taken from Wikipedia WKT article)


texts: How to keep unmatched records (i.e. delete matched records) in table using ArcMap

texts: I need to drop all the records from a table with matching field values in a reference table (i.e. lookup table). Do I join the tables first and keep unmatched records? Or is there any other way to do it?


texts: Flow direction generated for river is incorrect

texts:
I am trying to generate a hydrologic model and I can not really proceed on the next processes. I have this problem on generating flow direction. I have already executed fill sinks and the next is flow direction of the grid. However, the generated flow direction grid is not the actual flow of the river. it should be flowing from the highest elevation to the lowest, right? The river should flow out towards the sea, but the direction of the flow is the opposite.

So I was thinking what could be instances that could affect why did this happen. I figure out people from this community could be of help to me.

I am using ArcMap 10.1.

Here are my screenshots:

fill sinks

flow direction

flow direction values

flow accumulation (flow break)

The yellow arrow tells the direction of the actual flow of the river. The red dashed arrow tells the direction of the generated flow direction.


texts: Application of preset properties QGIS layer to another imported shp

texts:
In QGIS I import the same shp files during days (continuously fieldwork).
For processing in QGIS I set the properties of layer (imported shp)- Style, Labels, Actions, Display.
In these days I have to set the properties of every imported shp separately and manually.

Is it possible apply this all settings (properties of layer) to another imported shp? ...Is it possible to export complete settings of displaying layer and import the same to another layer?


texts:
I'm trying to do something very simple, to create points and lines in a new vector layer. With the 'Add Feature' button I can create polygons, but I can't find any tool to create points and/or lines. Is there a way to do so?

I've tried all of this tools and can't seem to find it:


texts: Digital Number (DN) on satellite imagery?

texts:
How would I know if any of the satellite imagery (Landsat, ASTER, Quickbird and so on) have DN or Digital Numbers such as integer or uninteger on its pixel. I download from the USGS EarthExplorer and have seen some in 0 -255 or into floating numbers. My question do they at USGS re-calibrated or left untouched them before they put in into their website for the user to download.

Does this means that each different imagery has its own different digital numbers from the sensor ?

I have ArcGIS 10.1, ENVI 5.0 and ERDAS 2013


texts: Linear reference from the end of a linestring

texts: Given a linestring geometry, how can I find the point and bearing which is a given distance from the end? e.g. I have a line representing a road and need to identify the point exactly 100 feet from the end, and the direction of travel at that point.


texts: Referencing layer object which was created as result of geoprocessing inside MXD without iterating through TOC?

texts:
I am creating a python tool which must be run in and open MXD in ArcMap (10.2, ArcFM). The MXDs we use have a LOT of layers, and often multiple layers from the same datasource. In the script I need to intersect two layers, and use the resulting layer in a selection by location (so it must be added as a layer when created). After the tool has completed the analysis I would like to remove the extra layers from the editor's TOC so they can continue working unimpeded, but not delete the feature class.
Example of geoprocessing function, where Main and Buff are layers selected from the MXD as tool inputs. I would like to remove "IntersectingGasMain" from the TOC at the end of the tool:
MainBuff_Int = arcpy.Intersect_analysis([Main, Buff], "temp_intersect")

So far what I have found is that this can be accomplished by iterating through the layers in the active dataframe, comparing the layer datasource property to the result object output:
myOut = MainBuff_Int.getOutput(0) # this equals C:\Workspace\test.gdb\"temp_intersect"
mxd = arcpy.mapping.MapDocument("CURRENT")
df = mxd.acriveDataFrame
for layer in arcpy.mapping.ListLayers(mxd, "", df):
    if layer.dataSource == myOut:
        arcpy.mapping.RemoveLayer(df, layer)

While I do realize that adding a wildcard in the list layers line would reduce what I have to cycle through, I'm really looking for how to do this using the result object or referencing the featureclass/layer specifically without having to search through the TOC at all... is this possible?
Additionally I can only use funcionality available at the basic license level as the editors cannot access advanced licenses


texts: Updating Lat/Longs and actual position of point shapefile using arcpy.UpdateCursor()?

texts:
I have a point shapefile with over 3000 points that are updated frequently, when they are updated they need to have their lat/longs changed which is entered into the attribute table.

When the lat/longs are updated in the attribute table I notice that the feature does not actually change its position in correlation to the new lat/long entered in the attribute table.

Is there a way to make this happen in ArcView with out having to re-export the attribute table out as a dbf, add it to the map then display xy data?


texts: GEE: Is ee.Reducer.mean() can ignore NULL values?

texts:
I'm trying to create a time-series of NDVI for 6 sub-regions.
I've downloaded the relevant Sentinel-2 images, and filtered the region containing these 6 sub-regions, filtered the time-period and performed cloud mask.
Now, I'm using ui.Chart.image.series - to calculate the mean NDVI value for day for each of the 6 sub-regions, so I used ee.Reducer.mean() all over the pixels of the sub-region. Since I masked out cloud pixels in each image, I don't want to OMIT the dates where the cloud-masked bands returned NULL, but to perform the mean with only the NON-NULL pixels. Is it possible?


texts: How to average data from Sentinel-5p collection ignoring zero?

texts:
I am working with CH4 product Sentinel-5p provided by ESA Copernicus.
Remote User Support provided a script to extract averaged CH4 anomalies for a certain period for the Earth Engine.
However, I suspect, that the results provide averaged values that include a 'zero value', because they use collection.mean().
Usually, I use conditional operator '@ ? @ : @' in ESA SNAP environment. Thus, I tried to implement this function to the RUS script but it didn't work.
Please, give me a suggestion, how to average the data ignoring zero from the image collection in the Earth Engine environment
var collection = ee.ImageCollection('COPERNICUS/S5P/OFFL/L3_CH4')
  .select('CH4_column_volume_mixing_ratio_dry_air')
  .filterDate('2020-04-06', '2020-04-10');

Here I put expression('condition ? true_action : false_action) instead of the collection.mean()
var s5p_L3_CH4_APR = collection.expression(('CH4_column_volume_mixing_ratio_dry_air' != 0) ? 1 : 0).clip(geometry)
var band_viz = {
  min: 1750,
  max: 1900,
  palette: ['black', 'blue', 'purple', 'cyan', 'green', 'yellow', 'red']
};

Map.addLayer(s5p_L3_CH4_APR, band_viz, 'S5P CH4');
Map.setCenter(24.436, 49.481, 2);

Export.image.toDrive({
  image: s5p_L3_CH4_APR,
  description: 's5p_L3_CH4_2020APR',
  scale: 7500,
  region: geometry
})


texts: How to convert TIF to ECW with FME maintaining a certain value?

texts:
I want to convert TIF to ECW with FME. Some tif-pixels have values of 255/255/255:

After conversion these pixels have values of 254/254/254 or 253/254/252 or similar.

How can I achieve that 255/255/255 is not changed?

I need 255/255/255 in result because I want to set the border of the image (255/255/255) to transparent in AutoCAD Map.

To convert TIF to ECW I use these FME tools:
Reader > RasterPaletteResolver > Writer


texts: Referencing sources in modify interaction instead of collection in OL3

texts: in OL3 Modify and Snapping interactions requires a collection of feature, this collection can be made by appending features from different sources, but when sources  got updated or added, it becomes much difficult to keep the collection synchronized with the sources, as a result we could have false snapping or snapping on past locations of features, it is possible in some way to reference sources in modify interaction instead of collection, is there any idea to deal with this problem.


texts: excel column does not appear when doing join after doing modification to the column

texts:
Using ArcGIS 10.1  I am trying to add " /1 " my column provided Shp File

how it appears in the county supplied excel spreadsheet under "parcel #"

43002/1
18524/1
1666/1
4270/1

Currently, the county provided shapefile only displays

43002
18524
1666
4270

How do I ADD the /1 to the already current number within my shapefile to make it look like 43002/1 etc?

There are over 13,000 tracts so doing it by hand it out of the question.  When I go into excel and delete / REPLACE, when I do the join, that parcel column does not show up, where before it did before I did the delete of the /1.  I went into format, number and used zero decimal placement. Still nothing.

Can someone tell me how to add " /1 " to the parcel numbers?
Is there something I can do with excel so when I do the join, the parcel num column shows up and not disappear?


texts: Layer added did not move in ArcGIS Desktop?

texts:
I have done the step from my previous question at How to use the coordinate system in arcgis 10? and it looks great when the layer did match all together.

It almost the same problem. The problem is, why the layer that I add into table of contents did not move into any single place that I edit in the properties?

It only stick into one place only. I have try many ways to change the location of the layer added.

The red point is my layer added after I add the Bing Maps from Arcgis 10. Then I click the right click button < properties < Coordinate system.

I'm still learning the basics.


texts: Multimodal route analysis not yielding correct results

texts:
I asked this question a while ago about a route in a multimodal network dataset not using all forms of transport available. While the answer worked at the time, I am now in a similar situation again.

My multimodal network dataset has three feature classes containing a single bus route, bus stops and streets. The bus route and streets have fields containing one way status and the amount of seconds it takes to traverse them. My data is basically the same as the tutorial data for ESRI's tutorial on multimodal datasets, except I have bus lines instead of metro lines.

I think my problem is with setting up the connectivity groups correctly. The bus route was created by tracing along the streets and splitting it at bus stops. The bus stops are snapped to the end points of each segment of the bus route, i.e. Stop 1 is snapped to the from_point of Segment 1 etc. The streets are not split at intersections.

In theory, a pedestrian should be able to walk from a side road into a main road to a bus stop, board a bus, travel along the route, exit the bus and continue walking around the streets. My connectivity settings are as follows:

I have been using ESRI's tutorial as the basis for my dataset, but according to this:

  For example, two edges created from two distinct source feature classes can connect if they are in the same connectivity group. If they are in separate connectivity groups, the edges won't connect unless they are joined by a junction that participates in both connectivity groups.

This seems to imply that I only need one connectivity group. I have tried solving for a route using both setups, but I have gotten an error each time. The analysis settings:


texts:
I tried a code to get attribute values from internet.
Line by line from console the code worked well.
As soon I was running it as Python file, QGIS crashed without comments.
Trying commenting lines out - the reason was in line that begins with

req=...

Is it usual, that code works well in console, but not as code from redactor?

import urllib.request

url1 = 'https://geoportaal.maaamet.ee/url/xgis-xy.php?'
for f in er_f.getFeatures():
    pt=f.geometry().centroid().asPoint()
    y=pt.x()
    x=pt.y()
    url2='x='+str(x)+'&y='+str(y)+'&d=1'
    url=url1+url2
    print(url)
    req = urllib.request.Request(url)
    response = urllib.request.urlopen(req)
    tunnus = response.read()
    print(tunnus)


texts: Populating new field based on existing string field using ArcGIS Field Calculator?

texts:
My programming is really rusty at this point, and I am trying to do a simple calculation using a Codeblock, either VB or Python is fine. I have tried about 50 different variations on same theme, and get a runtime error every time.

Here's a screenshot of my Field Calculator. Basically, Field !Items! contains a string of all items separated by a comma, and I am trying to create new fields that contain a "y" if that item is present in !Items!, in this case it's "Baby Items". It is always capitalized like so, no need to worry about case mismatch.

def calc (items)
  if items.find("Baby Items") != -1:
    return "y"

calc (!Items!)


texts:
I downloaded ERDAS-ECW_JPEG_2000_SDK-5.1.1 and tried to use it with GDAL to create ECW files from georeferenced PNG files, but they are not created, it basically complains about:

  ERROR 1: None of ECW_ENCODE_KEY and ECW_ENCODE_COMPANY were provided.

I thought it was free to do so with files smaller than 500 MB (mine is 50 MB). Here the full output:

+ gdalwarp -of ECW -t_srs EPSG:4326 -srcnodata 128 -dstalpha s05w85_200_200_F1_R3_z.png s05w85_200_200_F1_R3_z.ecw
Creating output file that is 14185P x 14185L.
Processing input file s05w85_200_200_F1_R3_z.png.
Using band 4 of source image as alpha.
Copying nodata values from source s05w85_200_200_F1_R3_z.png to destination s05w85_200_200_F1_R3_z.ecw.
ERROR 6: s05w85_200_200_F1_R3_z.ecw, band 1: SetNoDataValue() not supported for this dataset.
ERROR 6: s05w85_200_200_F1_R3_z.ecw, band 2: SetNoDataValue() not supported for this dataset.
ERROR 6: s05w85_200_200_F1_R3_z.ecw, band 3: SetNoDataValue() not supported for this dataset.
0ERROR 1: None of ECW_ENCODE_KEY and ECW_ENCODE_COMPANY were provided.
Both are required.
ERROR 1: None of ECW_ENCODE_KEY and ECW_ENCODE_COMPANY were provided.
Both are required.
ERROR 1: None of ECW_ENCODE_KEY and ECW_ENCODE_COMPANY were provided.
Both are required.
ERROR 1: None of ECW_ENCODE_KEY and ECW_ENCODE_COMPANY were provided.
Both are required.
.ERROR 1: s05w85_200_200_F1_R3_z.ecw, band 5: An error occured while writing a dirty block
ERROR 1: s05w85_200_200_F1_R3_z.ecw, band 1: An error occured while writing a dirty block
ERROR 1: s05w85_200_200_F1_R3_z.ecw, band 2: An error occured while writing a dirty block
ERROR 1: s05w85_200_200_F1_R3_z.ecw, band 3: An error occured while writing a dirty block

The only solution to get those keys is to buy that ERDAS software? again, I had the impression that it could be possible.

Any support is very welcomed,

EDIT 1:

I want to say that I tried ERDAS SDK 3.3 with GDAL installed from both apt-get and source ways, and none of them have worked so far, it throws an error after running this:

gdal_translate -of ECW s05w85.png test.ecw

Input file size is 14185, 14185
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_S_create
Aborted

Moreover, this occurs when I use gdal_translate, but using gdalwarp keeps saying Output driver ECW not recognised or does not support, even though this command line says:

gdalwarp --formats | grep -i ecw
ECW -raster- (rw): ERDAS Compressed Wavelets (SDK 3.x)
JP2ECW -raster,vector- (rw+v): ERDAS JPEG2000 (SDK 3.x)

So, I'm confused, is it really possible to create ECW files for free with ERDAS SDK 3.3??


texts: Mathematical functions Derivatives & Complex numbers in ArcMap raster calculator?

texts:
Is it possible to calculate derivatives and complex numbers on rasters inside the raster calculator in Arcmap ?

If not, is there any workaround ?


texts: Measuring distance between features in linear units from vast layer in geographic coordinates in gdal

texts: I have a point layer for a large area. The layer is in a geographic coordinate system. I need to make some distance-aware work with features from this layer. Actually, I need to build a buffer-layer with 100 meters, but it doesn't matter. The first idea is to project the layer, make a buffer and transform back to the geographic coordinate system. However the area of the layer is pretty big and, as I understand, I cannot use the only projected coordinate system without significant distortions. So, I need to use several projected coordinate systems or use haversine to build a buffer. Both approaches do not look neat and convenient. Is there a more natural way to build a buffer (or measure distance)? I would like to use gdal/ogr.


texts: No Grass plugin in plugin manager in Qgis 2.14 on windows 7

texts:
I would like to use the v.net.path algorithm from grass7 with processing into qgis 2.14. It's on my new laptop with windows 7 where I installed qgis 2.14.2 desktop with grass 7.0.3. But I don't find Grass plugin in plugin manager.

Where is the error ?


texts: Creating WMS, which can be previewed via ArcGIS JavaScript Viewer, based on buffer model tool?

texts:
I am really new to arcgis, so i think you will find this to be an easy question.

Arcgis docs are abundant, but however, after too much browsing, i cannot find a concrete answer.

these are the elements:

"depts": a feature class stored in oracle (polygon type).
using modelbuilder, i've created a simple model: it only plugs "depts" into a buffer, producing an output feature class called "depts_buff"
now, i publish the corresponding service. under "capabilities" it only allows me to publish as wps.

What i want to do is to create a wms service, which can be previewed via arcgis javascript viewer, based on the buffer operation i just made.

As far as i understand, what i should do is to create a map (a .mxd file) and take the "depts_buff" feature class as a layer and share that map as a service.

Is that assumption correct or is there a way to make maps directly from published services?


texts: Plotting point every x m2 in polygon using QGIS plugin

texts:
I'm trying to work out whether its possible to plot a point every so often within a polygon.

For example, if I have a polygon thats 200x200m, perhaps I could plot a point at every meter squared within that polygon.

Are there any plugins that currently do this?


texts: Is gdal_polygonizer creating a wrong geojson?

texts:
I have this PNG and I use gdal_polygonize 0VxOhek.png -f "geojson" 0VxOhek.geojson
This is the output.
There is a "features"-array which contains many objects with "type", "properties" and "geometry" elements. "geometry" contains "type" and "coordinates". "coordinates" is a 3 dimensional array. Usually its outermost array contains one array which contains arrays with coordinates in them. So each element of the "features"-array looks like this:
{ "type": "Feature", "properties": { "DN": 2 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ X1, Y1 ], [ X2, Y2 ], [ X3, Y3 ], [ X4, Y4] ] ] } }

But as you can see in the output file there are some "coordinates" with more than one array in the outermost array of "coordinates" (Begin of counting at 0: 48th (line 53), 50th (line 55), 54th, 64th). These "coordinates" look like this: "coordinates": [ [ [ X1, Y1 ], [ X2, Y2 ], [ X3, Y3 ] ], [ [ X4, Y4 ], [X5, Y5], [X6, Y6] ] ]
What happened? Is there a way to prevent that? Can I just combine these 2 into one array?


texts: How to design model in Django using GeoDjango?

texts:
I am using Postgresql 9.0 and PostGIS 2.0. I am using Django 1.3 and GeoDjango. I have a model with id, latitude, longitude and placename. All the places are in the USA.

My requirement is following:

User will give his address. We use his address to get latitude and longitude, and then find places within 'x' miles.

So, should I use PointField in the model? Also, how do I convert users latitude\longitude into geometry object to use dwithin?


texts: Converting an SVG into to another map projection using QGIS

texts:
Basically, I have a map made in affinity designer that I would like to convert into a few different projections while still retaining the vector information.  I’d then export it back to affinity designer.
I’m still very much a beginner – the only thing I have used QGIS for before is to georeference a raster in order to change its projection. So far, I cannot even work out how to bring my SVG into QGIS.


texts: Use Nginx with Tomcat to put GeoServer under HTTPS

texts:
I'm trying to use HTTPS with GeoServer. I've used this steps to install Tomcat, Nginx and GeoServer on Ubuntu 20.04. At the end I've used the wizard from certbot for enable HTTPS.
I can access without problems to my webserver and to GeoServer using https://gis.domain.it.
The problems comes when I try to create something. For example if I try to create a Workspace or a Store I see this error:

HTTP Status 400 – Bad Request Type Status Report
Message Origin does not correspond to request
Description The server cannot or will not process the request due to
something that is perceived to be a client error (e.g., malformed
request syntax, invalid request message framing, or deceptive request
routing).
Apache Tomcat/9.0.37

I think that the problem is into the configuration of Nginx but I'm not sure of this. I found this solution for a problem like mine but it doesn't seem to work.
Any solutions?
I must use the OGC service under HTTPS but I've not strong skills on this field and I'm learning how to do.
FOCUS ON NGINX INSTALLATION
I've used the steps belove to install and configure Nginx

3. Configure Nginx Proxy for Tomcat
3.1 Install Nginx
apt install nginx -y

3.2 Create a new virtual host configuration file for Tomcat
nano /etc/nginx/sites-available/tomcat.conf
 Add the following lines:

server {
  listen 80;

  server_name    example.com www.example.com;
  access_log /var/log/nginx/tomcat-access.log;
  error_log /var/log/nginx/tomcat-error.log;

  location / {
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Server $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8080/;
  }
}

Then enable virtual host file and restart Nginx
ln -s /etc/nginx/sites-available/tomcat.conf /etc/nginx/sites-enabled/
systemctl restart nginx


texts: Different obs. when I extract raster values from polygons in R

texts:
I have two raster layers with the same projection, extent and resolution:

r1:

class       : RasterLayer
dimensions  : 33434, 89431, 2990036054  (nrow, ncol, ncell)
resolution  : 0.001447053, 0.001447053  (x, y)
extent      : -56.50514, 72.90626, 24.28364, 72.66441  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs
data source :
names       : r1
values      : 11, 52  (min, max)
attributes  : ID    COUNT
        from: 11  9463473
        to  : 52 84036891

r2:

class       : RasterLayer
dimensions  : 33434, 89431, 2990036054  (nrow, ncol, ncell)
resolution  : 0.001447053, 0.001447053  (x, y)
extent      : -56.50514, 72.90626, 24.28364, 72.66441  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs
data source : C:\Users\arandaba\Desktop\test_gisR\webos.tif
names       : r2
values      : 11, 99  (min, max)

Then I have a SpatialPolygonsDataFrame with same projection as above but different extent:

p:

class       : SpatialPolygonsDataFrame
features    : 829
extent      : -10.01233, 30.84247, 36.94062, 65.95678  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +no_defs
variables   : 8
names       : SITE_CODE, ISO3, IUCNCAT, Year,  ss90,  sl90,  ss06,  sl06
min values  :      1685,  AUT,       I, 1990,     0,     0,     0,     0
max values  : 555552467,  SVN,      II, 2012, 65750, 82966, 68374, 89058

When I extract raster values from those 829 polygons, I obtain a different number of observations for each raster layer. That is:

ext1 <- extract(r1,p,df=TRUE) # Results in 2040332 obs.
ext2 <- extract(r2,p,df=TRUE) # Results in 2040335 obs.

Since I want to examine changes in raster values from r1 to r2 within polygons, how could I solve this problem? Should I brick both raster layers and then run extract()? I need to do this efficiently, as I'm using large data files.


texts:
What does an asterisk (*) mean when shown beside a field name in the attribute table?
I would think those are reserved field names but they are not.


texts: how to create a map with oneway flows using FlowMapper for QGIS

texts:
my plan is to create a map that shows the top 50 (by amount of passengers) international flights departing the United States (e.g. New York -> London, Honolulu -> Tokyo...). I want to use the plugin FlowMapper for QGIS to display those flights and have the width of the flows correspond with the amount of passengers. I have read the tutorial and had a look at the examples given (all in the download file of FlowMapper). The problem is, in those examples FlowMapper is only used for back and forth flows.

Thus, the data matrix in the examples looks like this, each row and column have the same:

But I want to use one way flows, so row and column have different geographical locations, like this:

So my question is, how does the flow matrix- and coordinates-file have to look like in order to be correctly displayed by the FlowMapper plugin?

This is my complete speadsheet that I wanna use as basis for my map:
http://www.sendspace.com/file/ckaejd


texts: Merging more than two shapefiles in QGIS

texts:
I want to merge 9 shapefiles (all polygons) into one file.
The problem is, when I try to merge more than two files at once, I seem to loose attributes on the way? Is there any other way of merging shapefiles than using the 'Merge shapefiles to one'-tool? In this case it's only nine files, so it's possible to merge whem 2 and 2, but I want to do the same thing with other files as well, and then merge about 20 files to one.

I'm using QGIS 2.0.1.

Thanks!

EDIT: I have data of 4 different kinds of natural reserves (polygons). Each reserve has data seperated into three different shapefiles, where each shapefile is cooected to a powerline.
The three powerlines are parallell at first and then turn in different directions.

Each kind of natural reserve contains slightly different information, but they all contain the columns 'Powerline' (powerline identity) and 'Type' (type of natural reserve).

I want my output to contains all of the polygons and all attribute data. What happened was that information like 'Powerline' was lost when I tried to merge all files at once.


texts: Changing size of cluster based on number of markers in Leaflet clustermarker

texts:
I'm currently using Leaflet's markercluster add-on, which is working really nicely for some of my initial maps.

Is there a way to modify the clusters so that the size of the cluster (preferably radius) is proportional to the number of markers it represents?

I've seen a few SO questions about modifying the cluster color or the underlying marker icon, but haven't been able to find someone addressing this specific question.


texts: Offsetting raster layers in GeoServer SLD

texts:
Is it possible to scale or offset raster layers in GeoServer SLD, for example to convert Kelvin to Celsius on the fly?

Given a basic raster style:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">
  <NamedLayer>
    <Name>sample_raster</Name>
    <UserStyle>
      <Title>Sample Raster</Title>
      <FeatureTypeStyle>
        <Rule>
          <RasterSymbolizer>
            <ColorMap>
              <ColorMapEntry color="#000000" quantity="0"  label="values"/>
              <ColorMapEntry color="#FFFFFF" quantity="20"  label="values"/>
            </ColorMap>
          </RasterSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

presumably something like

<ogc:Add>
    <ogc:Function name="parameter">
        <ogc:Literal>data</ogc:Literal>
    </ogc:Function>
    <ogc:Literal>-273.15</ogc:Literal>
</ogc:Add>

needs to be incorporated somewhere, but I can't for the life of me figure out how to include this correctly.


texts: World map projection with United States in center

texts:
I am creating a map showing flight paths originating in the United States and traveling to Asia and Europe. I need a projection for the world that will focus the United States in the center of the map, with Asia showing up to the west and Europe to the east. Does anyone know where I might find a projection like this?

Edit: I am working in ArcInfo 10.


texts:
I have a python script with some parameters - see screen.

You see the last parameter is of type Double, default Value 0.

The code i have this:

Ausrichtung = float(arcpy.GetParameterAsText(9))
if Ausrichtung == '#' or not Ausrichtung:
    Ausrichtung = "0.0"
# maybe there is some useless ballast...it comes from an export from modelbuilder, and I am learning python now.

arcpy.AddMessage("Ausrichtung"+ Ausrichtung)
SteigungX = -math.sin(math.radians(Ausrichtung))

1) When I start the script - in the form i let for this parameter a 0, i always get:
Ausrichtung0.0
TypeError: a float is required
2) If I start the schript - with this parameter as a 5, it works.
3) When I replace last line with
    SteigungX = -math.sin(math.radians(float(Ausrichtung)))
   it works with all values, also with 0

I have several more parameters before this, and I can calculate with them.

Why is Zero so different?

Why do I have Ausrichtung in case 1) a 0, even when I use this float function?

AddMessage give a 0.0, so why still not recognized as float?


texts:
Similar questions have been asked but without I think non "script" solutions

Is there a easier to use for non technical users for QGIS plugin/program to bulk export files?
Say shp files to .kml files?

I believe a program: Expert GPS Pro that would do this, but this $299.95 at the time of writing.
(http://www.expertgps.com/)

Similar Questions

Bulk SHP/KML Processing Tools

Bulk uploading shapefiles to PostGIS?

Exporting several files at same time in QGIS?

How to batch "Layer save as"-process in QGIS?>

Convert SHP to MIF/MID>

How to bulk import gpx files to QGIS and merge into a single shapefile?

Related Questions

CartoDB QGIS plugin: export/import projection shift?

EDIT

Cannot get plugin to work based on answer

Get error: 'NoneType' object has no attribute 'CreateDataSource' See log for more details

Tried kml to shp and shp to kml
Autofill settings, used Do not autofill for each test.
Perhaps this plugin is better in newer QGIS versions

In QGIS 2.2:

Output layer doesn't remember where you saving the files too
You have to fill the output layer in multiple times. The path (location to
save files isn't remembered)
This bulk convert probably takes longer
to setup than manually saving each file for a small number

How could you replicate Save Vector Layer Export settings, such as DataSource Options, Layer Options, Custom Options ect... via Creation Options Settings, so that the conversion is the "same"?

If you export kml files, I think you sometimes need to remove the altitude component via: Datasource Options, AltitudeMode: ClampToGround, so is this or other "settings" still possible via Creation Options?

I ask as I would assume you would still need to manually export files, if the settings are not "transferable" to the Convert Format.


texts:
Is it possible to move a visualization to another table?  e.g. when merging two tables, it creates a 3rd.   OR to completely replace a table and maintain the viz??

I don't want to lose the original table's visualization nor recreate it (i've already done it once this morning when moving between accounts).  But I've added 5 columns to integrate into the viz.

Anything? or should i just recreate it?

thanks,
chrism


texts: OpenLayers vector tile rendering problem on .NET Core 2.2

texts:
I working on OpenLayers vector tile. I am using PostGIS ST_AsMvt function for render my geom data.

I sending query like this to PostgreSQL in my .NET Core server

SELECT ST_AsMVT(mvt, 'geom', 4096, 'geom')
     FROM (
             SELECT
                    I.gid,
                    I.fid,
             ST_AsMVTGeom(
                    I.geom,
                  st_makeenvelope(minX, minY,maxX , maxY),
                     4096,
                     256,
                     false
             ) as geom
             FROM public."GeomTable" I
             WHERE I.geom && st_makeenvelope(minX, minY,maxX , maxY)
             AND ST_Intersects(I.geom,st_makeenvelope(minX, minY,maxX , maxY))) mvt;

and just returning as response byte array data. But getting type error while OpenLayers parse this data to PBF.

Uncaught Error: Unimplemented type: 7 at Pbf.skip
Uncaught Error: Unimplemented type: 4 at Pbf.skip
Uncaught Error: Unimplemented type: 3 at Pbf.skip

My VectorTileLayer object;

var mvtVectorLayer = new VectorTileLayer({
        declutter: false,
        source: new VectorTileSource({
          format: new MVT(),
          url: "https://localhost:5001/{z}/{x}/{y}"

        }),
        style: new Style({
          stroke: new Stroke({
            color: "red",
            width: 1
          })
        })
      });

So I am so confused about solution . I have done a lot of research but I don't get any solution.

Example data from DB

  GvIMChNpbnRlcm5hbC1sYXllci1uYW1lEh0SAgAAGAMiFQmMC4oeOhQAADgqAAA2EwAAGykADxIVEgIAARgDIg0JjAv4HhoUAAAcEwAPEhUSAgACGAMiDQm2C5QfGhQAADQTAA8SKRICAAMYAyIhCfYQ9iFqPgAAHBQAABoWAAA4FAAAHBQAAFA9AAAbUQAPElsSAgAEGAMiUwmsNNAjqgIAGxMAADMTAAAbFAAAGykAADUpAABtEQAANSkAAFE8AAAcKgAANhYAABwUAAAaFAAAGkAAABwSAAA4FgAANhQAAIgBOwAAHBUAABsPEosBEgIABRgDIoIBCZg0tCPqAwAcFAAAHBMAABopAAAZKQAAGxEAAFIVAAAcEwAAHH0AABsTAAAbEwAAGxMAADUVAAA3EwAATxUAADUTAAA3FQAATxYAABsqAAAcFAAANBYAABk8AAAaFgAAGRQAADYqAABSFAAAHBYAABwqAAA0EgAAFxYAABgqAAAcDxJWEgIABhgDIk4JiAzkIpoCaAAAHBQAABgWAAAcKgAAHBIAABwqAAAaFgAAHBQAAGw9AAAZJwAAGRUAABspAAAbKQAAGycAABkVAAAbEwAAGxMAABsUAA8S5wESAgAHGAMi3gEJjAu0I9oGVAAAHBQAABwUAAAaFAAAHCoAABwUAAAcKgAAGhYAABoUAAAcKAAAHBYAABwqAAAaKAAAHBYAABwUAABQKAAAHCoAABwqAAAaKgAAHBYAABwUAAAcFAAAGioAABwoAAAaFgAAUhUAABwTAAAcPQAAGz0AABspAAAbKQAAGSkAABsRAAAZFQAAGykAABkTAAAbEwAAGxUAABspAAAZJwAAGxMAABsVAAAZEwAAGRUAADcnAAAbFQAAGScAABsTAAAbFQAAGykAABkpAAAZEwAAbRQAABsWAA8STBICAAgYAyJECZIamCbqAWYAABwqAAAcFgAANBQAABwWAABuFAAAogGRAQAANRMAABkTAAAbFQAAGRMAAFMTAABrFQAAGRYAABsUAA8SPhICAAkYAyI2CYIZoCe6ARQAABwoAAAaFgAAHBQAADgWAABsKQAAGj0AABkTAAAbKQAANRUAAG0WAAAZKgAPEt0BEgIAChgDItQBCfYm7COqBnwAABoqAAA4FAAANhQAADYWAAAcFAAAHBYAADYUAAAcFAAAHBQAADQWAAA4FAAAGhYAADgUAAAcFgAAGhQAABwUAAAaFAAANhYAADgUAAA2FAAAHCoAABwWAAAaFAAAigETAAAaFQAAHKMBAAAbFQAAGRMAABsVAABREwAAGxUAABkTAAA3EwAANRMAADcpAAA1FQAANRMAADUTAAA3FQAANRMAADUTAAA1EwAAGxUAABsTAAAZFQAANxMAABsVAAAZFgAANRUAADcWAA8SjwESAgALGAMihgEJ

I am getting byte array data from db but when i return it as response , browser automatically convert to base64 string.


texts: ArcPy insertRow asking for a sequence of values

texts:
I've got code that pulls the center point from a layer, and places it in a new feature class as part of a more complex analytical process.
I'm trying to get the centroid written to an in_memory feature class in order to use as a processing input for other stuff.  There are no fields needed in addition to the SHAPE@XY token.  Here's what I've got:
def get_extent_centroid(layer):
    desc = arcpy.Describe(layer)
    if desc.dataType in ['FeatureLayer', 'RasterLayer']:
        extent = desc.extent
        array = arcpy.Array()
        array.add(extent.lowerLeft)
        array.add(extent.lowerRight)
        array.add(extent.upperRight)
        array.add(extent.upperLeft)
        array.add(extent.lowerLeft)
        pg = arcpy.Polygon(array)
        centroid = pg.centroid
        return centroid

inlyr = arcpy.GetParameter(0)
center = get_extent_centroid(inlyr)
center_fc = arcpy.management.CreateFeatureclass("in_memory", "layercenter", "POINT", spatial_reference=arcpy.Describe(inlyr).spatialReference)
with arcpy.da.InsertCursor(center_fc, 'SHAPE@XY') as cursor:
    cursor.insertRow(center)

This results in:
TypeError: argument must be sequence of values

Which suggests that even though .centroid yields a valid point geometry, I have to do something more with it before sending it to the SHAPE@XY field?


texts:
I am working with existing groundwater borehole data (borehole location data plus the water quality data) to plan for the future monitoring of the groundwater water using spatially balanced sampling techniques. Thus obtaining sampling points from the existing points for  the monitoring of groundwater quality in the future.

I have not used the create spatially balanced point sampling tool before. I have read a bit about it and my understanding is as follow:

The input file should be raster file which contain the inclusion probability and the input file can be a point or polygon file.

These means, I can input an interpolated file (say the water quality Index Interpolation file) or individual water quality index as point data in raster.

My question is which of the raster data is more appropriate to use, the interpolated data or the point data? The software I am using is ArcGIS 10.2


texts: Assign Z-values of river stream segments

texts:
I have used Interpolate shape tool in 3D Analyst (ArcGIS 9.2) in order to obtain Z-values of each segment along the stream lines.

As input features I use Riverstream.shp file and as raster surface the DEM.
With right click on interpolated riverstream.shp after opening the attribute table, I created new column for X and Y coordinates. With right click on each column(for X & Y) using Calculate geometry I obtained X,Y values.

I need also  to obtain elevation values (Z-values ) for stream segment as well as length of each segment in meters (with  Calculate geometry there is not option to obtain Z values). I tried with Field calculator but without success.

Can anybody help me : How can I assign Z-values of stream segments.


texts: Is there any site where I can found city shapes in postgreSQL polygon format

texts: Is there any site where I can found city polygon area (for postgreSQL or similar)? I don't know if such resources exists, and I don't know how to find it.


texts: how can I get the majority (dominant) class of a raster to an area (polygon) using qgis?

texts:
I have a vector layer with many basic units of planning (zones), a raster layer with three classes of geology and other raster layer of geomorphology with five classes.

How can I update the attribute table of the zones with their respective majority classes of geology and geomorphology?


texts:
Is there any resource recommendations in general for getting past the basics of QGIS and going into the deep dark secrets?

Specifically in relation to expression coding for labeling, queries, etc.


texts:
I see that you can download Ordnance Survey maps as ESRI Shape files, so I would like to take those and convert them into a .osm.pbf file so that I can more easily use them.

Are there any tools out there that do this? Or, sources of Ordnance Survey .osm.pbf files?


texts: Raster calculator ERROR000732, python scripter

texts:
I'm trying to do the raster calculator with this script but something goes wrong. It seems that the program doesn't found the files, but they exist. I've tried to remove path from the variables (raster1, raster2 etc) but it is the same.

import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.env.workspace = "C:\Users\Elisa\Model_Builder\raster_calc\input"
arcpy.env.overwriteOutput = True
raster1 = "C:\Users\Elisa\Model_Builder\raster_calc\input\lito2016_area_studio_cross_curv.img"
raster2 = "C:\Users\Elisa\Model_Builder\raster_calc\input\lito2016_area_studio_flowacc.img"
raster3 = "C:\Users\Elisa\Model_Builder\raster_calc\input\lito2016_area_studio_long_curv.img"
outRas = Raster("raster1") * Raster("raster3")
outRas.save("C:\Users\Elisa\Model_Builder\raster_calc")


texts: Time Series of mean using Google Earth Engine

texts:
I've written a function that extracts the NDVI time series for a point geometry, but I would like instead for the time-series to follow the mean of a region over time. How would I do that?
var timeSeries = function(image) {
    var ndvi = image.normalizedDifference(['sur_refl_b02', 'sur_refl_b01']);
        return image.addBands(ndvi);
};

var ROI = ee.Geometry.Polygon([.....]); //some polygon ROI

var col = ee.ImageCollection('MODIS/006/MOD09GA')
            .filterDate(startDate, endDate)
            .filterBounds(ROI)
            .map(timeSeries);


texts: How to perform change detection using classified land cover map in Google Earth Engine?

texts:
I have generated land cover maps of three different seasons using sentinel-2 data.
How can I generate a image that shows the changes of a land cover type between two classification results?

What I have:
1. classification result of summer 2019 with 3 classes in one band
2. classification result of winter 2019 with 3 classes in one band

What I hope to achieve:
1. generate an image that shows all 9 types of changes in classes from one image to the other


texts: Workflow for creating line features between two coordinate pairs in QGIS

texts:
I have a table of stream reaches with XY coordinates for their respective tops and bottoms.

I'd like to convert the table to a feature, using the XY coordinates as the endpoints of the line.

Any suggestions as to the best workflow for doing this would be fantastic. I've Googled, but either my vocabulary is off or this isn't a task that's given others much trouble.


texts: Are there water/wastewater utility GIS symbols for electronic markers?

texts:
I hesitate to ask for standard symbols, but is there a de facto standard symbol(s)?  Or a popular set of symbols to use for electronic markers?

Our utility will soon start marking with electronic ball markers similar to these:
http://images.pennnet.com/articles/ww/thm/th_193172.jpg (from Water World Article 'Municipality Marks New Pipelines for Future Access').

I found this one somewhere, but I can't remember where I grabbed it from:

Are there others?


texts: Extract polygon names from external points: Extremely slow

texts:
I have a text file including geolocation points.
I have a shapefile containing polygons and name of polygons.
For each point, I have to extract the name of polygon if the polygon contains the point.
I tried as follows.
But it is extremely slow, it is taking me days....

import os, glob, numpy as np, pandas as pd, geopandas as gpd
from shapely.geometry import Polygon, Point

fi = "polygons.shp"
gdf = gpd.read_file(fi)
print (gdf)

fi = "points.txt"
df = pd.read_csv(fi, delimiter = ',')
print (df)

lons = df['Longitude']
lats = df['Latitude']

outputs = []

for lon, lat in list(zip(lons,lats)):
    point = Point(lon,lat)
    match = gdf[gdf.geometry.contains(point)].Name.astype(str)
    print (match)
    outputs.append([lon, lat, match])
outputs = np.array(outputs)
print (outputs.shape)
pd.DataFrame(outputs).to_csv('result.csv', index=False)


texts: Defining refresh interval of map in GeoServer?

texts:
Is it possible to define the map refresh interval on the server-side (GeoServer 2.11)? The issue is the following. I send GetMap requests to GeoServer from Kibana (client-side). Once the response is received, the polygons are colored according to data field's values using SLD rules. However when I set refresh interval in Kibana, it does not apply to the map. So, I want to do this directly from GeoServer.

Is it possible to define 1 minute interval for updating the map and colors of polygons (sending POST request)?

Now each update takes place only when I reload the brower's page.