texts:
I've developed an application on leaflet JS, which loads the services from local ArcGIS server through Arcgis REST API.

The following code loads the service:

function addServiceToMap(service, layers = ""){

    if(service){

        let url = "http://domain/arcgis/rest/services/" + service + "/MapServer?layers=show:" + layers + "&token="+token;

        let new_service = L.esri.dynamicMapLayer({
          url: url,
          opacity : 1,
          useCors: false,
          f: 'image'
        });
        new_service.addTo(map);
    }
}

The problem is, to hide a layer, I have to call this function, showing the required layers in the URL. Therefore, I add the service repeatedly.

Is there a better way?


texts: ArcGIS Intersect not showing on all street intersections

texts:
I have a centerline shapefile and have extracted a lane way feature class from it as I am attempting to show all intersections where these lane ways cross with public roads.

I utilized the intersect tool, set output to "point", JOIN attributes to ALL and ran the tool. I noticed that not all points were showing, reran Intersect with JOIN attributes as: ONLY_FID, NO_FID and have the same results.

I am new to more complicated GIS.


texts: QGIS 2.4: How to get Atlas to print all features not just the one visible in preview

texts:
I have a number of "zones" described by polygons that I use to produce a set of larger scale maps that I used to export into a pdf.

This has stopped working (when I moved to 2.4 ??) and now I always get just one item in the pdf (the one currently visible in preview).  Each item consists of two pages:  A map on the first page and two tables on the second page.  The idea being that when one prints the pdf two sided then you get a map and the tables on the back.


texts: When using QGIS Modeler with geopackages is there any way to Extract one Specific layer when using clip function?

texts:
I would like to use QGIS modeler to allow extraction of certain layers of a geopackage.

I am trying to clip a geopackage containing multiple layers using modeler and when run it the output gives only one layer within the clip boundary which is the first layer in the list, as it begins with A. (abandoned sewer)

What I would like to know is there something I have to add after .gpkg such as

layer.gpkg|layername='layername'

that QGIS will understand as I cant get the syntax right to complete this operation.

I am using the 3.4.5 LTR version of QGIS


texts: I'm new to the SAS Planet family and am having difficulties getting my head around the program. I am using 190707 version and can't export any tiles I've downloaded in a KML format back to my hard drive. It continually comes up with an error code 00E36D73. Seems if I use an earlier version of SAS Planet it's not compatible with current Google Earth. I can export the iPhone version of files but not the KML. I want to use the KML as I'm trying to convert the Google Earth images to use in my Lowrance GPS via Insight map Creator. I've watched YouTube videos of people explaining how it's done but keep getting stopped trying to export in KML format.


texts:
I would like to use some functions from D3 in my Tangram scene.yaml, but I'm not finding anything about it in the documentation.

I've tried referencing D3 in the YAML, like so:

layers:
    give:
        data: { source: mygeojsonfile }
        draw:
            polygons:
                order: 10000
                color: |
                    function(){
                        var x = d3.scaleLinear()
                            .domain([40, 60])
                            .range([0, 360]);
                        return "hsla(" +
                            x(feature.give) +","+
                            "100%," +
                            "50%," +
                            "100%" +
                            ")";
                    }
                extrude: function(){ return feature.give ; }

But it's not working, I get ReferenceError: D3 is not defined.

I'm importing D3 before Tangram, so my assumption was that the D3 object would be globally accessible.

My next attempt was to manipulate the color from my map.js file.

d3.json("give.geojson", function(d){
  d = d.features;
  var x = d3.scaleLinear()
    .domain(d3.extent(d, function(d){ return d.properties.give; }))
    .range([0, 360]);

  var give = scene.config.layers.give;

  give.draw.polygons.color = "hsla(" +
    x(feature.give) +","+
    "100%, 50%, 100%)";

  scene.updateConfig();
});

But this won't work because feature will not be defined and I won't be calculating the color for each feature.

I would prefer to make the other option work, since it's less cumbersome writing the code in map.js than inside of a string in scene.yaml.


texts: Is is possible to include a folder structure in an ArcGIS Pro Project Template or Package?

texts:
I'm trying to create a template for ArcGIS Pro that users can open that will create or already have our standard file structure, gdb template, some lyr files, etc.

As far as I can tell the Project Template (.aptx) only stores references and when I try and create a Project Package (.ppkx), it keeps my files but changes the folder structure.

For using ArcMap, we just have a zip with the folders and templates and you just need to unzip and rename a few things for each project. I'm trying to replicate, and hopefully improve, this for Pro.


texts: Getting weekly mean composite in Google Earth Engine?

texts:
I am currently working on a time-series in Google Earth Engine. Iam still quite inexperienced, especially when it comes to functions.
I want to extract the mean values of Sentinel1-images for each week in a period of 7 month and aggregate them into a new Image Collection I can then further process.

So far I tried to do it for a single month:

 var testsubset = ee.FeatureCollection("users/xyz/test_subset");

//set start-dates

var images = {
  '2018-02-01': getWeeklySentinelComposite('2018-02-01'),
  '2018-02-08': getWeeklySentinelComposite('2018-02-08'),
  '2018-02-15': getWeeklySentinelComposite('2018-02-15'),
  '2018-02-22': getWeeklySentinelComposite('2018-02-22'),
  '2018-03-01': getWeeklySentinelComposite('2018-03-01')
};

//function to get a weekly composite

function getWeeklySentinelComposite(date) {
  var date = ee.Date(date);
  // Only include the VV polarization, for consistent compositing.
  var polarization = 'VV';
  var sentinel1 = ee.ImageCollection('COPERNICUS/S1_GRD')
                      .filterBounds(testsubset)
                      .filterDate(date, date.advance(1, 'week'))
                      .filter(ee.Filter.listContains('transmitterReceiverPolarisation', polarization))
                      .filter(ee.Filter.eq('instrumentMode', 'IW'))
                      .select(polarization)
                      .mean();
  return sentinel1;
}

I currently run into two main issues: I'am not sure how to return the images I picked and how to turn them into a new ImageCollection. Second: I get

"Invalid argument specified for ee.Date(): [object Object]"

and don't really know why (I used a similar function for another script and it worked fine)

Just to clarify, this is what I want to do with the Image Collection in the end:

//Map.addLayer(testsubset, {color:'green'}, 'Testshape', true , 0.5);

var tempTimeSeries = ui.Chart.image.series({
  imageCollection: sentinel1_IC,
  region: testsubset,
  reducer: ee.Reducer.mean(),
  scale: 200,
  xProperty: 'system:time_start'
});

tempTimeSeries.setChartType('ScatterChart');
tempTimeSeries.setOptions({
  title: 'VV-over-time',
  vAxis: {
    title: 'sigma VV'
  },
  lineWidth: 1,
  pointSize: 4,
  series: {
    0: {color: 'blue'},
    1: {color: 'red'},
    2: {color: 'green'}
  }
});

print(tempTimeSeries);


texts: arcpy.AddIndex_management error for in_memory variable

texts:
I am trying to optimize a script that uses addJoin_management. To do this efficiently, I am attempting to add an attribute index on the join table. I am getting a generic error when i do this though.

  arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
  Failed to execute (AddIndex).

My code does an intersect, dissolve, calculate acres, join and then re-calculate the acres column to the target table.

EDIT: See below for my solution.


texts: Merging multiple SpatialPolygonDataFrames into 1 SPDF in R?

texts:
I have created 2 polygons in QGIS. Using them in R, polygons become automatically SpatialPolygonsDataFrame (SPDF). I would like to merge them into single SPDF (as is super easy in ArcGis using Tool Merge). I am sure that there should be simple way how to complete that in R, but I can't find how. the merge function seems to merge only data.frames, aggregate function dissolve multiple polygons into one shp, gIntersect (by typing join function) returns logical value, not at all the SPDF.

data are available here: http://ulozto.cz/xpoo5jfL/ab-zip

library(sp)
library(raster)
library(rgeos)
library(spatstat)
library(rgdal)
library(maptools)

setwd("C:/...")
a<-readOGR(dsn=getwd(), layer="pol.a")
b<- readOGR(dsn=getwd(), layer="pol.b")

ab<-merge(a, b)  # what tool if not "merge" to use??


texts: JSAPI - how to add a graphic on top of another graphic in the same layer?

texts:
I have a graphics layer and I'd like to add a graphic behind the existing graphics.  I've come up with this:

graphicsLayer.add(overlay.graphic);
graphicsLayer.graphics.unshift(graphicsLayer.graphics.pop());

But I have to pan the markers off the screen and then pan them back into view before the 'unshift'-ed graphics display correctly.  I've tried calling refresh without any affect:

graphicsLayer.refresh();

How can this be done without introducing a second graphics layer?


texts: Generating Buildings ID numbers inside parcels using ArcPy?

texts: In order to decrease manual data entry, I would like to automate a task to generate numbers for all buildings inside a parcel starting with 1.  For example, I have 4000 parcels and each parcel has many buildings.  An example of what I would like to achieve is shown in this diagram:


texts: QGIS doesn't update some snapping options from Python

texts:
I've just installed QGIS 2.14.3 (Essen) on a Windows 7 machine, so I've got the default configuration on everything. This means that under "Settings -> Options -> Digitizing", I've got "Default snap mode = Off", and "Default snapping tolerance = 0,00000 map units".

When I create a new project, and then create a new multipolygon temporary scratch layer, snapping mode is off as expected according to the general digitizing options previosly described. This can be verified under "Settings -> Snapping options", or just by creating a new feature and checking that its vertex don't snap.

After that, from the Python console I type the following:

>>> proj=QgsProject.instance()
>>> proj.readEntry('Digitizing','DefaultSnapType')
(u'off', True)

So, until now, everything seems to be OK because Python shows the same information that the GUI.

But, if I type:

>>> proj.writeEntry('Digitizing','DefaultSnapType', 'to vertex and segment')
True
>>> proj.writeEntry('Digitizing','DefaultSnapTolerance', 10.0)
True

It looks like I've changed the snapping mode, but actually QGIS hasn't changed it at all. In fact, if I go to "Settings -> Snapping options" it shows "Snap to = Off", and "Tolerance = 0". But, If I type:

>>> proj.readEntry('Digitizing','DefaultSnapType')
(u'to vertex and segment', True)
>>> proj.readNumEntry('Digitizing','DefaultSnapTolerance')
10

So the GUI and the Python console show different information, but only the GUI's options are the real ones.

Then, if I change the "Snap to" option on the GUI to "To segment and vertex", "Tolerance = 10", and click OK, then QGIS has really activated the snapping mode. I mean, if I create a new feature its vertex will snap properly.

It would seem at first sight that you cannot change snapping option from the console, but this is not totally true, because if I type:

>>> proj.writeEntry('Digitizing', 'TopologicalEditing', 1)
True
>>> proj.writeEntry('Digitizing', 'IntersectionSnapping', True)
True

The GUI options "Enable topological editing" and "Enable snapping on intersection" get activated. And in the same way, I can really deactivate both options (I mean, showing properly deactivated on "Settings -> Snapping options") by typing:

>>> proj.writeEntry('Digitizing', 'TopologicalEditing', 0)
True
>>> proj.writeEntry('Digitizing', 'IntersectionSnapping', False)
True

In conclusion, it looks like QGIS doesn't really update all snapping settings from Python, but only some of them, so you've got to use the GUI if you want to change them all.

Does anybody know a workaround?

If not, can somebody try to reproduce the situation and tell me their results? I'd like to know if someone else is suffering this issue before I report it like a bug.


texts: Clipping a raster with several polygon features - saving output rasters according to a field name in the polygon layer

texts:
I'm using ArcGIS Desktop 10.5.1. and I'm a beginner with Python. I'm trying to clip a raster layer with a polygon layer (shapefile) that has multiple features. The tool should

clip the raster according to those multiple polygon features, and then
name the new output rasters according to a field name (FID) in the polygon layer.

Example input raster name: RasterFile.tif
Example output raster name: RasterFile_FID0.tif (this would be the first raster)

I have a code (from @Midavalo) that I have used to do the first part (code below). This works just fine, but I can't figure it out how to modify the code so that it would do the second part.

import arcpy, os
arcpy.env.workspace = r"E:\Folder\Subfolder"
outputWorkspace = r"E:\Folder\Subfolder\Outputs"
rasterlist = arcpy.ListRasters()
clipShapefile = r"Grid.shp"
clipShapes = set()
with arcpy.da.SearchCursor(clipShapefile, ['OID@']) as cursor:
    for row in cursor:
        clipShapes.add(row[0])

for raster in rasterlist:
    rastername, rasterext = os.path.splitext(raster)
    for i in clipShapes:
        newRaster = "{}_clip_{}.img".format(rastername, i)
        newRasterPath = os.path.join(outputWorkspace, newRaster)
        if arcpy.Exists('clipLayer'):
            arcpy.Delete_management('clipLayer')
        arcpy.MakeFeatureLayer_management(clipShapefile, 'clipLayer', ' "FID" = {}'.format(i))
        arcpy.Clip_management(raster, "#", newRasterPath, 'clipLayer', "0", "ClippingGeometry")
        arcpy.Delete_management('clipLayer')


texts: Export to PNG produces wrong color background (but not for JPG)

texts:
I need to export a map as a PNG image, but when I do the background, which is supposed to be white, comes out gray. This also happens when I export it as a TIFF or EMF, but not as a JPG.
I have tried different combinations of putting white vs no color as the data frame color and as "background color" option when exporting (see attached images comparing JPG and PNG). Any suggestions?


texts: Deleted fields from table in SQL server management studio and now feature class is not working properly

texts:
I am running SQL server (v10.50.6220.0) on which there are stored a couple of my geodatabases (sde schema).
Recently, I inadvertently deleted some attribute fields from an annotation feature class table (sde.TEXT) in SQL Server Management Studio (SSMS). Opened MyDatabase\Tables\sde.TEXT\Columns and deleted some columns with simple right click\delete. By adding this annotation feature class to the ArcMap, the fields I deleted are gone and feature class seems fully functional (can make edits etc.).
After a while I ran my custom VBa tool which deletes unnecessary Annotation classes (subtypes) from an annotation feature class and this particular fc gave out an error - "An expected Field was not found or could not bet retrieved properly". I am pretty certain that it has to be something about deleting those fields earlier in SSMS.
So I wanted to ask - what should I do in SSMS, to kinda mimic the actions of ArcGIS Delete field tool so it would be like if I deleted those fields properly through ArcGIS.
*I have older full db backup, bet restoring db from old backup is not an option;
*I read that geodatabase upgrade could help, but my SQL 2008 server limits gdb upgrade to 10.2. version which I am already using.


texts: Error in function (classes, fdef, mtable) sp.kde from R spatialEco library in Windows 10 and Debian Linux systems

texts:
When I run following R code in a Windows 7 system, result and plot of kde function of spatialEco library is produced without any issues; as it can be observed in below image.

library(spatialEco)
library(sp)
library(rgdal)
points <- readOGR('points.shp')
mask<- readOGR('mask.shp')
bbox<- bbox(mask)
extent<- c(bbox[1], bbox[3], bbox[2], bbox[4])
raster <- sp.kde(x = points, y = points$newpeligro, newdata=extent, bw=1, n = 5000, scale.factor = 100)
plot(raster)
points(points, pch=20, col="red")
plot(mask, add=TRUE)

However, same code ran in Linux or Windows 10 systems produces for below line:

raster <- sp.kde(x = points, y = points$newpeligro, newdata=extent, bw=1, n = 5000, scale.factor = 100)

following error message:

  Error in (function (classes, fdef, mtable)  :    unable to find an
  inherited method for function ‘resample’ for signature ‘"RasterLayer",
  "numeric"’

In this answer:

https://stackoverflow.com/questions/36943201/what-does-this-mean-unable-to-find-an-inherited-method-for-function-a-for-sig/53124958#53124958

it is suggested that it can be due as result of namespace conflicts.

So, I tried out:

raster <- spatialEco::sp.kde(x = points, y = points$newpeligro, newdata=extent, bw=1, n = 5000, scale.factor = 100)

but the problem still persists. Can this issue be solved?


texts:
I am new to QGIS and have just installed 1.8.0 on a Gateway laptop that is about 2 years old.
It is running Windows 7, has an Intel Core i3 2.13 GHz processor, 4 GB of RAM.

I've just brought in my first layers (235 MB of data in 3 shapefiles) to my first project, and it takes forever to render.
By forever I mean more than one minute for each task: zoom, move, rectangle select, changing the order of layers.

The data is PLSS data from the state of Oregon as provided through the federal government through BLM. Although I downloaded only the Oregon data, when I right-click
on the twnshp layer onto attribute table, I do see records relating to CA and ID as well as Oregon.

Will I not be able to run QGIS on this computer?

Thanks so much, Yeye


texts: Can Nearest Neighbor Analysis help determine values for a Heat Map?

texts:
Given the below parameters (from Nearest Neighbor Analysis):
A) Is there a definite range my Radius value should be within?
B) Are there definite values my cell size should be near?
C) Is there a definite range my color map values should encompass or exclude?

What might the values be?

Observed mean distance:0.00550684136246
Expected mean distance:0.00927189095586
Nearest neighbor index:0.593928615929
N:185
Z-Score:-10.5662074435

Layer metadata:

X: 656 Y: 501 Bands: 1
Origin: -75.2615,40.133
Pixel Size: 0.000475715,-0.000475715
No Data Value: -9999
Data Type: GDT_Float32 - Thirty two bit floating point
Pyramid overviews:
Layer Spatial Reference System:
+proj=lcc +lat_1=40.96666666666667 +lat_2=39.93333333333333 +lat_0=39.33333333333334 +lon_0=-77.75 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs
Layer Extent (layer original source projection):
-75.2614514397764793,39.8947150902235208 : -74.9493824749561242,40.1330482478073591

Thank you for all the help.


texts: Can I reorder the coordinates of a line when importing into QGIS a WKT linestring?

texts:
I managed to import a csv file containing lines in QGIS but unfortunately the x y aren't in the correct order. that is, the csv has a field where there is a sequence of lat (y), lon (x), while qgis apparently wants x,y. I become aware of this problem because my lines are plotted in a place which isn't my area under study. What can I do?

ID;geometry;name;definition;type;ID_linea
3;2;"LINESTRING(46.155628 13.17198, 46.155283 13.172648)";Ippovia Cormor in Comune di Tricesimo;qua1;1

(That should be somewhere in italy)


texts: What's wrong with my Proj4 transformation?

texts:
I am having trouble converting a projected coordinate EPSG:28355 to WGS84 EPSG:4326 using Proj4js. I know by default Proj4 will not convert to EPSG:28355 so I went to spatialreference.org and got the proj4js format and placed it in my defs.

Now I know it can work because when I have the code below:

    var gridCoordinate = new Proj4js.Point(easting,northing);

alert(gridCoordinate);

var wgsPoint = new Proj4js.transform(theZone, wgs84, gridCoordinate);

alert(wgsPoint);

I get these results - same order as the alerts called above.

To me that looks like it has worked.

Then for some reason when I was done checking that it worked I removed the alerts so that my code looked like this

var gridCoordinate = new Proj4js.Point(easting,northing);
//alert(gridCoordinate);
var wgsPoint = Proj4js.transform(theZone, wgs84, gridCoordinate);
//alert(wgsPoint);

The thing stops working and gives me a projected coordinate on the WGS84 basemap which blows me off the edge of the earth.

So I kept playing around and put in one alert to see what the final coordinate looked liek (code below)

var gridCoordinate = new Proj4js.Point(easting,northing);
//alert(gridCoordinate);
var wgsPoint = Proj4js.transform(theZone, wgs84, gridCoordinate);
alert(wgsPoint);

And I got the following result

Same as the starting coordinate it looks like the conversion has not worked at all. Why on earth would an alert call be affecting the output of this conversion? Have I declared or am I setting my variables incorrectly?

Thanks

Ando


texts: Selecting A Single Polygon that Contains a Specific Point

texts:
I am trying to merge the polygon features with the point that falls inside of it using a spatial join.  The problem I'm running into is that if I select 'contains' it selects both polygons. If I select 'completely contains' it doesn't select either.

I have to zoom in pretty close to see the point is in one polygon and not the other, is there a way to enhance the selection precision?
Are there any other things that I can try?

I'm using ArcGIS 10.0 SP5


texts: Geonetwork startup error: bootstrap.less wasn't found

texts:
I am running geonetwork 3.0 on ubuntu 14.04. Since I restarted my tomcat the last time I get the weird error when calling geonetwork:

  FileError:
  'geonetwork/catalog/lib/style/bootstrap-3.0.1/bootstrap.less' wasn't
  found (404)

in connection with the stacktrace message

OperationAbortedEx : Failed whilst adding the schema information. Exception message if any is /tomcat7/webapps/geonetwork/WEB-INF/data/
data/resources/xml/schemas/iso19139/schema/gmd/metadataEntity.xsd
...
...
Caused by: java.nio.file.AccessDeniedException: /var/lib/tomcat7/webapps/geonetwork/WEB-INF/data/data/resources/xml/schemas/iso19139/schema/gmd/metadataEntity.xsd

I had a look and bootstrap.less actually exists, but it lives under

  style/bootstrap/less/bootstrap.less

Any ideas what to do against this weird error? I don't know how to fix an AccessDeniedException on the mentioned xsd file. Actually tomcat should be able to access, if he's able to deploy?!


texts: Why does arcpy.mapping.Layer give Runtime error: CreateObject Layer invalid data source?

texts:
I want to connect an existing .lyr file to a variable defined as lyr2.

lyr2 = arcpy.mapping.Layer(r"C:/Iso100Red.lyr")

Although it is a .lyr file, I get this Error code:

Runtime error <type 'exceptions.ValueError'>: Object: CreateObject Layer invalid data source

What could be the problem here?


texts: v.buffer.distance does not create straight buffers in QGIS

texts:
I've re-ran the v.buffer.distance algorithm numerous times in QGIS as well as the GRASS GIS GUI. No matter what setting I pick for straight corners, or caps at the end of polylines, I keep on getting rounded buffers.

Any ideas on what I'm doing wrong?

Or is there another way in QGIS to get flat ended buffers from lines?


texts: Editing fid to match row number using QGIS?

texts: Tried editing it but it wont allow to save the edit.


texts: PostGIS-Geography doesn't show in QGIS after database restore

texts:
I recently restored a PostgreSQL database from a SQL dump. It worked well insofar as all my tables and data are restored. However, one of the original tables contained a PostGIS geography column containing points, which I could load into QGIS. This layer used to be indicated with a points symbol in the DB-Manager in QGIS, now it is shown as a normal table (see below), although in the field list of the DB-Manager it is correctly shown as a geography column.

I can load this table into QGIS, where it also only shows up as a table layer without a geometry, although the geography column is in the attribute table (see below).

I can export the layer as a CSV and when reimporting it, the geography column is automatically selected and the geometries are loaded correctly. So this would be a workaround, but this should not be way to do it. Is this a bug, or is there something I can do about it?
I am currently using PostgreSQL 12.6 and QGIS 3.16.


texts: Calculating the Area of a Raster/Vector in Google Earth Engine

texts:
How could we calculate the area of a vector in Google Earth Engine? It seems to be quite simple for polygon features, but I could not find a way for doing it for a vector object.

First, we obtain the image:

var s1 = ee.Image('COPERNICUS/S2/20160422T084804_20160422T123809_T36TVK')

Then, we clip it to focus on our region of interest (water dam) based on a given polygon (dam) to reduce the analysis time:

var s1_clipped = s1.clip(dam)

We determine the water pixels:

var w1 =  s1_clipped.select('B8').lte(threshold)

Now we can calculate the number of pixels in this new variable:

var stats = w1.reduceRegion(ee.Reducer.sum());

However, we further process to get a vector representation:

var v1 = w1.addBands(w1).reduceToVectors({
crs: s1.select('B8').projection(),
scale: s1.select('B8').projection().nominalScale(),
geometryType: 'polygon',
eightConnected: false,
labelProperty: 'zone',
reducer: ee.Reducer.mean()
});

We need to calculate the area we think belonging to water pixels. How could we do it either in the raster (through the variable w1) or vector (through the variable v1) objects?


texts: The new version of qgis (2.18.20) no longer scales maps in the print composer

texts:
I've used various versions of qgis to make maps and never had a problem scaling them until now.

My system updated, including my version of qgis which has the scale option but doesn't apply it to the map when clicked on.

Any suggestions, or is this a glitch in the software??


texts: How to write merged geodataframe to shapefile

texts:
Tried the following code. I am able to see the merged data in the console but I don't get any output file. Running my code does not raise any errors either.
import geopandas
import pathlib
import fiona
import os
import pandas

filename1 = '/Users/alexander/Code/Python/11_gis/GeoPandas/DF1.geojson'
file1 = open(filename1)
gdf1 = geopandas.read_file(file1)

filename2 = '/Users/alexander/Code/Python/11_gis/GeoPandas/DF2.csv'
file2 = open(filename2)
gdf2 = geopandas.read_file(file2)

gdf1 = gdf1.merge(gdf2,on='OMCODE')

gdf1.to_file("output.shp", driver='ESRI shapefile')

Sample of GeoJSON :
{
"type": "FeatureCollection",
"name": "DF1",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "ID": "XXX-AAN-NCB", "Local_code": "3502", "OMCODE": "ANNIC", "Name": "Nicobars", "areaKM": 1713.91369, "areaMiles": 661.74313 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 93.668786592478256, 7.025389295324629 ], [ 93.671142592480436, 7.031861795330656 ], [ 93.660415592470457,

Sample of CSV to be joined by common field OMCODE
OMCODE  Mon Abdul   Abnaki  Abor
ABATH               2
ABBAN
ABBEL   1       34
ABBIG
ABBLA
ABBON           1
ABBRZ       4
ABCAL
ABCLE
ABCLH
ABCYC               4
ABDV3       4


texts:
I have a Shapefile with Polygon features  representing the world's land areas (continents, islands).

Is it possible to invert these, and get a geometry that represents the world's oceans and seas?

So the original land Polygons need to become rings in a single global Polygon that covers the planet.

Basically, I'm looking for something like Select > Inverse in Photoshop.

I am using QGIS.


texts: Converting GPS cords to X Y based on wrapper

texts:
I'm trying to create some software for an airport and they require me to place icons of aircraft in their position based on GPS. I have 10x10 tiles each tile being 256x256 pixels and the origin point being top left and measured in pixels.

This leaves me with a canvas of 200 tiles adding up to 5120x5120 pixels. I need a way to place an icon on top of a pixel based on GPS long and lat regardless of zoom! I don't understand the type of math involved as I have never done it before! The top left of the canvas is x:0,y:0. Can somebody please point in the right direction please?

The language I'm using is JS and it's for a .net application in unity3d.


texts: Calculating intersection angles of multiple polylines QGIS

texts:
I have one vector layer of multiple polylines that intersect each other in QGIS.
What I want to do: calculate all intersections angles (2-ray, 3-ray, 4-ray and 5-ray types) in this vector layer.
What I did: I used the v.clean tool to split all polylines at the intersections.
I created a buffer at every intersection and clipped out the polylines. Then I assigned a unique “buffer ID” for the related intersections located within each buffer. The orientation of each line at an intersection was calculated with: degrees(azimuth(start_point($geometry), end_point($geometry)))

I have come this far. I think next step is to subtract the orientation value of a line feature from it’s adjacent line feature (e.g. clockwise from 0°) and so on until all intersection angles are calculated, then going on with the next buffer.

The problem: As you can see in the Screenshot and a section of the attribute table, the displayed IDs are not always in a clockwise (or counterclockwise) order. So, I don’t know how tell E.g. Excel or QGIS which value to subtract from which one.

Sorting the values by “Orientation” also doesn’t work always since e.g. ID1788 has 135° (should be 315°) but ID1790 has 208°
Orientation of 227° corresponds to 47° (227°-180°)

E.g. ID1790 (208°) - ID1788(135°) = 73° (wrong intersection angle)
correction: ID1790 (208°) - ID1788(135°+180]) = (-)107°

I hope I was able to explain my problem clearly and maybe you have a solution approach for me.   I also read this point-based approach, but I don’t know if it helps for my problem. (Calculating angle using three WGS 84 points and Angle at intersection point from two Lines )

Greetings Toffer


texts: Server-side definition of GetFeatureInfo-request parameter for ArcGIS Server WMS?

texts:
I'm trying to customize the response of a GetFeatureInfo request. I want that ArcGIS Server uses a certain HTML document as a template for responding to GetFeatureInfo requests of a one particular WMS. The other services the server publish must not use it.

I know it's possible to add an XSLT template as a request parameter to the GetFeatureInfo request like "www.mywms.com/wms?REQUEST=GetFeatureInfo&SERVICE=WMS&[...]&template=path-to-xslt-document.xslt", but I want that any GetFeatureInfo response of my ArcGIS Server WMS will be modified into a HTML document without setting a parameter at the WMS Server Connection Properties.

I could not found out how configure ArcGIS Server to do this.

Editing the Capabilities document may be one approach but I don't know how to set the parameters.


texts: How to add event listener to many markers on the map?

texts:
How can I add an event listener to many markers on the map?
I know how to add an event listener to a single marker say:

var marker = L.marker(...);
marker.on('dragend',function(){...});

So, how can I add an event listener to many markers on the map?

In jQuery, you can select objects like this (example):

$(".marker").on("click",function(){...});

So this code applies it to all things with class marker.

Is there something similar to this with Leaflet?


texts: How to Batch Change X, Y Coordinate Number in ArcGIS?

texts:
I have a huge number of points (100000 points). Some of these have the same  x,y coordinates. For example, 50 points are same in x,y  then  100 points are same in another x,y coordinates and so on. Then the points are overlaid with each other and the user can’t see all of them. What I want to do is calculate the x and y of each point automatically and add a number at the end of each x and y.

For example:

Point a:  x=65.23, y=26.76

Point b:   x=65.23, y=26.76

What I want to do is:

Point a:    x= 65.231, y=26.761

Point b:    x=65.232, y=26.762


texts: River network distance from each raster cell

texts:
I have a river network shape (or raster) and need to calculate the distance (river,  not straight line!) for each pixel (or if not possible for lets say every 10 meters or for a random set of points) to the end of the river. I need this as a raster file.
This will serve as an input for fish habitat modelling where the distance to source is an important predictor.

I know how to calculate that for a certain set of points via "locate features along routes", but how can I get it for "all" the points along the river?

I am using ArcGIS!


texts: Generating new UUIDs (primary keys) while importing from QField breaks (1:n relation) to child features

texts:
We have a QGIS project with a parent (parquets) and two child layers (peuplements and gestion)  (1:n relation) all stored in PostGIS. The parent primary key is a UUID (no default value defined). Both child layers use an UUID field as foreign key. Foreign key constraints are set properly in PostGIS.
In QGIS relations are set and the parent uuid has an uuid() function in the attribute field set as default. (We do not use the built-in UUID-generator.)

In QGIS we can digitize new parent polygons, add multiple children and save everything back to the database.
When using the project in QField we are able to digitize new polygons and add child layers. When trying to sync back to QGIS only the parent polygons are imported and we run in the following error:
insert or update on table "parquets" violates foreign key constraint "peuplement_fk" DETAIL: Key (uuid)=(24fdfc80-2f1e-44fb-8dd8-d492901c37de) is not present in table "parquets".
This behavior is correct. When I look in the attribute table of the parent layer in PostGIS, all the UUIDs are new ones.
So none of the children can be imported since they all keep the old UUIDs from QField.
Did we miss something?
QGIS 3.16.7
QField 1.9.5 (5f66b7v1.9.5)


texts: Proportion of polygon classes in each multi-ring buffers

texts:
I have a landcover map with many irregular polygons, with each polygon a uniform habitat type. I have a second shapefile of points, and a third shapefile with multi-ring buffers around those points. I would like to know the proportion of each habitat type within each buffer for each individual point (or even area rather than proportion), ideally as additional columns in the attribute table of the buffer shapefile.

How can I do this without repeatedly clipping the landcover map to each buffer and then manually calculating the proportions? (In my full data set I have 190 points, each with 150 buffers, so 28,500 rows, i.e. I need to automate this as much as possible).

Example, landcover polygons and points;

Concentric buffers around a single point;

So in the example above, my desired output for the first three buffers for this one point would look something like this;


texts:
I have a .shp file (downloaded from here), but it is a bunch of pink lines (I expected something like a bunch of dots or something and I have to transform it into gps coordinates (which I guess it's a .gpx file), but I have a lot of trouble finding the tools to do so and understanding what everything means. Right now I'm using QGIS, and I think once I have the coordinates I should dump the values into PostGIS. Could you guys point me in the right direction about which tools I should use, how or tips about how to do things the right way?

Further explanation: I want to get coordinate points that "shape" the coastline, so given a house's position, it can tell you how far away the coast is from the house.

Edit: I managed to get some stuff with QGIS "extract nodes" option, but I don't see any use for this data:

Shape_Leng,Shape_Area
309.72983208000,4079.18723489000
309.72983208000,4079.18723489000

Values repeat a lot and they don't look like map coordinates. What went wrong?


texts: How to use the SQL in select by attribute to select the entries for each values in certain field?

texts:
I am trying to use select by attribute for the table in ArcGIS, which is similar to the following picture (lets say):

I want to select those entries for each A and B, which have maximum count.

I used

SELECT *
FROM table
WHERE
    count=
    (
        SELECT DISTINCT MAX(count)
        FROM table
    )

This can give result for the maximum count of the whole table. What should be the modification or addition in the above query so that it will select the maximum count for A and B as well?


texts: Take attributes from other layer in ATLAS from QGIS

texts:
I am performing an ATLAS where I have a table and I would like to use data from other layer. I have seen that joining them into QGIS allows me to select the fields from the second layer but the problem is that for one record in parent layer I'd need to list two or more records for the child layer (sharing them the ID) but the system take only the first record. Is there any way I can solve this?
Parent layer:
ID
1
2
3

child layer:
ID
1
1 (the system doesnt take this one)
2
2 (The system doesnt take this one)


texts: Create column to identify in which polygon does the point lie (QGIS)

texts:
I have a polygon shapefile and a point shapefile. At the point shapefile, I want to create a column, which will inform me about the polygon where each point exists. What do you suggest?

I mainly use QGIS, but I am also familiar with ArcMap.


texts: PASDA DEM projecting incorrectly; CRS transformation didn't work

texts:
I hope I have what seems to be a rudimentary question. I have downloaded DEM files from PASDA (For example 54002530 from Here).

The CRS of the data is EPSG:32129 (NAD83 / Pennsylvania South); in feet (see description here).

I am using other data (notably the Google Satelite map from the Openlayers plugin) in QGIS that is in EPSG:3857 (WGS 84/ Psuedo Mercator) and the project CRS is set to this as well.

When I import the DEM files, they end up in the middle of the Atlantic ( for example -6063990,5102330 : -6036988,5119609). Clearly, the DEMs need to be reprojected. OTF clearly isn't working (it is on and working for other data).

I tried to Reproject (Raster->Projections->Warp (Reproject); and only transformed from EPSG:32129 to EPSG:3857), but the DEM files did not move.

I also tried the Raster Calculator, but that only converted the elevation. I was thinking that the problem was that the data was in feet, not meters.

Notably, the WMS version of the same data (see second link above) appears in the correct location.

I would like to download the DEM locally so that I can do slope and ruggedness analyses.


texts: Ogr2ogr: Shape to MySQL. Delete (or ignore) "geometry_columns" and "spatial_ref_sys"

texts:
I'm exporting a shapefile to my MySQL database. But as standard it also add the additional metadata tables:
"geometry_columns" and "spatial_ref_sys"

Is there a way to either delete these tables or don't export them to the database, in the some ogr2ogr job? Of course I can always delete them after, but it would be so nice if they are just ignored from the start.

My code is:

ogr2ogr -f MySQL MySQL:database,host=localhost,user=user,password=code /TM_WORLD_BORDERS-0.3.shp -nln Projects -update -overwrite -lco engine=MYISAM


texts:
I have a workbench which returns multi page .Tiff files as xml then outputs back to Tiff.

I use the XML Flattener, TextDecoder and RasterReplacer transformers to decode and rasterize the images. I then write to Tif but the writer only returns the first page of the multi page Tif.

Any ideas on how to return all of the pages?

Below is a screenshot of the process. I'm thinking it could be something to do with the RasterReplacer not populating the tiff_subdataset_name' which delineates a multi page Tiff file.


texts: Event for Selected Feature when Editing?

texts:
Are there Events in the ArcGIS JavaScript API that I can use to get the selected features being used by the attribute inspector and when features are added to the map?

I am using the editor widget in combination with the Attribute Inspector. I have also created a Template picker and used that with the editor widget.

In my application, I am editing points, lines, and polygons from a Feature Server using the On Demand Mode. I have seen examples that show selected features using the On Selection mode, but was not pleased with having to add both the map server and the featureServer layers so I am trying to find another way.

I would like to be able to start a function that draws a graphic for the point features when they are selected and displayed in the attribute inspector, as well as when the features are first completed but don't know which event is firing.

I appreciate any assitance.

Thanks,

Mele


texts: Calculating area of pixles for certain Aspect value per specific area?

texts: I am using ArcGIS 10.6. I have the aspect (raster file) for the roof of buildings at the city scale. Now I want to calculate the area of each aspect group per building. I tied zonal statistics, zonal geometry and etc . Also reclassified the aspect layer and tried to add the Building ID. But I didn't get the desired result. Is there a way to do that? Kindly see the attached


texts: st_length column in Postgres db and ArcGIS under WGS84

texts:
I have a polyline feature class in ArcGIS running on top of postgres in WGS84 datum. I am wondering what is the unit of length used to drive st_length column under this datum and what is the method of calculation. I am getting this feeling that it is a blind function only useful if the data is in a projected format.

In projected coordinate systems, it is in meters.


texts: Loading CSV file without geometry in graphical modeler

texts:
I'm trying to use the graphical modeler to make a join between a vector point layer and a CSV file which doesn't have geometry data.

I tried to use 'Vector layer' as an input for the CSV-file but the .csvt-file is not taken into account and the resulting vector layer is incomplete.

How can we upload a CSV as a delimited text layer with the graphical modeler?


texts:
GDAL 1.8 now supports reading GeospatialPDF, see pdf format description page. Using it depends on the poppler pdf library. What is the smoothest route to getting gdal and geospatial pdf working on Windows?

UPDATE: I mean getting the gdal utilities, the end user programs not the just the programming libraries.


texts: Why are date vaules displaying a trailing 'Z' when layers are published with Geoserver and a PostGIS data store?

texts:
I have published various layers using Geoserver 2.2.x with a PostGIS 2.0.1 (PostgreSQL 9.1.x) data store. Fields that only have date values and not time/timestamp related values are stored as date. After publishing my layers as wfs/wms and opening the table in the browser date vlues are displaying with a trailing 'Z'.

Is this a product of the geotools data store api that geoserver is using?

I think the geotools data store api is throwing a blanket over the data reading date as datetime, timestamp etc and the 'z' gets displayed for zulu time. I could be totally off on my geotools assumption but in PostgreSQL 'z' represents zulu or utc.

If the data source values are stored as date and have no time component why is there a trailing 'Z' in the date field?


texts: Set available orientation to toolbar in ArcMap using ArcObjects

texts:
We are creating a very huge extension for ArcMap and in the process, we have created a lot of new custom toolbars. These toolbars contains both buttons and custom controls. These custom controls can only be viewed in a horizontal orientation (they are drop-downs for the most part).

I was wondering if there is a flag I can set on my objects in one of the interface to tell ArcMap that these toolbar are only available for horizontal orientation (this mean that when the user is trying to place them on the screen, using the docking mechanism, ArcMap doesn't offer the docking in vertical orientation for example).

I'm using the IToolBarDef and have been searching the documentation for another interface but all I can find is an Orientation properties for the ToolbarControl which I can't use because I work with ArcObjects.

Thanks!


texts: How to remove coastlines from Admin 0 data set using GRASS?

texts:
I have a set of international borders that I would like to overlay on top of a different data layer that represents coastlines ("land" essentially).  I would like to convert my Admin 0 polygons into linestrings and then remove all of the coastlines, leaving only the internal boundaries in place.  Is this something I can do with GRASS?

My thought was that it should be possible to look for any line which is not a shared border between 2 features, tag it somehow, and delete it.

Thanks in advance for your help.


texts: For Loop Maximum Minimum Distance Between Two Lines

texts:
I have a table of line/lane ids in a table called matched_lanes, and I am trying to create a lateral query that on each id in the table to find the maximumum minimum distance between each point.

I.e. for every lane:

Loop through each point on the lane, and find the minimum distance to its first_left_boundary (this is just another lane stored in the matched_lanes table.

Return the MAXIMUM of these minimum distance and append this to our table as max_left_lane

Essentially if you consider these lanes as roads, at any point along the road you could calculate the smallest distance to your (the roads) left neighbour (another road). For each point along the lane this smallest distance can be calculated. I want to find the max of these min distances value for each lane.

I have the below, but I'm not sure it is actually calculating the minimum, but rather the max

Refernces:

How to calculate the average distance among set of points as measure of closeness

Get the lines between all points of a polygon in PostGis : avoid nested loop?

       SELECT
            lane_id,
            first_left_boundary
            sub.max_lane as max_left_lane
        FROM
            matched_lanes,
        LATERAL(
            WITH
                points1 AS(
                    SELECT
                        (ST_DumpPoints(lane_info.geometry)).*
                    FROM
                        lane lane_info
                    WHERE
                        lane_info.id = lane_id
                    ),
                 points2 AS(
                    SELECT
                        (ST_DumpPoints(first_left_lane.geometry)).*
                    FROM
                        lane first_left_lane
                    WHERE
                        first_left_lane.id = first_left_boundary
                )
            SELECT DISTINCT
                max(ST_DISTANCE(points1.geom, points2.geom))
            FROM
                points1,
                points2
            )
        AS sub(max_lane)
        ORDER BY
            lane_id;


texts: Most efficient way to find if a polygon falls with in the boundary of another polygon using postgis

texts: I have a polygon layer that contains some polygons inside of polygons.  I need to be able to identify the polygons inside of polygons and discard the polygons inside of the polygons.  What is the most efficient way of doing that?


texts: How do I build a custom form for entering attributes in QGIS

texts: I've done this many times in ArcGIS and ArcPad but I don't even know where to start building a custom form for data entry in QGIS.  I would like to do this for field operations--QGIS would make a good field tool with a little customization


texts: I am having a problem when I am opening Global Mapper workspace that I had already created and saved it. Evey time I try to open it an error appear and nothing opens on the screen. Is there a way to open this .gmw file.


texts: Raster standard deviation stretch Python script

texts:
I am looking for ways of applying a permanent standard deviation stretch to rasters via a Python script.

Are there any ArcPy raster stretch functions? I was looking for a reference but could not find any.

Are there any other Python libraries that can perform the stretch?


texts:
I am using a popup on my mapView from arcGIS API for Javascript 4.17. When the user opens the popup, I have set the following attributes:
    view.popup.open({
        // Set the popup's title to the coordinates of the clicked location
        title: "Location Coordinates: [" + lon + ", " + lat + "]",
        location: event.mapPoint, // Set the location of the popup to the clicked location
        content: setContentInfo(view.center, view.scale),
        actions: [risk_snapshot, ble_report, print_report, lidar_report]
    });

In the popup, I am adding some smaller maps using a function called setContentInfo that returns a "masterDiv" DOM node with the maps. However, I want to add an additional DOM Node outside of that div to the content. The function is essentially setup as below. How can you add multiple items -DOM Nodes to content?
function setContentInfo(center, scale) {
    var popupDiv1 = document.createElement("div");
    popupDiv1.classList.add("mapViewLeft");

    var popupView1 = new MapView({
        container: popupDiv1,
        map: map,
        actions: [],
        center: view.center,
        zoom: view.zoom,
        scale:
            view.scale *
            2 *
            Math.max(view.width / 250, view.height / 250),
        constraints: {
            rotationEnabled: false
        },
        ui: {
            components: []
        }
    });

    var popupDiv2 = document.createElement("div");
    ...

    var popupMasterDiv = document.createElement("div");
    popupMasterDiv.id = "masterDiv";
    popupMasterDiv.style.width = "650px";
    popupMasterDiv.style.height = "450px";
    var theDiv = document.getElementById("masterDiv");
    popupMasterDiv.appendChild(popupDiv1);
    popupMasterDiv.appendChild(popupDiv2);

    // Return a dom node
    //return popupView.container;
    return popupMasterDiv;
}

To test, I have tried adding var test = document.createElement("div"); test.textContent = "Hey"; and then adding
   popupMasterDiv.appendChild(popupDiv1);
   popupMasterDiv.appendChild(popupDiv2);
   popupMasterDiv.appendChild(test);

but it puts the "Hey" in the middle of the 2 maps. I also tried adding the above straight to the content like this:
  content: setContentInfo(view.center, view.scale) + test,

But that removes the map content and only displays "Hey"
What I want is to add a nice little table in its own div under the maps with something like this. What am I doing wrong here; how can I achieve this:
var table1 = "

                  Location

                  Coordinates
                  Parcel ID

                 123.345, -43.432
                 12345

"


texts: Install a python package on an Esri Linux AMI instance

texts:
I have an instance of ArcGIS Server 10.3.1 running under my AWS account that I created using Cloud Builder.  That part went fine and I was able to ssh into the server as the 'arcgis' user without issue.

Now, I'd like to install some extra python packages via 'pip', but 'pip' is not installed on the image.  "No problem", I think, and fire off a

sudo apt-get install pip

which asks for a password for the 'arcgis' account.  I cannot find any documentation on the Esri Help site, nor via Google that discusses what the default password for this account is, and I did not have to enter it to log into the instance since I used a key file.

How does one go about gaining enough user privileges to install additional software in the Esri Linux AMI images?

Edit

I did see this questions, but that appears to be asking about the ArcGIS Server Manager application account credentials.


texts: Is there a way of getting map subsections referenced on main map in qgis?

texts:
Is there any way of getting subsections of a map as in, you have a larger map area in which you want to take out 3 smaller areas (A, B and C), you reference them on the "main map"

Currently I have people drawing the A, B and C areas on paint but is there a more direct way of doing it?


texts:
I have OL, GeoExt, gxp. I have a layer with Date attribute. So I want to show features with same date.

I found an example using gxp_playback, but it does not work because it can't find OpenLayer.TimeUnit.HOURS. I found some libraries that this example requires there but none contain OpenLayer.TimeUnit.

Am I searching for this in the wrong place? Or is this whole example bad and there is a simpler way to make timeline?

I found gxp_timeline in gxp docs but can't find any examples of how to use this.


texts: Dissolve taking a really long time ArcGIS 10

texts: I'm having an issue running several dissolves in both Arcgis 10.1 and Python 2.7.2, and 10.2.2 and Python 2.7.5 using arcpy.Dissolve_management (I'm working on 2 virtual machines). In both cases the dissolves are taking an extremely long time, sometimes multiple days. They do work eventually, but as I have several to do, I can't afford to wait days in between each run. I have 16GBs of RAM on each machine and I'm using x64 background processing. I thought it was file size at first, as some of my files are quite large, but I'm finding the same issue with files with as few as 100 features. I've tried Repair Geometry first, and I've made sure background geoprocessing is turned off. The files are in a file geodatabase.


texts: How to create multiple buffers based on a list of values?

texts:
I am looking for a method to buffer geometries by passing a list of buffer amount values in QGIS. The resulting polygon layers should be suffixed with the buffer amount by some way. By passing i.e. (10,13,15) I would expect the following result (drawn with inkscape):

What I have tried so far:

None of the tools available in QGIS (menu-bar and geoprocessing) accept input of such list.
The 'Multi Ring Buffer' plugin only computes equidistant buffers.
The following script does work so far, but QgsGeometryAnalyser.buffer() seems to lack a parameter for how many segments to approximate (thus, I'm getting nice 20-hedrons when buffering a point)

radiouses = [10.0, 13.0, 15.0]
for r in radiouses:
    shapeout = 'c:\\temp\\point_buf_%s' % r
    QgsGeometryAnalyser.buffer(iface.mapCanvas.currentLayer(), shapeout, r, False, False, -1)


texts: Extract Raster to Multiple Rasters by List of Values in R?

texts:
I'd like to use the Raster package in R to process a single DEM. I'd like to use a pre-determined list of elevation values to extract multiple raster datasets from this DEM. Not all values are of equal interval. For example, my DEM ranges between 5,000 and 6,000 ft. I'd like to use a pre-determined list of 10 values to clip this raster (similar to "extract by attribute" tool in Spatial Analyst). The values do not have equal intervals, for example:
5105
5225
5450
5500 . . . and so on...

At each step, I'd like to extract all values LESS than the specific value (e.g., where Value < 5,105).

If I were to do this manually, I'd set up a batch run to repeatedly use the "extract by attribute" tool in Spatial Analyst.  I don't want to do that. I will have a lot of input DEMs to do in the future and I'd like to develop a script to chug through these quickly.

Anyone have any ideas?

Edit - Here is my code (still need help with the for loop to create separate DEMs):

library (rgdal)
library (raster)
#Import the DEM
dem <- raster("Path/to/DEM.tif")
elevs = c(5175.5, 5176.50, 5177.0, 5177.25, 5178.00)

#Extract DEM at at elevations less than elevs list
#This can be done manually as follows:
dem.5175.5 <- dem
  dem.5175.5[dem.5175.5>5175.5]=NA

#Trying to do this iteratively through the list of elevs:
dem.copy <- dem
for (i in elevs) {
  dem.copy[dem.copy>i]=NA
}


texts: Showing Dynamic Text Based on a table value in a Time Map in ArcMap

texts:
I'm using ArcMap 10.7, and wanted to know if it's possible to show a value from a table on a map that corresponds to a time in a dynamic way.
Let's say my map shows the spread of Covid by zip code. As time progresses the map displays additional zip codes where covid cases appear. In the table of my shapefile, each row has the zip code, the date stamp and the total number of cases for that date.

I know in the time options you can display the time stamp on the map, but could I also display the Total cases for that particular time anywhere? Like as part of the legend?
I tried looking up information about using dynamic text, but I couldn't see anything for displaying a value from a table.


texts: Raster and shp overlap not working with user CRS mercator

texts:
I created a GeoTiff raster in python, that is projected with the following CRS:
*"+proj=merc +lon_0=34.9586601257 +k=1 +x_0=-0 +y_0=1453756.01544 +a=6370997 +b=6370997 +units=m +no_defs"*

When I load it in QGIS, I set project CRS from layer and enable on the fly CRS transformation. Then I open a shapefile of the country (Tanzania), but it doesn't overlap, even if I set the same CRS manually. I'm sure that the raster extent is correct. It looks that it is a problem from the shp.
Here is a sceenshot:
http://imageshack.us/f/193/wrongrastersinqgis.jpg/
It is working if I georeference my raster with decimal degrees WGS84... But not if I use the projection coordinates. That is strange. Screenshot:
http://img841.imageshack.us/img841/9500/rastersinqgis.jpg

I did the same with another raster I also created in python, that is projected with:
*"+proj=lcc +lat_1=51.4259986877 +lat_2=51.4259986877 +lat_0=51.5159492493 +lon_0=2.60400009155 +x_0=163358.880084 +y_0=163358.804499 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"*
And with this raster, I can properly overlap the shapefile of the country!

I don't understand why it is working with a CRS in lambert and not with a CRS in mercator.

Any idea?


texts:
I have a SpatialPointsDataFrame which refers to a city.I needed to perform a join with a dbf in order to attach the population column which i did with help from a couple of people from here. Next step is to take the settlements that contain population under 1000 people and perform the corresponding buffers of 500 and pass it the 0 rank, the 500 through 1000 and pass it the 5 rank and the >1000 and pass it the 10 rank.
i have to do the same for the rest of the population.

The problem here is that if i give 1000 to the rest of the city outside of the two buffers, what i'm going to do with the other 10's of more than 1500 and more than 5000.

If anyone has any idea feel free to say.

Here's my effort

cit<-readShapeSpatial("shp")
df1 <- read.dbf("2013Kpopulation.dbf") #import of dbf
m<-merge(cit,df1,by.x="COS",by.y="JDS") #join in order to make the "cit" contain the population
settlem.a1<-gBuffer(m[m$2013Kpopulation<1000,],width=500,byid=T) #500 buffer for under 1000 as the table says
settlem.a2<-gBuffer(m[m$2013Kpopulation<1000,],width=1000,byid=T) #1000 buffer for under 1500
settlem.a1$rank<-0 #
settlem.a2$rank<-5
m$rank<-10

Here's the table

               Population of cities        Distances     Ranks
                                             <500          0
                       < 1000               500-1000       5
                                             >1000         10

    ------------------------------------------------------------------------
                                            <750           0
                      1000-5000            750-1500        5
                                            >1500          10
    ------------------------------------------------------------------------
                                            <1500          0
                      > 5000               1500-5000       5
                                            >5000          10


texts: Changing symbology of selected features only using ArcMap?

texts:
Is there a way in ArcGIS Desktop 9.2 (ArcMap) to change the symbology of selected features, over multiple field values?

My example is, I've run an attribute query on the 'landscape categories' field of my shapefile, to find every feature in a category which includes the letters 'forest'. This includes categories which are essentially the same or similar enough that I want to display them as being the same, such as 'forestry', 'areas of forest', 'forest', 'forested hills'.... etc etc, there are loads.

I can select them all using this attribute query quite easily, but I then want to make them all green for example. I thought I'd be able to do this in my Properties > Symbology > Categories > Unique Values tab, by just right-clicking and selecting 'Properties for Selected Symbols', but apparently selecting features through an attribute query doesn't count as selecting symbols in this tab, i.e. nothing is selected,

Does anyone know an easy (code-free) way of doing this?

I know I could export my selection as a new layer, but I want to keep all my info as one shapefile and I'll need to do this for quite a few categories. I'm also not keen on the idea of adding a field in the attribute table for 'colour' etc, I'm trying to keep the original shapefile as clean as possible.


texts:
using QGIS 18.16
I am trying to figure out how to cal a reverse azimuth.  Basically the opposite direction.  So if i have a azimuth of 163, I subtract 180 which gives me -17.  I some how need to write a script or a field calc to then , for only the '-', numbers subtract that number form 360.  which would give me 343 as the reversed azimuth.


texts: Adding Raster to ImageServer: What are the Geodata Transformation Parameters?

texts:
I'm trying to add a raster image to an Image Service, via the Add Raster operation. My original image file is accompanied by a world file, containing the six parameters of an affine transformation. I want to use them in Add Raster's Geodata Transforms parameter to georeference my raster image.

Esri's documentation shows the following parameters for polynomial transformations (I want a first order transformation):

{
  "geodataTransform" : "Polynomial",
  "geodataTransformArguments" : {
    "sourcePoints" : [<sourcePoint1>, <sourcePoint2>, <sourcePoint3> ...],
    "targetPoints" : [<targetPoint1>, <targetPoint2>, <targetPoint3> ...],
    "coeffx" : [<coeffx11>, <coeffx12>],
    "coeffy" : [<coeffy11>, <coeffy12>],
    "inverseCoeffx" : [<inverseCoeffx11>, <inverseCoeffx12>],
    "inverseCoeffy" : [<inverseCoeffy11>, <inverseCoeffy12>],
    "spatialReference": {<spatialReference1>},
    "polynomialOrder": <polynomialOrder1>
  }
}

However, I don't understand the parameters coeffx, coeffy, inverseCoeffx and inverseCoeffy. Why are there only four / eight, instead of six? Esri's examples only show how to use the ground control points.


texts: How does [attributename] work in MapServer templates?

texts:
I have a template file that contains this line:
[item name="geographicalName"], [geographicalName]

The output is
π. Σπερχειός, [geographicalName]

That is, the tag [geographicalName] is output as is, it is not substituted.
Shouldn't it have the same result as the first tag in this case? Otherwise what does the documentation mean with the following?

[attribute name],[attrribute name_esc],[attribute item name_raw]
Attribute name from the data table of a queried layer. Only attributes for the active query layers are accessible. Case must be the same as what is stored in the data file. ArcView, for example, uses all caps for shapefile field names. Available only when processing query results.
By default the attributes are encoded especially for HTML representation. In addition the escaped version (for use in URLs) as well as the raw data is available.


texts: library to create static maps (an image) with custom map features

texts:
Do you know if there is a small library (preferably in python or java) around that allows the creation of static maps? Something where you can specific the URL of your TMS server, width and height in pixel, and a simple geometry (point or linestring) to be drawn on top?

I found staticmaplite in the OSM wiki which is acutally a very good starting point, but we do not support php in our stack.

Do you know any other projects in python / java that are available. Otherwise I will consider creating a clone of staticmaplite in python. But it would be better to build on something already available.


texts: Am I over-complicating adding and then calculating fields? Suggestions for a better way? (Python)

texts:
I'm attempting to re-position a question I asked yesterday here. I am starting to think that the way I wrote my code just isn't the best way. Am I overcomplicating things?

I know for a fact that adding a bunch of new fields and then calculating those fields based on the new fields is a common occurrence in GIS, so I just can't understand why it's so difficult to find out how to do it in a Python script. The following code is a snipet of what I came up with, but despite hours and hours of troubleshooting, I keep getting an error (although it did work on a small sample size). I'll paste the code first, and then the error below.

I'm receiving the error just after all of the fields are successfully added. I've done a number of things in an effort to troubleshoot, such as import all of my files into a geodatabase and run it from there; I've tested small samples of data (which does actually work, so I know the code "works"), and I've switched out fields I thought were problematic with other fields that were not. So far, I'm unable to run this code on all 108 fields that I'm trying to add and then calculate. Again, I receive an error just before it attempts to calculate the fields, and it seems to be referring to the line:
value = row.getValue(field)* row.anotherField

Any suggestions for a better way to do this??

Code snipet:

....

fc = arcpy.CopyFeatures_management(layerName, outFeatures)

#---------------------------------------------
# Add fields to a feature class:
#---------------------------------------------
fieldList = ["field1", "field2", "field3", ............., "field99"]  #<-- fieldList
fieldListx = []
for f in fieldList:
    fieldx = f+"x"
    arcpy.AddField_management(fc, fieldx, "DOUBLE")
    fieldListx.append(fieldx)

#---------------------------------------------
# Calculate fields:
#---------------------------------------------
rows = arcpy.UpdateCursor(fc)
for row in rows:
    for fieldx in fieldListx:
        field = fieldx.rstrip('x')
        value = row.getValue(field)* row.anotherField  #<--This is the line the error is referring to
        row.setValue(fieldx,value)
    rows.updateRow(row)
del row, rows

Error:

 Traceback (most recent call last):
   File "C:\GIS\1GIS_DATA\CUR_GIS\Election_Districts\Python and Tools\Join_Voter_Results_to_Allocation_Layer_and_Add_New_Fields.py", line 125, in <module>
     value = row.getValue(field)* row.UNpctOfEd #<--STOPS WORKING WHEN I ADD THE LARGER LIST!!!
   File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\arcobjects\arcobjects.py", line 944, in getValue
     return convertArcObjectToPythonObject(self._arc_object.GetValue(*gp_fixargs(args)))
 RuntimeError: ERROR 999999: Error executing function.


texts: How can I add users to the agsadmin and agsusers groups (ArcServer)?

texts:
I have a problem with adding users to the agsadmin and agsusers groups in ArcServer.
How can I do the step?

I've tried but I can't find it:
http://help.arcgis.com/en/arcgisserver/10.0/help/arcgis_server_dotnet_help/index.html#/Configuring_a_one_machine_deployment/0093000000m6000000/


texts: How to Release Locks on a featureclass in Arcpy

texts:
I am new with Arcpy, I have a code for scheme lock on featureclass, Please suggest me how to remove the lock.

import arcpy
from arcpy import env
import time
import datetime
import pyodbc
import ctypes
from datetime import datetime
from datetime import timedelta
import smtplib
import sys

#process: Lock Test on Feature classes
def CheckLock(FeatureClass):
    if arcpy.TestSchemaLock(FeatureClass):
        print "Lock..."
        sys.exit()
#Custom folder for SDE files to give the Python code access to databases - US4491
# DEV VARIABLES

EDIT_SA_DISSOLVE = "Database Connections\DEVESRISQL02_GISDB.sde\GISDB.DBO.CompassArea_1"
CheckLock(EDIT_SA_DISSOLVE)


texts: Reprojecting raster from 0 360 to -180 180 with cutting 180 meridian using gdalwarp

texts:
I have a geotiff raster image that has a coordinate system with longitudes from 0 to 360.
The horizontal center of the image is 180 longitude. See image below:

I want to transform it to EPSG:4326 SRS with -180 180 longtitude range.
And I want the center of the image to be at Greenwich meridian (0). I guess this srs is very widely used. I expect the result look like this:

So I use a gdalwarp command to reproject:

gdalwarp -s_srs '+proj=latlong +datum=WGS84 +pm=180dW' -t_srs EPSG:4326 test_col.tif test_4326.tif

But I only get a tiff with bigger dimensions (more pixels) and EPSG:4326 metadata. The image itself looks the same, as the initial one. But I expect it to swap the hemispheres.

How do I gdalwarp an image to be strictly -180 180 EPSG:4326 with the center in 0 longitude?

This is gdalinfo of my initial file:

Origin = (-0.102272598067084,89.946211604095552)
Pixel Size = (0.204545196134167,-0.204423208191126)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (  -0.1022726,  89.9462116) (  0d 6' 8.18"W, 89d56'46.36"N)
Lower Left  (  -0.1022726, -89.9462116) (  0d 6' 8.18"W, 89d56'46.36"S)
Upper Right (     359.897,      89.946) (359d53'50.18"E, 89d56'46.36"N)
Lower Right (     359.897,     -89.946) (359d53'50.18"E, 89d56'46.36"S)
Center      ( 179.8975000,  -0.0000000) (179d53'51.00"E,  0d 0' 0.00"S)

This is gdalinfo after gdalwarp

Origin = (-180.102727401932952,89.946211604095552)
Pixel Size = (0.091397622896436,-0.091420837939082)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (-180.1027274,  89.9462116) (180d 6' 9.82"W, 89d56'46.36"N)
Lower Left  (-180.1027274, -89.9699975) (180d 6' 9.82"W, 89d58'11.99"S)
Upper Right ( 179.8211116,  89.9462116) (179d49'16.00"E, 89d56'46.36"N)
Lower Right ( 179.8211116, -89.9699975) (179d49'16.00"E, 89d58'11.99"S)
Center      (  -0.1408079,  -0.0118929) (  0d 8'26.91"W,  0d 0'42.81"S)


texts:
In GPRMC there is a time field, called fix time. Can I consider this always the same as value from GPZDA time? Is there any possibility that when GPS device is configured to stream both GPRMC and GPZDA sentences, but their value will be different?

For my task it would be great if I could get time from GPRMC, however, I'm not sure if I can get consistent time value from there.


texts: Which image formats are supported by WMTS server?

texts:
I know WMTS sever delivers tiles. I am creating a generic WMTS client. I have following questions:

1) As per OpenGIS® Web Map Tile Service Implementation Standard, WMTS server can deliver tiles in which format?

2) How can I know the the supported image format which server supports through getcapabily request?


texts: Sextante in Qgis 1.9 alpha on Ubuntu can't find saga gis 2.1

texts:
I am using Qgis 1.9 on Ubuntu 13.04, Sextante is a core part of qgis now. I am trying to access the SAGA 2.1 libraries through qgis and I keep getting a popup window that says SAGA is not installed. I can run SAGA and it works. Normally, I would go into the sextante configuration menu and make sure sextante is looking the right directory (/usr/lib/saga) However, that part of the configuration menu is gone.

I went to the qgis options and checked the environment variables and I do not see one for saga, nor is it listed in the PATH variable. I tried adding in a SAGA path variable with no luck. Does anyone here know how to update or add a system variable to qgis 1.9 alpha so that qgis will know where saga is? The end goal will be the ability to have sextante properly access the saga libraries. Many of my Sextante modeller scripts rely HEAVILY on those libraries. I love qgis 1.9 and would hate to have to go back to 1.8 if i do not have to.

Thanks

EDIT:
I was able to install the nightly version of 1.9 alpha on my windows work terminal using the OSGeo4w installer. I went into the advanced install options and made sure I installed SAGA (2.0.8.3) at the same time. Same problem seems to be happening. Everything seems to be working just fine when. Based on these findings I purged everything off of my Ubuntu laptop and tried again ( this time installing SAGA first). Still my problem persist.

EDIT 2:

I installed the official release of Qgis 2.0.1 from the Ubuntugis unstable PPA today. In this instillation some of the dependencies are dated and can not be used with SAGA gis 2.1. Here is the error message containing the offending package names.

Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 saga : Depends: libgdal1 (>= 1.8.0) but it is not going to be installed
        Depends: liblas1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

The version of Libgdal1 that gets installed with qgis is 1.7.4 ( something less then 1.8 ) when I try to update these dependencies, it removes half of the dependencies used by qgis effectively removing it.


texts: How to offset points along a line in QGIS?

texts:
I used the "Profile from Line" plugin to create evenly spaced points along a line in QGIS, but I'd like to offset them to either side of the line.

I suppose I could draw two lines parallel to the existing one and create evenly spaced points along each of them, and then delete the new lines, but I'm curious if there is a different way to offset points the way I've shown in my MS Paint illustration.


texts:
For example I have rectangular polygon (4 vertices). I want to add mid-point on each line of the polygon, so in total now I have 8 vertices. And from them I want to build new polygon who will have same exterior footprint, but have 8 vertices:

What I did and it's not working (I want to do this on every polygon in my buildings.shp): (pseudo algorithm, I'm working with "WITH... AS")

Get all original vertices (The 4 black) ST_DumpPoints on buildings twice(!)
Prepare borders of the multi-polygon buildings as line-strings in order to apply ST_Line_Interpolate_Point-

All possible lines between same polygon vertices: ST_MakeLine(points1.geom, points2.geom) WHERE (points1.path <> points2.path) AND (points1.id = points2.id)

Buildings borders: ST_ExteriorRing(the_geom) ON (ST_Dump(build.geom)).geom AS the_geom

From lines @ 2 select only the border lines: St_touches(build.geom, lines.geom) AND St_touches(border.geom, lines.geom)=false AND lines.id = build.id AND lines.id = border.id --all points from same building, all lines from same building have same id belonging to the building

Get the mid points: ST_Line_Interpolate_Point(border_lines.geom, 0.5) (green points)

UNION points @ 1 and points @ 5

Now the problem is that I don't have any order in the points @ 6 so it's almost impossible to use ST_MakePolygon, and tricks with ST_ConcaveHull & ST_ConvexHull also not working because they ignores the mid point and eventually I return to where I started.


texts: Recording a track, not a polygon in QField

texts:
I researched the QField documentation, google, etc. but could not help myself.

My goal is to record a GPS track using QField.  However, the tracking function only seems to work in polygon layers. The recorded "track" resulting from this is a weird polygon shape of the track, not just the track itself.

In the bee farming demo it is also only possible to get the track as a polygon (tracking only possible in layer "fields").
I am assuming that this is just a user-error from my side, but I cannot figure out the problem.


texts: ArcGIS Desktop Extensions - turn on & off with keyboard shortcut?

texts:
I am familiar with assigning keyboard shortcuts for command in ArcGIS desktop. But, I'm trying to figure out if I can similarly assign keyboard shortcuts to turn specific extensions on & off, and if that is possible.
Using ArcMap, not Pro.


texts: Update column in CartoDB with value from another table

texts:
I am trying to update the column 'lt_dispatch_level' in my table "inland" with the values from another table "current_obs" that has a corresponding column 'lt_dispatch_level'.  However when I run this SQL query:

INSERT INTO inland
(lt_dispatch_level, timestamp)
SELECT lt_dispatch_level, timestamp
FROM current_obs;

I get the values from current_obs added in as a second row, with null values being aded in the first row.  I attached an image of what this looks like.

What do I need to change in my SQL query to get my values in the first row?


texts: Is there a way to merge polygons with the same values in a layer created from gdal.Polygonize()?

texts: i have a tif file which I polygonized using gdal.Polygonize() method. As a result I got a vector layer with millions of polygons and values from 1 to 255 in the attribute table. Although I don't mind such huge number of polygons I would like to merge those which have the same values in the attribute table. Could you tell me if there is a way to do it programmatically using any GDAL/OGR tools?


texts: Advanced Digitizing Panel Not Enabled When Map View is in Geographic Coordinates

texts:
I am trying to use the advanced digitizing panel with a new line geometry layer. I am using QGIS 3.0.3

The QGIS documentation states:

  "The tools are not enabled if the map view is in geographic coordinates"

But provides no information on how to set the "map view" to "geographic coordinates". When I attempt to use the advanced digitizing panel I am given a similar message, but with a bit more information "Change the coordinates system in the project". Yep, that's it, no information on how exactly to do that.

In CAD tools are not enabled for the current map tool the answer states that the panel works perfectly with "projected coordinates". I certainly believe this is true, but, once again, there is no information about HOW to switch to "projected coordinates".

BTW, I have searched the QGIS documentation, and there does not seem to be any reference to "geographic coordinate systems" or any instructions regarding them.

How do I change my project (or map view?) from "geographic coordinate system" to "projected coordinate system"?


texts: Plotting property surveys using AutoCad MAP2013 - Draw arc problem

texts:
This is likely a simple question that I just can't seem to answer.

I am plotting some surveys in AutoCad Map3D but I simply can't figure out how to draw an arc using survey coordinates.

The large majority of my surveys are straight lines which I input as [@distance, bearing] which works fine. How do I use arc coordinates (Arc,Radius,Bearing,Distance) supplied by the surveyor in my plotting?

I should mention that I am using shapefiles and creating new polygon features to store my boundaries.


texts: I have a shapefile with different polygons (basins) and a table with a list of species indicating the polygon name where they belong. I would like to know if there is any way to associate the shapefile and the list of species, in order to be capable of retrieving the list of species when I visualize the polygons in ArcGIS or QGIS.


texts:
I'm trying to create a survey with about 250 questions in ArcPad 10. Normally you would expect that a form you created in any application will be able to scroll in PDA if it is too long.  But the custom forms I create in ArcPad 10 just ignores the extra fields and doesn't scroll to them.
Did anyone come across this?

Thanks


texts: Calculating maximum distance between two polygons in meters using ArcMap?

texts:
I have two different shapefiles formed by polygons and I need to calculate the max distance of one polygon to the perimeter of the polygon of the other file. I need the output in meters!

The first shapefile contains buildings; the second one contains properties. I need to know the MAXIMUM distance between the PERIMETER of the building to the end of the property:

I was thinking of some possible solutions, but I have no idea if it make sense:

Maybe there is a way to assign to each building the property and then calculate the max distance?
Maybe I can transform the properties from polygons to lines, maybe this make the computation easier?


texts: Using gdal_translate to generate large raster from tile service?

texts:
I'm calling gdal_translate from the windows command line. My objective is to obtain a large geotiff, of a predefined region, from a Tiled Map Service (TMS) hosted at the University of Wisconsin.

When I run the following, I get a world map. My desire is to get an area of the Atlantic ocean off of the US east coast. (see example)

My GDAL_Translate command is:

C:\Program Files (x86)\GDAL>gdal_translate -of GTiff -outsize 2000 2300 D:\gdal_
example\ssec.xml D:\gdal_example\ssec.tif

My SSEC.xml is:

<GDAL_WMS>
<Service name="TMS">
<ServerUrl>http://realearth.ssec.wisc.edu/proxy/image.php?products=GLOBALnpptc&amp;x={x}&amp;y={y}&amp;z={z}&amp;time=2015-10-01%2012:00:00&amp;debug=false</ServerUrl>
</Service>
<DataWindow>
<UpperLeftX>-3294.54</UpperLeftX>  <!-- -85 -->
<UpperLeftY>589.29</UpperLeftY>    <!--  45 -->
<LowerRightX>3583.25</LowerRightX> <!-- -65 -->
<LowerRightY>5267.52</LowerRightY> <!--  22 -->
<TileLevel>20</TileLevel>
<TileCountX>1</TileCountX>
<TileCountY>1</TileCountY>
<YOrigin>top</YOrigin>
</DataWindow>
<Projection>EPSG:900913</Projection>
<BlockSizeX>256</BlockSizeX>
<BlockSizeY>256</BlockSizeY>
<BandsCount>3</BandsCount>
<MaxConnections>5</MaxConnections>
<Cache/>
</GDAL_WMS>

Desired output should resemble:


texts: How to infinitely extend MapInfo grid layer?

texts:
We use a semitransparent grid layer (.mig file) to show 'hotspot' intensity in MapBasic (MapInfo). Because the grid is just a rectangle, this looks ugly. See for instance:
.

Now MapInfo allows grid cells to be invisible (NULL), which would result in round-like hotspot regions.
But we would prefer to extend the grid. Of course we could just add extra rows and columns, but that would require a lot of extra memory. And it would still show a boundary at some zoom level.

Is it possible to infinitely extend a grid layer with a constant value?


texts:
I am new to using CartoDB and Torque, so I hope to find some help.

This is my datatable: https://docs.google.com/spreadsheets/d/1G3800dCZZUTJ7opAPp07whWDRU5BKNR1lm2I3DkF1yI/edit#gid=41188781

I want to create a visualisation with torque that shows the amount of Refugees (see column B-H) over the year (see Row 1) for each country (see column A). After importing, I cannot see the feature Torque in my wizard. Is there a certain structure I need to set up within the csv before uploading?


texts: Combining several raster files generated from polylines

texts:
Maybe I'm just missing the point somewhere...

I'm working on a path distance analysis, specifiying the cost layer. For this I have built a model, where I have roads and trails, both polylines, that I convert to rasters. Now I want to combine them to have one raster containing the values of the roads and the values from the trails. I am using the Raster Calculator (Map Algebra) just adding these two files (R1 +  R2).
Now it looks like only there the cells are added to each other where they are overlapping. In the Environments of the model I have set the NoData Raster Storage value to Maximum but it remains with a lot of empty (NoData) cells.

In former approaches I used to reclassify the raster, setting the noData values to 0 or 1 but now I have double-formatted values and the reclassifaction tool only allows me to put integer values as new values. I'm trying to avoid multiplying my raster and then deviding it again to reduce the risk of doing mistakes and to keep the values as clear as possible.


texts: Error 000204 using "Export Feature Attribute to ASCII" Tool on ArcGIS Server 10

texts:
I´m trying to export feature attributes to a CSV-File (on ArcGIS Server) to use them in other applications (using the "Export Feature Attribute to ASCII" Tool).
While the tool is working ok in a Desktop environment the published model always fails with the following error message:

ERROR 000204: Error creating input feature cursor

I have no idea how to deal with that or what might be the problem. Any suggestions?

Any help would be highly appreciated.


texts:
My aim is to generate maps of polling stations to helps electors find their local polling stations for elections in 2019 and onwards.

I've plotted and labelled 80 polling stations on a 'Polling Stations' layer.

I’m generating my maps using the Atlas feature in Composer, and I understand that the atlas takes the plotted points from my Polling Stations layer and puts them near the centre of the map, but I want to offset each centre point on a case-by-case basis to show more of the nearby roads, as below example:

Standard Export:

Desired Export:

I achieved the second map by duplicating my polling stations layer and treating the new layer as a 'Camera' - which seemed to work as it allowed me to go through on a case-by-case basis to generate the most user-friendly maps -

However I was then warned by our Corporate Database team that duplicating layers should only be used to change styling and that any changes made on a duplicate layer will cascade down and affect the layer that was duplicated.

This leaves me a bit stuck and I was wondering if there is an alternative approach to this - I had the idea of looking for an offsetting option within Composer but I'm quite confident that any changes made here will affect all 80 maps, which obviously will all need to be customised individually depending on the locations of the nearby roads.


texts:
I split sections of a roads on a map using polygons and now I would like to dissolve the roads within those polygons, but I only want to dissolve rows that have the same road name. (Roads are lines).

I'm trying to use the ModelBuilder(arcgis 10.1) to iterate through all of the different polygons and take the different road names, and if both of these conditions are met, the roads would dissolve. This is what I have so far (MACK is the name of a polygon), and it just runs as a constant loop, so I don't think it's right.]
  Dissolve parameters.


texts:
When using the Erase geoprocessing tool from the Analyst Toolbox I get the following error "ERROR 999999: Error executing function. The geometry is not M-aware Failed to execute (Erase)."

With small subsets of my data, there's no problem running the tool, but when I run it on the entire dataset it seems to give me the aforementioned error.
I have tried the following steps to try and fix the problem:

Repair Geometry of both of my polygon shapefiles
Turned off M-aware under my environmental settings

I am using ArcMap 9.31.


texts: Create a dynamic excel sheet linked to a shapefile's attributes

texts: I am trying to create an excel sheet that is updated automatically when the features of a shapefile are updated.  I know the shapefile's .dbf file is updated but I need the excel sheet to be formatted for presentation purposes (borders, bold meaningful column headers, etc).  Right now I have created an excel sheet that links to the fields of the dbf but that isn't perfect...ie when a feature of the shapefile is deleted you now have excel fields linked to dbf fields that no longer exist.  Does anyone have any better ideas?


texts:
I configured my Qgis Desktop with some configuration of Webmap Server (WMS and WMTS).

I can see them in

Option > advanced > Qgis folder

How it is possible to get and share all of theses parameters for different desktop ? are there in sqlite.db or a config file in my locals ? I didn't find them.

My wish is to make different configuration from my desktop and share them.


texts: Writing compressed vector data for access in QGIS

texts:
I'm trying to find an optimum vector file format to be used to effectively store data (compressed binary?) and select subregions.

I have a quite large ascii point file containing 3 columns (x and y projected coordinates and the point ID). A test file is about 20MB, containing approximately 600000 points, but I plan to create even larger files with significantly more points. After writing those files to ascii, I'm searching for a way (i.e. file format) to store the data more effectively while still allowing for the following two tasks:

the files shall be loaded into QGIS (v2.14.17)
subregions shall be selected (e.g. via GDAL/OGR v2.1 "ogr2ogr -spat") and rewritten in the original ascii format

Do you have any suggestions, which file format shall be used here?

EDIT:
Just to add some more information the data looks like

CoordX,CoordY,ID
1200400,-399600,1
1201200,-399600,2
1202000,-399600,3
1202800,-399600,4
...

I've created a VRT file as follows:

<OGRVRTDataSource>
    <OGRVRTLayer name="points">
        <SrcDataSource>points.csv</SrcDataSource>
        <GeometryType>wkbPoint</GeometryType>
        <LayerSRS>EPSG:3031</LayerSRS>
        <GeometryField encoding="PointFromColumns" x="CoordX" y="CoordY"/>
        <Field name="X" src="CoordX" type="integer" />
        <Field name="Y" src="CoordY" type="integer" />
        <Field name="ID" src="ID" type="integer" />
    </OGRVRTLayer>
</OGRVRTDataSource>

As Luke suggested (What format to use for highly compressed vector data?) I tried SpatiaLite with compressed geometry:
ogr2ogr -f SQLite -dsco SPATIALITE=YES -lco COMPRESS_GEOM=YES -lco COMPRESS_COLUMNS=x,y,id points.sqlite points.vrt but the result was a 90MB file (compared to 14MB of the now slightly modified CSV-Input).

Playing around a bit showed, that leaving away the -lco COMPRESS_* did not have any effect on the 90MB file size. Instead, leaving away -dsco SPATIALITE=YES resulted in a 26MB file (I know, this is not SpatiaLite any more). I'm working on Ubuntu 14.04. GDAL 2.1.0 was installed using the UbuntuGIS-PPA. Is there any additional package (besides libspatialite5 v4.1.1) necessary to enable compression in SpatiaLite?


texts: IR as 4th band in RGB composite (ArcGIS)

texts:
In Symbology tab of a raster in ArcMap, in the section of Pan-sharpening, there is an extra option to check at the bottom: "4th-band Infrared Image" along with its weight:

I guess I have to add a 4th band while using "Composite Bands" tool, then give it a weight and so I will be able to see RGB mixed with IR view.
What is the difference or advantage of using it over eg. CIR or 5-4-3 (Landsat 8)?


texts: Using Standard and Maplex Labelling Engines at same time?

texts:
Is there any way to have one layer using the Maplex Labelling Engine for labeling and another layer using the Standard Labelling Engine at the same time in ArcMap?

https://www.dropbox.com/sh/iwfuysjnx4n732x/AAC6LFDz07N-PfL2-1hJltXZa

I have uploaded multiple screen shots. Mainly I am trying to be able to have all of the labels line up in the gorman shopping center. And I want to be able to see all the labels.


texts: How to completely uninstall and remove ArcGIS 10.3.1

texts:
I recently intalled ArcGIS10.3.1 on my Win10. Initially I was able to use it to do everything before now. Now it comes up with a "crash" window each time I want to add a base-map, open raster data. the report window also doesn't come up anymore. This is why I want to completly uninstall and then reinstall.

However, I am still able to open Vector data but it loads without basemap.

what I have done:
1. Deauthorised and run repair installation.
2. used Uninstall utility on esri site but couldn't remove any ver above ArcGIS10.0


texts: Why might third-party extension be missing from Extensions dialog of ArcGIS for Desktop?

texts:
I have just installed a third-party extension to ArcGIS Desktop 10.3 (Land Change Modeler for ArcGIS 2.0, essentially IDRISI ported to ArcGIS, as far as I know). There were no error messages during installation, and nothing to indicate that the extension was not installed properly. Yet, when I opened ArcMap and tried to activate the extension, it was not one of the choices under Customize --> Extensions.

Obviously, ArcGIS Desktop 10.3 is blissfully unaware that LCM is installed on my machine. Is there any way to manually register the extension with ArcGIS? Both the LCM an the ArcGIS files are installed in folders in the Program Files (x86) directory. Clark Labs, the maker of the extension, told me that this (and not somewhere inside the ArcGIS folder, for example) is the right location for them.


texts: At what level is OGRSpatialReference defined for vector datasets?

texts:
I'm creating a c++ library that needs to communicate with the gdal/ogr world through its c++/c API. I'm relying on gdal 2.0+, and while I like the integration between the raster and vector portions of the library, there are a few points on which I'm confused. One of these points concerns how OGRSpatialReference instances are associated with GDALDatasets, GDALRasterBands, OGRLayers and the like. From the documentation, it seems clear that on the raster side, the OGRSpatialReference is directly associated with the GDALDataset and all GDALRasterBands belonging to a dataset are required to share the owning dataset's OGRSpatialReference. It is less clear that this is the case on the vector side. It's also unclear to me what the relationship is between a projection reference and a spatial reference in the context of the gdal API. So my questions are:

Does GDALDataset::GetProjectionRef() give the WKT string necessary to construct an OGRSpatialReference for non-projected geographic reference systems? I presume it does, but would like to confirm.
Are all OGRLayers belonging to a single GDALDataset required to share the same spatial reference?
Can I always get the OGRSpatialReference for an OGRLayer from the owning GDALDataset with GDALDataset::GetProjectionRef(), or is it possible that I'll encounter datasets for which I'll need to get a layer's spatial reference directly from the layer with OGRLayer::GetSpatialRef()?


texts: problem deleting shapefiles because still in use by arcpy cursor

texts:
I have a function outputTblContents which contains

def outputTblContents ( path ):
    rows = arcpy.SearchCursor(path, fields="alpha; beta")
    for row in rows:
        print("{0} => {1}").format(row.getValue("alpha"), row.getValue("beta"))

The function that called outputTblContents then tries to delete the folder that path is in, but is unable to because it’s still in use by the script. I guess arcpy.SearchCursor spawns it’s own thread. How do I wait for it to be finished so I can safely delete the shapefiles and clean up?

outputTblContents(pathToShpfile)
shutil.rmtree(pathToTempDir)

Here is the error
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: '\\\\storage1\\gis\\dev\\temp\\ collated_a1.shp….sr.lock'


texts:
I am trying to do supervised land use classification in a certain region. As this region is naturally prone to clouds, I have filtered the image collection on images with less than 10% cloud cover and afterwards I took the median image of the least clouded season to further remove influence of clouds and cloud shadows.

However, now, the quality of the image has reduced significantly, which makes it very difficult to use it for further land use classification.
What could I change to obtain a cloud free image with less loss of image quality?

var collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_RT_TOA')
  .filterBounds(aoi_2)
  .filterDate('2017-01-01', '2017-05-31')
  .sort('CLOUD_COVER')

var withcloud = collection.map(function(image){
  var cloud = ee.Algorithms.Landsat.simpleCloudScore(image).select('cloud');
  var cloudiness = cloud.reduceRegion({
    reducer: 'mean',
    geometry: aoi_2,
    scale: 30,
  });
  return image.set(cloudiness);
})

var collection_filtered = withcloud.filter(ee.Filter.lt('cloud',10));
var image_median = collection_filtered.median();
Map.addLayer(image_median, {bands:['B4','B3','B2'], max:0.3}, 'median image');


texts: Changing colors of edit fields in attribute table?

texts:
Does anyone know of a way to change the background color of fields in the attribute table window whilst in edit mode?

I need this because I am manually editing hundreds of point attributes and it would be very helpful for efficiency to somehow mark which attributes are required and which ones are optional


texts: Saving HTML text permanently in map tip display text

texts:
I have used the map display text in QGIS to add HTML which enables me to view images related to a point feature when i hover the mouse over it.

However I have realized that I have to rewrite the code each time I reopen the layer.

Is it possible to save it in such a way that it is permanently saved in the layer properties?


texts: esri.tasks.PrintTask won't print WMS layers hosted by non-ESRI servers

texts:
I'm using the ESRI Javascript API. My esri.Map is successfully displaying WMS layers via esri.layers.WMSLayer. Some of the WMS layers are hosted by an ArcGIS Server and some are hosted by non-ESRI servers. But when I print using esri.tasks.PrintTask, only the WMS layers hosted by ArcGIS Server are visible. The WMS layers hosted by non-ESRI servers don't show up.

Has anyone succeeded in printing a WMS layer which is hosted by a non-ESRI server?

-Rick


texts: Is it possible to compile a grass addon into a commandline app?

texts:
As the title says, I'm wondering if it's possible to take the source of a grass add-on and compile it into a commandline app.

Or, alternatively, use the add-on in a python program.

Basically, I don't wish to use grass but I do want the power of an add-on for use in a separate program.

thanks!


texts: Pre-processing OpenStreetMap upload to support tag with colon?

texts:
I want to upload some point features for trees to OpenStreetMap (with the tag natural=tree, see link).

I typically would use JOSM to do this type of update. But, is there an easy way for me to pre-process my data so that the species:en field is recognized? Shapefile fields cannot have colons.

My typical workflow is basically this:

prepare my data (shapefile) in QGIS
open the file in JOSM
(make adjustments in JOSM)
upload data