texts: Unknow error connecting from ArcCatalog to Oracle

texts:
Currently I am running ArcMap 10.6.1 and try to connect with an Oracle 19c database. Unfortunately I only see "Unknown Error":
Underlying DBMS error[Unknown errorNo extended error.]

Yet I think, there should be everything in place from a patch-level perspective:

I am also able to connect with the database using sqlplus via cmd and a tnsping from cmd also works just fine on the relevant port.
Are there any suggestions where I could find a log and does anyone know about a fix of this issue?


texts: java.lang.NullPointerException with GeoServer and Postgis

texts:
I am continuing work that another person began based on Geoserver and postgis. On the database level there are many tables and the layers are views based on these tables. That is working great!

Now I want to create some other tables and views. I have also been adding them to GeoServer. In order to check if this is working I selected the Layer Preview opyion and I clicked on Open Layer in the Common Formats column. The result is that a popup is displayed to download an XML file, but when I open it, it says:

<ServiceExceptionReport version="1.1.1">
    <ServiceException> java.lang.NullPointerException null </ServiceException>
</ServiceExceptionReport>

For the layers created by the other person, this works fine. I compared two layers and they seem to be similar, so what am I doing wrong?

PS: All layers are converted from shapefiles to postgis.


texts: Setting method in Near Analysis using ArcPy?

texts:
Created a script for Near Analysis, but my distance field, whenever calculated produces values from the Geographic Coordinate System that my features were produced through. I read that if you set the method to geodesic, it will instead let you do miles which is what I want. However, when I try doing that, I get an error. Is there something wrong with the way I wrote my code?

This is it:

import arcpy
import sys

inFc = sys.argv[1]
nearFc = sys.argv[2]
distance = sys.argv[3]

arcpy.Near_analysis(inFc, nearFc, distance, "Geodesic")


texts: I did an address locator on ArcMap and I published the geocode service on ArcGIS Server. When entering the long/lat I got the address but when trying the reverse geocode it didn't get the address.


texts:
I have lat longs and want R to return a column of the neighborhood tabulation area for each point;
lat           long           NTA
40.79127    -73.96484       Morningside Heights
40.72622    -73.98380       East Village
40.79196    -73.96809       Upper West Side


texts:
I am making an Android app that has bathymetric lake data on a google map. I am new to GIS work. I get this info from the state of nebraska as an already formatted kml file.

In the file they simply have LineStrings, but I have manually converted them to Polygons. I want a visual that clearly shows depth of the lake at a glance.

The simple solution I came up with uses a blue color for the polygon fill and an alpha of "11". I love this approach because it still shows map features through my polygons while still showing depth well. Each successive polygon shows as a darker and darker fill conveying depth quite well. Alas, the problem is that sometimes some of those polygons are actually shallower and not deeper.

For instance, below are two screenshots. The first is the way it should look where there is a small underwater "island" (I manually edited the file). The second screenshot shows what it looks like if I simply use the default alpha and color for each polygon.

Correct way

Incorrect way

I cannot edit each kml file manually as there will eventually be thousands of lakes with more added over time.

Is there a known good way of solving this type of problem?


texts: Supress the message of a new QGIS version in QGIS 3.4 by changing a Windows registry key

texts:
In QGIS you can supress the message of announcing a new Version by changing the value of checkVersion parameter from true to false inside of QGIS.

In version 2.18 there is a corresponding Windows registry key and a administrator can change it without user action.

In version 3.4.1 i could not found a corresponding registry key.

How can i solve the Problem with QGIS 3.4.1  without user action?


texts: Create spatial polygon grid from spatial points in R

texts:
I am trying to recreate a map in R. I need 2 by 5 degree grid cells across the contiguous United States, but plotted in Albers Equal Area. The result is a grid with curved lines and slightly variable grid size, so I assume I cannot use a raster. I am able to reproduce the points, but not the grid. How do I make grid
(polygon) lines for these points?

library(raster)

e <- as(raster::extent(-125, -65, 25, 49), "SpatialPolygons")
grd_lrg <- as.data.frame(makegrid(e, "regular", cellsize = c(5,2)))
names(grd_lrg)       <- c("X", "Y")
coordinates(grd_lrg) <- c("X", "Y")

# add projection information to the empty grid
proj4string(grd_lrg) <- CRS("+init=epsg:4326")

# transform to equal area Albers USGS
grd_lrg <- spTransform(grd_lrg, CRS("+init=epsg:5070"))

# plot it
plot(grd_lrg)

If I create the grid in Arc Map using Create Fishnet (Data Management) with the WGS84 coordinate system and import it into R, I get a nice looking grid:

But converting it to Albers Equal Area with spTransform creates major distortions of the lines:

So I am thinking I need to convert the points to Albers first and then add the lines?


texts: GEE - Using Savitzky-Golay filter over an Image Collection

texts:
I'm trying to generate a smoothed MODIS(MOD11A2) time series by using the Savitzky-Golay filter.

There is this github repo https://github.com/Fernerkundung/EarthEngine_scripts/blob/master/savitzky_golay_smoothing.js, which run a simple implementation of Savitzky-Golay smoother but not fully developed as to process a whole image collection. The input data is a sample of numbers in a list format. My questions are (a) how can I extract each pixel time profile of my image collection in a list format so I can make it as input data (b) how can I iterate to the whole image extent? (c) Does anyone know another way to work with this filter in GEE?

var geometry = ee.Geometry.Rectangle([-65.2,-33.4,-65.8,-33.2]);

// Clip
var clip = function(image){
  return image.clip(geometry);
};

// Import MOD11A2
var temp = ee.ImageCollection('MODIS/006/MOD11A2')
    .select(['LST_Day_1km'])
    .filterDate('2001-01-01', '2018-12-31')
    .map(clip);


texts: Checking if value from one column is in multiple other columns

texts:
How do you write an expression for a style rule that will check if the value from column A exists in columns B, C, D & E?

I have a polygon layer that I would like to flag with a style depending on whether the values from column 'MH#' are found in any of the 'MH1-MH4' columns.

Example:

record 39: MH# 883031 is found in the MH2 column of record 38, I'll make it red.

record 42: MH# 883777 is found in the MH1 column of record 37, I'll make it red.

record 37: MH# 882516 is not found in any of the MH1-MH4 columns, I'll make it yellow.


texts: CMV streetview widget a violation of Google API Terms of service?

texts:
Information I just received from the state states the ESRI has to remove their street view widget from (I assume) ArcGIS online. This is the post on GEOnet: https://geonet.esri.com/docs/DOC-2991?messageTarget=all&start=100&mode=comments

Should I remove it or be concerned?


texts: I use geoserver + openlayers. The problem is that WFS geojson layer has over 10000 objects and when i'm trying to see the map through web-browser it works very slow and laggy. How can i speed it up?


texts: Z value rounded by ArcGIS while executing "Add XY coordinates"

texts:
I have a large vectorda (point) dataset in ArcGIS Desktop 10.3.1 File Geodatabase that consists of 1,2 billion points that I created, converting it from ASCII file by "ASCII 3D to Feature Class tool". Now I'm trying to add X, Y and Z coordinates to the point dataset with the tool "Add XY Coordinates", but the problem is that all Z values in the end are being rounded to integers (I mean, the data field is double, but none of the Z values have decimal symbols) even though the source ASCII data stores Z values with 3 decimal symbols.

As with smaller data samples I've never encountered such a problem, can the problem be the sheer number of points (that actually takes 13 hours to process in both performed conversions)?

There's not much options to do it wrong- in the screenshot below are the options I used in "ASCII 3D to Feature Class" conversion and the "Add XY Coordinates" tool has no options in the main window at all.


texts: Can I ignore the installation warning `Windows Defender SmartScreen protected your PC` when installing QGIS 3.10 LTR?

texts:
I have downloaded the QGIS 3.10 LTR version and when I try to install it, a Windows message appears saying that Windows Defender SmartScreen prevents my PC from installing this software. Why do I get this message and is it safe to ignore this?

I could not find anything online about this issue, other than a tweet of someone having the same issue.


texts: Calculate field of view / angle of a point to a shapefile

texts:
I am trying to automate a calculation of the blocked fraction of a field of view from a point to a shapefile. I.e. find α in

, such that α / 360 gives me the fraction of the field of view covered by the shapefile in reference to the total field of view.

I know ArcGIS features a 'field of view' based on a DEM/raster (right?), but I am looking for a simpler application, between a simple point and polygon shape.

Is anyone aware of software / a function that is able to do this? It is very easy to do by hand, but I need to process roughly 250 cases, so I thought I'd better ask for other suggestions :)


texts: OpenStreetMap content in commercial applications

texts:
I was considering the use of the OpenStreetMap API to retrieve vector features and combine them with other source data through a commercial tool. However, OpenStreetMap uses the Creative Commons Attribution-ShareAlike 2.0 (CC-BY-SA) license for its vector feature data. The OpenStreetMap copyright page mentions that:

OpenStreetMap is open data, licensed under the Creative Commons Attribution-ShareAlike 2.0 licence (CC-BY-SA).
You are free to copy, distribute, transmit and adapt our maps and data, as long as you credit OpenStreetMap and its contributors. If you alter or build upon our maps or data, you may distribute the result only under the same licence.

Does this mean that any item produced with OpenStreetMap data would need to be shared through CC-BY-SA? I do not want to place such restriction on our users, since they may combine OSM data with data that has distribution restrictions. I also wonder if people that use the OSM file import capabilities of several GIS tools are aware of the OpenStreetMap content license.


texts: Making 3D "wall" from elevation points using ArcGIS 3D Analyst?

texts:
I went for a jog around the block using my GARMIN GPS.  Then, I downloaded the GPX file and converted it to a feature class.  The attributes for the points contain lat/lon & elevation (feet).

I am trying to accomplish the following using the ArcGIS 3D Analyst extension:

I'm not certain, but I need to:

Convert the points to a polyline with retaining all the elevation
Extrude the line in ArcScene so it displays as a 3D wall.

As you can see, the base height for the wall is all the same, because it's displayed as dark blue.  As the elevation changes, the colors become lighter.

I have access to all the extensions (3D Analyst, etc).


texts: How do I start a MapProxy Instance in the background?

texts:
I use the following command in linux with an "&" hoping to be able to close that putty session but "&" doesn't seem to work with this command :

sudo mapproxy-util serve-develop mapproxy.yaml -b 0.0.0.0:8010

When I run the above command with an "&" I get the following output (instead of a MapProxy instance startup log) :

  [1] 30354

When I then do a ps aux | grep 8010 it gives the following result:

  root     30354  0.0  0.1  49252  3488 pts/0    T    15:23   0:00 sudo mapproxy-util serve-develop mapproxy.yaml -b 0.0.0.0:8010

And when I try to access MapProxy demo page it gives:

  "This site can’t be reached"


texts: What are the formulas used in SAGA Ordinary Kriging?

texts:
can some one name the formulas avaible in the Ordinary Kriging Modul of SAGA:

What ist the exponential, spherical, Gaussian-Model, etc.?


texts:
Can a "select similar" right click (two clicks total) like in AutoCad be created in ArcGIS as an addin or something python-related?
It is listed on their "ideas" page here:
arcgis ideasSelect same/select similar


texts:
What services provide realtime (or daily-updated) basic traffic informations for Western Europe ?

For example, traffic.com/Navteq provides such data to Bing Maps for US/Canada and Microsoft suggests CENTRICO/OTAP for Europe in its documentation (which is outdated, EasyWay seems to have replaced this service), but its website is slightly confusing.

Are there other major actors in this market for Europe ?

For example, One Step Ahead seems to provide [free] data for Germany, Netherlands and Belgium, but it's a single file per country (hence not tiled data), and I'm not sure how often it is updated.


texts: Openlayers: keep polyline horizontal when panning

texts:
I posted this question at Stackoverflow, but I'm thinking this is a more suitable place...

I'm sure this is possible -- I just need pointing in the right direction (no pun intended).

I've got a bunch of linestrings in GeoJSON which I'm displaying in OpenLayers 3 (or 4). I'd like to be able to select a particular linestring then zoom in to a fixed level and keep the linestring as horizontal as possible as the user pans the map.

I'm thinking this is similar to the Geolocation Tracking (https://openlayers.org/en/latest/examples/geolocation-orientation.html?q=orientation) example, but I can't get my head around it.

I can't really provide a fiddle as I'm still at the 'working out how to approach this' stage. But, imagine you want to allow a user to pan along a road, but keep the map rotated so that the road always remains horizontal. Somehow automatically adjusting the map rotation after each pan.

I'm thinking it's got something to do with calculating the bearing of the selected polyline at the extents of the current view, but I have no idea how to do this.


texts: Is there a way to render lines with a smooth (bezier) curves in QGIS?

texts:
I am moving from creating maps with Illustrator to making them with QGIS and actual data. One of the things I haven't been able to re-create in QGIS are the smooth curved lines I can get in Illustrator. I am not talking about Join and Cap Styles, but how an entire line is rendered.

I am looking for an answer that doesn't include exporting as SVG to Illustrator and finishing the map there.

Also, I realize they could be considered an inaccurate representation but, for the most part, these maps are for giving riders an idea of where they are and don't necessarily have to be an exact representation.

Here is an example of what I mean:


texts: Program crashed when using the function CPLString in GDAL

texts:
When I use the function CPLString in GDAL, the program crashes. Why is this happening? (I use GDAL Library in vs2012 with C++).
For example:

   const char* str = "Test";
   CPLString cplString(str);
   cplString.tolower();


texts: How to load raster data with hyperlink path in ArcGIS MXD?

texts:
I have a problem/question and hopefully someone of you is able to help me:

I have thousands of georeferenced raster files which have corresponding polygons (outer borders of rasters) with a hyperlink in the attribute table to open them in an image viewer. Now I want to load a raster (through selection or whatever) directly with the hyperlink into an MXD Document.

One possibility is:

arcpy.MakeRasterLayer_management("G:\\TIFF\RasterXY.tif", "Test")

But now I have only a temporal layer which does not really fit my needs... Maybe someone of you has an idea/solution how to solve this problem.

I tried some things but without any success... Here is my code till now:

import arcpy
data = "Polygone_31-4493"
rows = arcpy.SearchCursor(data, "location")
     for row in rows:
     cursor_path = row.getValue("location")
rows = arcpy.SearchCursor(data, "location")
     rows = arcpy.SearchCursor(data, "image")
     for row in rows:
     cursor_image = row.getValue("image")
arcpy.MakeRasterLayer_management(cursor_path, cursor_image)

Maybe you have some ideas for this.

After several tries I don't think I will work. Maybe someone has another idea how to do this.

fc = "Shapefile"
path = "location"
image = "image"

path = [row[0] for row in arcpy.da.SearchCursor(fc, (path))]
image = [row[0] for row in arcpy.da.SearchCursor(fc, (image))]

# Enconding the 'u
new_path = [str(item) for item in path]
new_image = [str(item) for item in image]

arcpy.MakeRasterLayer_management(new_path, new_image)
Runtime error
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 6198, in MakeRasterLayer
    raise e
RuntimeError: Object: Error in executing tool

I would appreciate any kind of help!


texts: Performance difference between focal statistics (ArcGIS) and neighbor (GRAS or QGIS)

texts:
I tested minimum, maximum, and average neighbor (circle radius = 161 pixel) using ArcGIS, GRASS and QGIS:

ArcGIS (10.1): it takes only one minute
GRASS (6.4.3): it takes 123 minutes for every output
QGIS (2.8.1): it takes 123 minutes for maximum and average and I have
no output for minimum

So why does this process takes a lot of time on GRASS and QGIS?
Is there any may to make this process very fast?

Raster type: Aster GDEM with 30m resolution and 16M of pixels

-The number of rows and cols is (X: 3687 Y: 3965)


texts: Import ArcInfo licence when required by tool in ModelBuilder?

texts:
Is it possible to check licences in/out as needed within modelbuilder? or will the following work -write a script to turn arcinfo licence on when the tool requires it and off once it's done?

I need to run a complex model on 100+ segments of data on multiple machines concurrently and we have only one arcinfo licence which is required only by the eliminate tool. Each segment takes about an hour which is approx 100hrs of processing time. We don't have this much time so need to split the process into 6 machines running the arcview licence...the blocker is one-step needing arcinfo. As the machines will need the licence for only 10mins or so at differeing times, I want to get the model to run in arcview upto the eliminate, check-out arcinfo (or if unavailable keep checking every 5 mins), finish the tool and then check-in the info licence so another machine can take it and continue.


texts: Add label/text to esri.symbol.PictureMarkerSymbol

texts:
How can I add label or text on the ESRI's PictureMarkerSymbol (Javascript API)?

I could use any other marker as well that support labels.


texts: ArcGis Server: Separate Virtual Directories for Services?

texts:
This is a Windows system. As we know, ArcGIS Server creates a default 'arcgis' virtual directory in IIS and that becomes the starting point for various services. While that is a convenient 'one size fits all' kind of a solution it doesn't help trying to secure some web Services which should be only accessible from within the intranet while still enabling other Services to be accessible from the outside.

So what we need is a way to create different virtual directories in IIS for the Services which would need enhanced security. If we could create a different virtual directory for a secure Service then we can simply use IIS's domain/ip based restrictions on that directory to limit to only the intranet IPs. Is that even possible in ArcGIS Servers?

Perhaps, some other option could be to somehow use URL redirect/reverse proxy or use a Service's own security for some role/user based one--but that would require Active Directory on the server and sounds complicating to setup?


texts:
I have some scripts that make symbology for different layers in my TOC.
And now I want to merge them into one big script which should have parameters chosen by user to start certain part of script.
For instance I have three layers: GGG, DDD, DDA. The whole script contains code to make symbology for all these layers.
But is it possible to make something like this?

If box "DDD" is checked script run the part of it which will paint only DDD layer.
If it is possible what kind of code I should add to script?

Updated code:

for s in selected:
    if selected == "DDD":
        arcpy.AddMessage("Making a DDD")
        ary = arcpy.mapping.Layer(r"\\SRV-NAS-03\Projects\FIAS_MultiPART.lyr")
        arcpy.mapping.AddLayer (df,ary,"AUTO_ARRANGE")

arcpy.RefreshActiveView()
arcpy.RefreshTOC()

It is taken from this answer to Unable to Provide Input for a MultiValue Parameter Script Tool


texts:
How to change the "W" (English) to "O"(French) on the North Arrow direction using ArcMAP 10.0?
I tried to convert the North Arrow sign to graphic but it didn't work.


texts: How to make Carto API calls with TLS 1.0 disabled

texts:
We are discontinuing use of TLS 1.0 on our servers.  This seems to have caused problems communicating with the Carto APIs.  (The problem has become apparent when accessing the SQL API, but I wouldn't be surprised if the same problem is apparent with the other APIs, once we get past this exception.)

This exception is thrown when calling the SQL API:

User:[Unknown]; Message:System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a receive. ---> System.ComponentModel.Win32Exception: The client and server cannot communicate, because they do not possess a common algorithm
System.Net.SSPIWrapper.AcquireCredentialsHandle(SSPIInterface SecModule, String package, CredentialUse intent, SecureCredential scc)
System.Net.Security.SecureChannel.AcquireCredentialsHandle(CredentialUse credUsage, SecureCredential& secureCredential)
System.Net.Security.SecureChannel.AcquireClientCredentials(Byte[]& thumbPrint)
System.Net.Security.SecureChannel.GenerateToken(Byte[] input, Int32 offset, Int32 count, Byte[]& output)
System.Net.Security.SecureChannel.NextMessage(Byte[] incoming, Int32 offset, Int32 count)
System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
System.Net.TlsStream.BeginWrite(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback asyncCallback, Object asyncState)
System.Net.ConnectStream.WriteHeaders(Boolean async)     --- End of inner exception stack trace ---
System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar)     --- End of inner exception stack trace ---
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
{error in our code}

Is TLS 1.0 a known requirement, and if so, is there any workaround?


texts: ArcMap10 using Feature to Line to simplify dual carriageways

texts:
I need to clean a roadmap shapefile to replace all dual carriageways (DCs) with single lines.  The Feature to Line tool nearly works, but is destroying some of the road links.  My current workflow (since the tool doesn't discriminate between lines of different attribute) is based on a strategy of splitting the shapefile into two - one with the DCs and roads they link to to process, and another with everything rest to be rejoined at the end.  Specifically:

use a buffer Select Layer by Location to identify all roads within 1 meter of a DC
create new DC layer from selected features
apply Feature to Line tool to the DC layer with an approx 25m XY tolerance (max distance between carriageway lanes)

However I'm finding that the new simplified DC line objects (typically the roads that linked to DCs) do not properly match up with their continuations in the untouched layer.  To illustrate:

Very grateful for any suggestions on how to approach this so the links with the grey roads are maintained. Thanks in advance.


texts: Creating RGB composite using GDAL: resampling?

texts:
I want to use gdal_merge.py for creating rgb composite from 3 bands with the same qualities (resolution, crs..), but here I found that gdal_merge.py is using nearest neighbor resampling method.

Is resampling used also in my case, when bands do have the same resolution? Is there better way to create composite using gdal?

Afterwards I want to use gdal_pansharpen.py, what about resampling there?


texts: random sample of raster cells based on multiple classes in R

texts:
I have a raster dataset that is classified into vegetation classes. I would like to randomly sample from the dataset based on the vegetation classes, but not sure how to do it.

Here is some example code taken from the deratify() function in the package raster.

library(raster)
r <- raster(nrow=10, ncol=10)
r[] = 1
r[51:100] = 2
r[3:6, 1:5] = 3
r <- ratify(r)
rat <- levels(r)[[1]]
rat$landcover <- c('Pine', 'Oak', 'Meadow')
rat$code <- c(12,25,30)
levels(r) <- rat
x <- deratify(r, 'landcover')

What I would like to do is to sample N number of cells (or points) from each class in x (Pine, Oak, Meadow).

Any hints on how to do this without subsetting the raster?


texts:
I am working with seismic data.

Previously we had a tool or a script that could scan these data (SEG-Y) and produce a polygon and shapefile based on the header info from the SEG-Y-files.

This scripting tool came together with a database-platform that was very costly.

So when we decided to change platform we also lost the scanning tool.

Any ideas if this is possible in other software or tools?


texts: Circular Linestring: Make a new start and endpoint along the line (with normalized distance) via PostGIS

texts:
I want swap/change the order of the coordinates inside a circular string which should be easy as it is a circle.

-- circular linestring --
CIRCULARSTRING(5 2,-3 1.999999, -2 1, -4 2, 5 2)

to something like
CIRCULARSTRING(-3 1.999999, -2 1, -4 2, 5 2, -3 1.999999)

The ideal solution would also contain a get me the normalize distance on some point of the line like I want the point at 0.6 to be my new start and end point.

Are there any options to do that in PostGIS in a SQL Statement?


texts: Reproject with shifted central meridian - dateline gap in ArcGIS

texts:
I have reprojected a file of global ocean zoning to Winkel III shifting the central meridian to -180 to center it on the Pacific using ArcGIS 10.5. Doing so, a gap at the dateline appears:

In a closeup, it's actually a line and a gap:

The whole file remains one polygon though. I've tried the Integrate tool but no success. I wonder which tool to use instead, if I am making a mistake regarding the reprojection or if there is any cosmetic fix to make the line disappear (but keep other outlines) in maps?


texts: GeoServer: Properties are missing! S3GeoTiff

texts:
I am using GeoServer 2.17 on windows and installed the geoserver community module "S3GeoTiff" to use .tiff image hosted on Amazon S3.

When I start the server in the command prompt I receive this warning/error:

01 dic 16:57:55 INFO [geoserver.config] - Initiated CatalogTimeStampUpdater
dic 01, 2019 4:57:56 PM org.geotools.s3.geotiff.S3GeoTiffFormat <init>
GRAVE: Properties are missing! The system property 's3.properties.location' should be set and contain the path to the s3.properties file.

I am quite a bit lost on what to do, I created an s3.properties file with the stuff needed inside already, but I don't know how to set a system property.
The docs of the module just say what to put in the s3.properties file, not how to set this s3.properties.location thing.


texts: How can I properly rename a table in a SpatiaLite DB?

texts:
Spatial layers (tables) in SpatiaLite include various supporting objects and metadata, including triggers, indices, and entries in (at minimum) the geometry_columns table. I'm looking for (preferably) a GUI that would handle all of the necessary changes in one go, or (fallback) documentation of all required changes so as not to break the spatial layers.

Tables have:

Entry in geometry_columns.f_table_name.
Five triggers named [prefix]_[table_name]_geometry, where prefix indicates whether it is a transaction rollback or index update.
Three spatial indices named idx_[table_name]_geometry[_suffix]

I have tried this in two applications, QGIS DB Manager and SpatiaLite-GUI.

QGIS DB Manager appears have the following effects:

Correctly updates geometry_columns with new table name
Does not rename triggers. Trigger definition is partially modified so that BEFORE [INSERT|UPDATE|DELETE] refers to new table name, but condition still searches for old name in geometry_columns.
Does not rename spatial indices. Not sure if this matters because triggers still refer to old index names.

When you choose Maintenance→Rename table in SpatiaLite-GUI, you just get the stub of a SQL ALTER TABLE statement. This is straightforward SQL and does even less than QGIS DB Manager. If you fill in the new table name, the table gets renamed. Other effects:

Table does not get renamed in geometry_columns.f_table_name, which means many GISes won't see the table as a spatial layer.
Does not rename triggers. Trigger definition is partially modified so that BEFORE [INSERT|UPDATE|DELETE] refers to new table name, but condition still searches for old name in geometry_columns.
Does not rename spatial indices. Not sure if this matters because triggers still refer to old index names.

Note that Spatialite-GUI does give the option to recover a geometry column which adds the correct entry to geometry_columns (but requires you to specify SRID, geometry type, and dimensions), to build or rebuild a spatial index, and to recover triggers, but none of these functions remove old table rows, triggers, or indices, leading to a DB with a lot of (possibly harmless but annoying) schmutz in it.


texts: Using min-max functions in definition queries of feature services

texts:
Using a feature service from ArcGIS Online, I would like to display a record wherein one of its attributes is the max of the entire records, but is unable to do so.

If I am using a Feature Class from a geodatabase, I would normally just specify something like this in the definition query:

The image above will only show records with the smallest and largest numerical value in its "admin id" field, and this works.

However when using a feature service, my challenge is identifying the table name to use. Below is the actual query being tested by me:

The intention of the above query is to make it show the last record edited. In lieu of the table name, ArcGIS shows a zero (0) instead. I have tried replacing the ? with 0, 1, and the layer name, but they seem to be incorrect.

The feature service being used was automatically created by ArcGIS Survey123, so there's no MXD for me to apply the definition query on.

Any suggestions on what I can do to do this?


texts:
I would like to export my map as a GeoTIFF in QGIS. My workflow is as follows: Project - Import/export - export map to image…

I have two questions about this: instead of saving the image as a GeoTIFF, QGIS saves it as a normal TIFF file and a world-file. How can I export it as a single GeoTIFF?

Also, when I re-import the image into QGIS, it returns the error message that the coordinate system is not defined. How can I export the image correctly with the coordinate system, which I had put for the map?


texts: Will ogr2ogr correctly merge features from several OSM files to resulting set

texts:
In GDAL >= 1.10, ogr2ogr contains osm driver

I want to try this feature and migrate OSM to PostGIS (I'm aware of osm2pqsql existence)

I have several relatively small OSM files and wonder if ogr2ogr driver will merge all features correctly or do I have to use other tool for merging (osmosis) before migrating to PostGIS?


texts: Seeking DEM data to make hillshade and contours?

texts:
I used to make hillshade and contours for several scales from Aster 30m GDEM with ErMapper. My data is not covering everything I need, so I am looking for a recent one.

I saw there was a Aster GDEM v3 available for download on Reverb Echo Nasa website:
https://reverb.echo.nasa.gov/reverb/

but I can't download the extent I need in one time (max 2000 tiles by download and I need more than 32000).

So before starting the downloads, I was wondering if Aster was the best data nowadays. Does anyone know other DEM data? Maybe more precise than 30m, and available for free. The extent I need contains Spain, France, Belgium and Switzerland.


texts: CostPath gives error for specific points?

texts:
I am using the tool CostPath. As an input feature destination data I've entered several points (no specific value, just distributed geographically), and as the cost distance raster I've entered the cost distance raster previously done with CostDistance.

My question is that I can draw the CostPath line from all the points except for three and I cannot figure out why.

I've been able to draw to CostPath lines from all the points with other CostDistance rasters, however it is not possible to draw the CostPath line for this specific CostDistance raster and for the same three points.
I've run CostPath with those signle three points, but still nothing happens to them. On the contrary, I used the same points with previous CostDistance rasters and worked.
I've checked in my CostDistance raster/Layer Properties/Source/NoData Value, and is empty. As the other CostDistance rasters that didn't give problems.
I've checked the BackLink produced in CostDistance and has a NoData Value of 255. Does anybody think that NoData values may be the problem? If not, which it is?

Could you be so kind as to figure out the possible problem and solution?

(I've re-drawn that particular CostDistance raster several times and nothing happens, that's why I need your help to figure out which problem there could be).


texts: How to adjust the projection of a buffer?

texts:
I'm using ArcGis 10.1, and when I do a buffer at a point, the created buffer do not match the dimensions I asked for. For example, in the creation of buffers, in the option 'linear unit' I choose 50 meters, so it should create a circle with 100 meters of diameter, but when I measure, it has 127 meters. How can I fix this?
It is in a portuguese geographic coordinate system, Datum 73/ Hayford-Gauss. It's units are meters.


texts: how do you sort points so that they are geographically near each other

texts:
Possible Duplicate:
  One dimensional map of the world?

I am trying to create a google map.  I am creating placemarkers using an external script in a kml file.

I'd like to sort the markers so that the ones which are geographically close are listed together.  e.g., Los Angeles and San Francisco should appear next to each other, while New York and New Jersey will be close to each other.

Is there any way to sort this list?  Should I be using the latitude/longitude?

Note: I am not asking how to visualize this on a map.


texts:
Does anybody know a way to simplify a number of contour polylines derived from a raster dataset?  I need to generate a map that shows contour polylines at relatively small scale.  With the contour interval at a 1 meter interval, contours converge too closely, making the output lines difficult to distinguish at that scale. The spatial resolution of the original raster is 2 meters.

I'm looking for something like the 'simplify line' tool. I know this tool exists in the 'Generalization' Toolset, but I haven't got an appropriate extension.

I'd be grateful for your suggestions!

Thanks in advance.


texts: Measure the reachable amount of points by a given distance

texts:
I want to measure the amount of points that are reachable given a certain  amount of walking time or walking distance along a streetnetwork. Furthermore, I want to have the amount of points reachable per 'starting' position in a attributetable or other overview.

In other words, I have a streetnetwork (Line features) and I want to calculate per street how many park entry points & sport facility points can be reached (Points) given a certain distance of time limit, and finally have a table that shows per street how many points can be reached.

I believe a solution is a network analysis using ArcGIS. However, I'm not that experienced with the network analysis features


texts: Resolution conversion of digital elevation models in ArcGIS 10.2

texts: I am a beginner in ArcGIS. How the resolution of original DEM (ASTER, SRTM or Cartosat DEM) can be converted to coarser and finer resolutions in ArcGIS 10.2...?


texts: Creating a 3D line feature based on 3D point features

texts: In ArcGIS for Desktop 10.0, is it possible to create a 3D line feature by drawing a line that connects 3D point features?


texts: Updating MXD layer definitionQuery in arcpy is very slow

texts:
The code segment below has been extracted from a larger project.  In short, I have an MXD which I want to generate multiple PDFs based on different criteria.  The code below works.  It loops through each of the layers within the MXD and updates the definitionQuery and the results are fine.  On my desktop, the part of the code that sets the definitionQuery takes about 2 seconds, but the published code on the server takes over 40 seconds.  Since that bit of code is called for each item in layer_parameter_list, the time of the report jumps from about a minute to multiple minutes.

When I update the defintionQuery, does the MXD get written to the drive?  Does it re-filter the data then?  On the server, the scratch is on a shared drive which could explain why it is slower.  What can I do to improve performance?  Can I tell the MXD not to be written?  If the re-filtering is occurring, can I disable that until all definitionQuerys have been updated for all layers?

def function_that_iterates_over_data_and_generates_pdf_pages_from_mxd(mxd, extent):
    layer_parameter_list = [
        # field 1,    field 2,  field 3
        ['Company1', 'Value X',    'Value 1'],
        ['Company1', 'Value Y',    'Value 2'],

        ['Company2', 'Value X',    'Value 1'],
        ['Company2', 'Value Y',    'Value 2'],
    ]

    layer_queries = [
        ['layer_1', """"FIELD_1"='{0}' and "FIELD_2"='{1}'""",
                    """"FIELD_1"='{0}'' and "FIELD_2"='{1}'"""],
        ['layer_2', """"FIELD_2"='{1}' and "FIELD_3"='{2}'""",
                    """"FIELD_2"='{1}'' and "FIELD_3"='{2}'"""],
        ['layer_3', """"FIELD_1"='{0}' and "FIELD_3"='{2}'""",
                    """"FIELD_1"='{0}'' and "FIELD_3"='{2}'"""],
    ]

    dfs = arcpy.mapping.ListDataFrames(mxd)

    lyr_dict = {}
    for df in dfs:
        # Take opportunity to zoom each Dataframe as we build our
        # dictionary
        df.extent = extent
        for lyr in arcpy.mapping.ListLayers(mxd, '', df):
            if lyr.isFeatureLayer or lyr.isServiceLayer:
                lyr_dict[lyr.name, df.name] = lyr

    for (page_number, query_parameters) in enumerate(layer_parameter_list):
        # this block takes ~2 seconds on my desktop, but 40+ seconds on the server
        for (dfi, df) in enumerate(dfs):
            for layer_query in layer_queries:
                criteria = layer_query[dfi + 1].format(*query_parameters)
                arcpy.AddMessage("Criteria: " + criteria)#this was the problem line
                lyr = lyr_dict[layer_query[0], df.name]
                lyr.definitionQuery = criteria

        file_name = 'Page_{0}'.format('%02s' % page_number)
        arcpy.mapping.ExportToPDF(mxd, file_name)

EDIT: added back in the AddMessage line which was the cause of the slow down.


texts: Is this query going to return clusters within a certain distance of a centerpoint

texts:
Essentially I need to be able to show clusters within x meters of a center point. It looks like it is passing the eyeball test but I am guessing I am doing something noobish here.
Raw Postgis query that "works" (returns data)
SELECT id,
   name,
   latitude,
   longitude,
    ST_ClusterDBSCAN(point, eps := .5, minPoints := 5) OVER (ORDER BY id) AS clusterId
FROM(
select id, name, point, latitude, longitude
from map_asset
WHERE ST_Distance_Sphere(point, ST_MakePoint(-78.6382,35.7796)) <= 94140.2
    ) as dShpere

my pojo is
@Entity
data class MapAsset(
    var name:String,
    var latitude:Double,
    var longitude:Double,
): RestModel() {
    var point:Point = createPoint(latitude = latitude, longitude=longitude)
    override fun toDtoMin() = DTOMin(idLong = this.id, display = this.name)

    override fun toDto() = MapAssetDTO(
        idLong = this.id,
        name = this.name,
        longitude = point.getLongitude(),
        latitude = point.getLatitude(),
    )
}

and this is how I implemented the above query in spring.
    @Query(
        value = """
SELECT id,
       name,
       latitude,
       longitude,
        ST_ClusterDBSCAN(point,  :eps,  :minPoints) OVER (ORDER BY id) AS clusterId
FROM(
    select id, name, point, latitude, longitude
    from map_asset
    WHERE ST_Distance_Sphere(point, ST_MakePoint(:lon,:lat)) <= :dist
        ) as dShpere
    """, nativeQuery = true
    )
    fun fetchClusterForCenterpoint(
        @Param("lat") lat: Double,
        @Param("lon") lon: Double,
        @Param("dist") dist: Double,
        @Param("eps") eps: Double,
        @Param("minPoints") minPoints: Int,
    ): List<MapAssetClusterHolder>
}


texts: Arcmap Combine tool output missing one field

texts: I have sets of two rasters in Arcmap with identical extents and resolutions, but different values. I previously have used Combine in the Local toolset of Spatial Analyst to create a new raster with new values, but that retains the values of the two inputs as separate fields in the output. Now, only the value from the first listed raster is retained. What gives?


texts: Difference between Heat Map and Hot Spot Analysis?

texts:
What is the difference between "Heat Map Analysis" and "Hot Spot Analysis"?

Are we perhaps using hot spot analysis to get the required relations between features, and then using the results as an input for a heat map?


texts: Profile view of ArcMap is outside of screen?

texts:
I need to get profile from my Lidar data. I normally use las data set profile view.
I don't know what happened and the profile view window is outside of my screen(I can just see the top part of profile view at the bottom of my screen). i have tried everything but so far no success.  I have added the snapshot for more detail. I just used window button and arrow key to move the window to the right then it happened

Any help?


texts: How to download all personal GEE scripts?

texts: I have been working on a few projects in GEE for the past year. Access to GEE code editor has now been revoked (I've been told that Google wants the US Fish and Wildlife Service to pay to use GEE now). I would like to at least retain the scripts that I've written. In the developers guide it states that "The Scripts manager stores private, shared and example scripts in Git repositories hosted by Google." Is there a way to access personal scripts in the git repository without having to sign into the code editor?


texts: How to check whether given xy coordinate lies inside a web map imported from arcgis online?

texts: I want to know when i have imported a web map to arcgis javascript api from arcgis online then how to check whether a given xy coordinate lies inside that web map. I know there is a method in polygons as point in polygon. But I do not know how to convert imported web map to a polygon. need a help.


texts:
I have a geo service that seems to finally be working.  I have the service setup with a list of Polylines as the returned object.  This is what I'm trying to implement but it doesn't work:

 IPointCollection points = new MultipointClass();
 points.AddPoint(station);
 points.AddPoint(targets[index]);
 messages.AddMessage(string.Format("Computing distance from origin to target {0}", index));
 Polyline result = distanceComputer.CostPathAsPolyline(points,
     hydrographyRasterDataset,
     hydrographyRasterDataset) as Polyline;
 IGeometry feature = result as IGeometry;
 messages.AddMessage("Getting new row for output.");
 IFeatureBuffer buffer = outputClass.CreateFeatureBuffer();
 IFeature polyline = (IFeature) buffer;
 messages.AddMessage("adding shape");
 polyline.Shape = feature;
 messages.AddMessage("adding object");
 polyline.set_Value(polyline.Fields.FindField("SHAPE"), result);
 messages.AddMessage("adding length");
 polyline.set_Value(polyline.Fields.FindField("SHAPE_Length"), ((IPolyline)result).Length);
 messages.AddMessage("Commiting to output");
 outputCursor.InsertFeature(buffer);

When I try setting the value for "SHAPE" I get an exception and the message is:

This spatial reference object cannot be defined from the available information

So how exactly to I set the polyline in the return object (basically adding rows of Polylines to the OutputFeatureSet) so that it does not blow up?


texts:
There's any native way that I can add an autostyle (to style both layer and category widgets) on Carto Airship/Carto-VL?

If the answer is no there's any function that I can use in the code below to return me the color of ex1, ex2 and ex3 in the map so I can manually color the widget categories?

If both answers are no, there's any way I can set colors manually to ex1, ex2 and ex3

            vizmod = new carto.Viz(`
              color: ramp($test_column, Fall); //test_column has 3 categories
              `);                              //ex1, ex2, ex3

            vizLayer[k].blendToViz(vizmod);


texts: ArcGIS Engine PageLayoutControl Get Page Coordinates from geographic coordinates

texts:
I have an ArcGIS Engine application that contains a PAGELAYOUT CONTROL In the code progressing I have acquired the centroid's of some selected polygons in real world coordinates (ie  x = 2484242.45 and Y = 276913.75)  I have verified the coordinates are correct in arc map for the selected polygons.  I am trying to use the centroid x, y location to be the anchor point for some balloon callouts. thus converting the real world coordinates to page units (ie x = 1.1 in & y = 4.3in)  Here I run into problems.  Here is function I found on esri site but Obviously I am missing something and I know it is probably something simple.  Can anyone help  I am definitely not getting page units to anchor the text balloon callouts like I expected.  I am thinking I might have to populates some constants prior to running the conversion.  Here is the function as I have used it

Function GetScreenCoordinatesFromMapCoorindates(ByVal mapPoint As ESRI.ArcGIS.Geometry.IPoint, ByVal activeView As ESRI.ArcGIS.Carto.IActiveView, ByVal mapenvelope As IEnvelope) As ESRI.ArcGIS.Geometry.IPoint

    If mapPoint Is Nothing OrElse mapPoint.IsEmpty OrElse activeView Is Nothing Then
         Return Nothing
    End If
    Dim screenDisplay As ESRI.ArcGIS.Display.IScreenDisplay = activeView.ScreenDisplay
    Dim displayTransformation As ESRI.ArcGIS.Display.IDisplayTransformation = screenDisplay.DisplayTransformation
    Dim x As System.Int32
    Dim y As System.Int32
    displayTransformation.FromMapPoint(mapPoint, x, y)
    Dim returnPoint As ESRI.ArcGIS.Geometry.IPoint = New ESRI.ArcGIS.Geometry.PointClass
    returnPoint.PutCoords(x, y)
    Return returnPoint
End Function

'Variables for attributes used in the function after processing
'MapPoint.x = 2484228.50293302
'Mappoint.y = 276930.5335755446
'returnPoint.x = 190643159
'returnPoint.Y = -21251274


texts: Calculate Height Data From Three Known Points

texts:
What's the best way to calculate "height" (snowfall, actually) data from three surrounding locations?

For this example, I'm looking to arrive at a "close enough" snowfall value at point A by evaluating data from 3 (or more) other points that are X, Y and Z distance away.  Here's a sample of data that would apply:

    Point 1        Distance (Miles)  Value (inches)
    X              17                15.1
    Y              21                4.3
    Z              31                13.8

As these points are a non-directional angled distance from point (direction of points from point A are not known) and we cannot assume they're in a straight line OR that they actually surround point A, what method should be used to determine a "most likely" value at point A?

As a side note, we do know the Lat/Lng of both point A and each of the points in the data set.  Again, EXACT information is not necessary and I'm contemplating just using the first point.  However, data inconsistencies exist and the closest point may be 0 at times and distance may vary quite a bit (i.e. may be much farther away than 31 miles).

As more feedback, going through the effort of describing a plane through three points may be overkill for this exercise.


texts:
Can somebody explain the following line:

self.menu = self.tr(u'&TestPlugin')

I don't understand what is in the parentheses: the small u and the need for the apostrophes.
This line was created automatically in the plugin builder and while it works fine in pycharm it causes an error in pydev and therefore not enabling me to debug.The error states:

Description Resource    Path    Location    Type
Encountered "\'&TestPlugin\'" at line 72, column 30. Was expecting one of:     "(" ...     ")" ...     "[" ...     "," ...     "." ...     "+" ...     "-" ...     "*" ...     "/" ...     "//" ...     "<<" ...     ">>" ...     "%" ...     "^" ...     "|" ...     "&" ...     ">" ...     "<" ...     "==" ...     "<=" ...     ">=" ...     "!=" ...     "or" ...     "and" ...     "not" ...     "is" ...     "in" ...     "if" ...     "for" ...     "," ...     "," ...         TestPlugin.py   /test2/test - Copy  line 71 Problem

Is there a way to make pycharm ignore the error so I can continue debugging? I tried adding:

#@UnusedVariable

At the end of the line but it didn't work.

Perhaps there is something wrong with the interpreter Or I need to add an import?


texts:
When you run QGIS and open a project file (.qgs), a new version of QGIS will read the .shp files and update them for format changes that go with the new version.

The changes finish, but don't work, the layer is blank, and the .shp file ends up at size 100 bytes.

I have ruined many files this way, downloaded fresh ones, and then ruined them again.

What am I doing wrong?

Using Lubuntu-19.10, qgis-3.4.10 (from Ubuntu repository).

Update

Normally the situation would be that you have changed to a new version QGIS, like 2.8.* to 3.4.10, but since I have 3.4.10 already installed (from the ubuntu repository) I re-install it, launch it and start a new project:

$ sudo apt remove qgis
$ sudo apt install qgis
$ qgis

My first shapefile layer is in /home/dk/GISdata/cadastral/CassowaryCoast/2020-01-13/Cadastral_data_QLD_CADASTRE_DCDB.shp, 9.8 MB.  When I click on New Shapefile Layer, then the "..." button, and navigate to the .shp file, it is shown as 10.3 MB.

The file encoding used to show "system" but now shows "unicode".  The dropdown list, which contains hundreds of entries, does NOT contain "system".

The geometry type shows "Point", so I change it to polygon.  The file's projection is GDA94, so I choose "EPSG:3577 - GDA94 / Australian Albers"

The Fields List shows only one line:

id   integer 10     [this is definitely wrong]

I click "OK".

An error message appears saying:

  "The layer already exists. Are you sure you want to overwrite the existing file?"

This is wrong, it is a new project.

I click on "Yes", a notification appears, saying:

  "Remote Layer: file path".

This disappears after 1 second, leaving a blank screen.

The Layers panel shows 1 layer "Cadastral data QLD CADAS..."

I save the project as rubbish.qgz

In File Manager, /home/dk/GISdata/cadastral/CassowaryCoast/2020-01-13/ shows the file Cadastral_data_QLD_CADASTRE_DCDB.shp has been changed to 100
bytes, the .cpg file has changed to 7 bytes, the .dbf file has changed to 66 bytes, the .prj file changed to 415 bytes, the .qpj file has changed to
695 bytes, and the .shx file has changed to 100 bytes.

The file Cadastral_data_QLD_CADASTRE_ROAD.shp remains unchanged at 7.1 MB.
"rubbish.qgz" does not exist.


texts: Why does merging from neignboring UTM Zones with rioxarray result into unsharp image?

texts:
I am am trying to merge raster files from the Sentinel 2 Constellation (after some processing) with rioxarray for the UTM Zones 32 and 33. It's looking good, execpt when an larger area for example the City of Berlin(Germany) in included in Scences in UTM32 (EPSG:32632) and UTM33(EPSG:32633).
Before merging the images I project them to UTM33. After the mergeing Everything is getting to look unsharp, like having the street twice, but with a quite a distance away.
I am merging those with the given code:
def merge_min_intensity(folder: Path, save_file_name: Path, epsg_code: int) -> xarray.DataArray:
    rasters: List[xarray.DataArray] = []
    for file in folder.iterdir():
        if str(file).endswith(".tif"):
            raster = rxa.open_rasterio(file)
            if int(raster.rio.crs.data['init'].split(":")[1]) != epsg_code:
                raster = raster.rio.reproject(epsg_code)
            rasters.append(raster)

    ret_raster = merge_arrays(rasters, method="min")

    ret_raster.rio.to_raster(save_file_name)
    return ret_raster

What might be the reason for this?


texts: Python script doesn't work after being published

texts:
I have the following python script that is used to move zip files from one folder to another and it works fine when executed before being published:
import shutil
import os

dir = r'C:\\arcgisserver\directories\arcgissystem\..path'

destination = r'C:\\arcgisserver\directories\arcgisjobs\..path'

for files in os.listdir(dir):
    if files.endswith('.zip'):
        shutil.move(files,destination)

However once I published this as a geoprocessing service and ran the resultant tool, the process succeeded however the files were not moved.
Is it possible that something is being changed when the script is published as a service?
EDIT:
I accessed the published service script and it had changed to the following:
# Esri start of added variables
g_ESRI_variable_1 =
os.path.join(arcpy.env.packageWorkspace,u'layer_updated_drawings')
g_ESRI_variable_2 =
os.path.join(arcpy.env.packageWorkspace,u'dwgtozippedshapefile_gpserver')
# Esri end of added variables

import shutil
import os

dir = g_ESRI_variable_1
destination = g_ESRI_variable_2

for files in os.listdir(dir):
    if files.endswith('.zip'):
        shutil.move(files,destination)

However when I changed the values back to the paths as in the original code above I was getting an error on the last line :
shutil.move(files,destination)

The error was that although it was finding the file in the folder as it was mentioning the file by name in the error, for some reason it was not finding the same file in the same location to be moved. The resultant error is as follows:
Error executing tool. FileMove Job ID: j6133d03357794c498a5c06ff475024f8 :
Traceback (most recent call last): File
"C:\arcgisserver\directories\arcgissystem\arcgisinput\Toolbox\FileMove.GPServer\extracted\v101\my_toolboxes\FileMove.py", line 19, in shutil.move(files,destination) File "C:\Python27\ArcGISx6410.3\Lib\shutil.py", line 302, in move copy2(src, real_dst) File "C:\Python27\ArcGISx6410.3\Lib\shutil.py", line 130, in copy2 copyfile(src, dst) File "C:\Python27\ArcGISx6410.3\Lib\shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: 'Shapefile.zip' Failed to execute (FileMove). Failed to execute (FileMove).


texts: QGIS 3.4 Layer Properties Update Extents to minimum bounding box of features

texts:
When I use QGIS 3.4.4 on Windows 10 and right click on a layer then select Zoom to Layer I zoom to half of the earth even though the 3 items on the layer are within 50 meters of each other.   I tried to use QGIS Layer Properties - Update Extents Button (See screen shot) and this really did not do much.  I then used the Python Console to set layer extents from a rectangle.

layer = iface.activeLayer()
rectang1 = QgsRectangle (-30878130,17423412,-30877366,17422953)
layer.setExtent(rectang1)
'''Michigan South'''

That worked fine.   I only do this once in awhile.   Is there another button in QGIS that will reset a layers extents to the minimum bounding box?

The processing toolbox has an excellent tool to generate the Bounding geometry but I want to set the layer's extents not just find it.  Oriented minimum bounding box tool missing from QGIS processing toolbox?


texts: Converting points with an associated circumference to a raster overlay

texts:
I have a data frame in r with x and y coordinates and each point has a circumference (tree_crown) around it. I'm wanting to build a raster file that each cell would have a value equal to the percent of the area being covered by the points (and the area of the circles around them). The x and y range is from 0 to 5147.815, and I'm wanting the resolution to be 1x1
My data looks like this:

Here is the idea behind the output:


texts: In QGIS there is an option to switch off toggle rendering (the tick box is called Render), which makes it much quicker to zoom in and out on layers. Is there an equivalent option in MapInfo?


texts: Copy multiple features in feature class, update field value based on number copied

texts:
I have created a field which will indicate the records I want to alter. What I want to do is then cycle through these records, each will contain sum values in a field.Based on the sum I want to copy the feature a certain number of times. For example if the sum is 107 I want to copy it 11 times with resulting copied features having 10 records with a sum of 10 and 1 record with the remainder of 7 in the sum field.

I'm not sure if that makes sense so I'll, I'll be starting with something like:

Feature SUM_FIELD
A       107
B       38

I would like to end with something like:

Feature SUMFIELD
A       10
A       10
A       10
A       10
A       10
A       10
A       10
A       10
A       10
A       7
B       10
B       10
B       10
B       8

Thanks for any insight you can provide.


texts: Interpreting the type and type name of data formats in QGIS

texts:
I am trying to wrap my head around storing attribute values in the most efficient way for a large shapefile (>1 000 000 records). I have found excellent descriptions of data representations in 8-bit, 16-bit as interger vs. float, etc (e.g. https://www3.ntu.edu.sg/home/ehchua/programming/java/datarepresentation.html). But I can't find the equivalencies between QGIS and standard names for those formats. Furthermore, QGIS uses different terms depending on the function to further complicate things.
Does QGIS only support two integer formats : 32-bit and 64-bit? Are real numbers assigned to Float32 or Float64 based on the length and precision?

Formats that I have found as accessed from Properties and Source fields with the corresponding options from add field are:

type/type name, selection from add field
double/real, Decimal number (real) with less than 10 digits  (32-bit?)
double/double, Decimal number (real) with over 11 digits (64-bit?)
int/integer, Whole number (integer)  (8-bit? 16-bit?)
qlonglong/integer64, Whole number (integer64)

Raster format has the following options with fairly straight-forward translations between names and data types:


texts:
I used the NCEP 2.5 degree*2.5 degree data to plot the 850 mb wind field and heights. But, I didn't know how to smooth the contour line. Scipy.ndimage.zoom didn't work well and some details are missed.

The colorful one is what I want. The another is what I plotted.

import numpy as np
from netCDF4 import Dataset
import matplotlib.pyplot as plt
from scipy.ndimage import zoom
from mpl_toolkits.basemap import Basemap

m=Basemap(projection='cyl',llcrnrlat=20,urcrnrlat=50,llcrnrlon=90,urcrnrlon=130,resolution ='l')
m.drawcoastlines()
m.drawcountries()

#read NCEP data
u=Dataset(r'D:\python\TRY\ncep\uwnd.2016.nc','r')
v=Dataset(r'D:\python\TRY\ncep\vwnd.2016.nc','r')
hgt_data=Dataset(r'D:\python\TRY\ncep\hgt.2016.nc','r')

uwnd=u.variables['uwnd'][728][2][:]
vwnd=v.variables['vwnd'][728][2][:]
hgt=hgt_data.variables['hgt'][728][2][:]
lat=u.variables['lat'][:]
lon=u.variables['lon'][:]

#choose selection
index1=np.logical_and(lon>=90,lon<=130);index2=np.logical_and(lat>=20,lat<=50)
lons=lon[index1];lats=lat[index2]
u1=uwnd[index2,:];u2=u1[:,index1]
v1=vwnd[index2,:];v2=v1[:,index1]
hgt1=hgt[index2,:];hgt2=hgt1[:,index1]

#draw wind (vectors)
x,y=np.meshgrid(lons,lats,copy=False)
Q = m.quiver(x,y,u2,v2,scale=250,width=0.003)
qk = plt.quiverkey(Q, 0.85, -0.12, 20, '20 m/s', labelpos='N')

#draw hgt lines
data3 = zoom(hgt2[::2,::2],2,order=3)
levels = np.arange(1420,1560,20)
cs = plt.contour(x,y,data3[:13,:17],levels=levels,colors='k',linewidths=1)
plt.clabel(cs, inline=1, fontsize=8,fmt='%d')

plt.show()


texts: How to specify Layer details with the GeoFence REST API using an external GeoFence server?

texts:
I’m using an external GeoFence server with a GeoServer cluster. My question is that, is it possible to specify the Layer Details with the external GeoFence REST API and what is the correct syntax for variables Allowed Area and Catalog Mode? I would like to create ca. 300 users with different geographical restrictions and can't find the solution from the documentation (https://github.com/geoserver/geofence/wiki/GeoFence-REST-API).
Here are  two screenshots that demonstrate the rule created with the GUI of the webapp.

Here’s an example rule that I would like to create using VSCODE REST Client.
POST http://**********/geofence/rest/rules HTTP/1.1
content-type: application/xml
Authorization: Basic ********:*********

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<rule grant="LIMIT">
    <position value="0" position="offsetFromTop"/>
    <username>
        helsinki
    </username>
    <rolename>
        käyttäjät
    </rolename>
    <instance>
        <name>tomcat2</name>
    </instance>
    <service>*</service>
    <request>*</request>
    <workspace>yleiskaava</workspace>
    <layer>rasteri_prod</layer>
    <layerDetails>
<allowedArea>
SRID=4326;MULTIPOLYGON(((25.23817754531389213 60.29533227078006519, 25.22952012148912715 60.29784001296140872…)))
           </allowedArea>
           <catalogMode>CHALLENGE</catalogMode>
    </layerDetails>
</rule>

And here’s what I get as a result. I could add the details by hand but not for 300+ rules. Is this possible with the GeoFence REST API?


texts: Geometry datatype to latitude /Longitude MS SQL Server

texts:
I need to convert Sql Server geometry datatype to latitude /Longitude

I have just imported a shapefile to my table (geometry)

This query does not work:-

select
   geom.Lat as [Latitude],
   geom.Long as [Longitude]
from dbo.special

Error I get is:

  Could not find property or field 'Lat' for type 'Microsoft.SqlServer.Types.SqlGeometry' in assembly 'Microsoft.SqlServer.Types'.

This query returns Latitude and longitude but the format doesnot seem to match google maps:-

select U.name, Centroid.STY as Longitude, Centroid.STX as Latidude
 from
 ( select geom.STCentroid() as Centroid, NAME from dbo.special)

Also:-

SELECT ST_X (ST_Transform (geom, 4326)),
   ST_Y (ST_Transform (geom, 4326))
   FROM special

gives

  'ST_Transform' is not a recognized built-in function name.

Please suggest


texts: Managing privileges for an ArcSDE database using SSMS

texts:
I am trying to mange users for my ArcSDE database via SSMS as opposed to tools in ArcGIS, to do this i want to set up two new user roles, data-viewer and data-editor, and then assign users to those roles. However, while i have been able to create new roles and add users to those roles i can not figure out how to configure the permissions in SQL to accomplish what i am trying to do.

So how do i configure the permissions in SSMS to create a data-viewer and data-editor role for my database

So far this what i have..

Query 1:
Create Role [data_editor] Authorization [dbo]

Query 2:
Alter Role [data_editor] ADD Member [AD\xxxxx]

Query 3:
Grant SELECT, INSERT, UPDATE, DELETE 'on all existing an future datasets' To [data_editor]

yeah the third query is where it falls apart because i dont know how to set it up so the role can do what is needed...

although according to ESRI i can not do what i want and the only way is  to create a user in the database server side and then mange the privilege to the datasets in Arc


texts:
I am new to GIS. For a small project I want to map elements in a warehouse and want to find the location of the elements later (e.g. nails are located at x,y).

Now I am wondering what kind of position I should choose. Should I choose an absolute location coordinate system like 1,3, or should I use real geocoordinates like -7.023, 32.2423 for my use case? Where are the benefits/disadvantages with each approach?


texts: Automatically emailing interim results from ModelBuilder?

texts:
I want to get ModelBuilder to email me the results of processes at certain stages so that if there are issues I can remotely login and deal with them as I do with python scripts. I have a python based tool to email the results but don't see a way to get results from individual processes. You can right-click on a process in ModelBuilder and view results but how can I get this info to be passed into the email script?

Worst case scenario - I guess I can export the model to python and add the emailer script but is there an easier way?

Model Code -this is a simple model to test. The main model to use this on will run over a weekend or more as the raster-polygon take about 6 hours for some tiles.

# ---------------------------------------------------------------------------
# model_emailstatus.py
# Created on: 2011-10-11 16:28:25.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

# Load required toolboxes
arcpy.ImportToolbox("D:/SCRATCH/Projects/106/Toolbox.tbx")

# Local variables:
Key_Resource_Area_shp = "O:\\2011\\11\KeyResourceArea.shp"
Key_Resource_Separation_Area_shp = "O:\\2011\\1121\SeparationArea.shp"
Message = ""

This is what I want to fill...in python it would be just Message = arcpy.GetMessages() but what does the same thing in model builder?

Email = "georgec@xxxxxxxx"
Success = ""

How do I fill this with true/false depending on if the merge tool is successful or not?

KeyResourceArea_Merge = "C:\\Users\\georgec\\Documents\\ArcGIS\\Default.gdb\\KeyResourceArea_Merge"

# Process: Merge
arcpy.Merge_management(<snip>)

# Process: EmailStatus
arcpy.gp.toolbox = "D:/SCRATCH/Projects/106/Toolbox.tbx";
# Warning: the toolbox D:/SCRATCH/Projects/106/Toolbox.tbx DOES NOT have an alias.
# Please assign this toolbox an alias to avoid tool name collisions
# And replace arcpy.gp.EmailStatus(...) with arcpy.EmailStatus_ALIAS(...)
arcpy.gp.EmailStatus(Message, Email, Success)


texts: Removing Null Values and Slicing Results

texts:
I am attempting to label features that can have multiple combinations of codes. The label is based off of three fields ([DescriptionA], [DescriptionB], [DescriptionC]).

I'd like to create a python expression to remove all null values from the labels, and to remove a section from the end of each returned value.

(Ex. 10QR, 15QR)

Here is the code I have come up with based on a similar thread I've read:

    def FindLabel ( [DescriptionA], [DescriptionB], [DescriptionC] ):
return def FindLabel ( [DescriptionA], [DescriptionB], [DescriptionC] ):
if not ([DescriptionC] is None):
    return [DescriptionC]  .lstrip('Fuse-')
elif not([DescriptionB] is None):
    return [DescriptionB]  .lstrip('Fuse-') + '\n' + [DescriptionA]   .lstrip('Fuse-')
elif not([DescriptionA] AND [DescriptionB]  AND [DescriptionC]  is None):
    return [DescriptionA]  .lstrip('Fuse-') + '\n' + [DescriptionB]   .lstrip('Fuse-') + '\n' + [DescriptionC]   .lstrip('Fuse-')
else:
    return [DescriptionA]  .lstrip('Fuse-')

When I verify, it returns a syntax error message. I am sure there is more wrong to it than that. How should I proceed?


texts:
As a part of project scope we have to deliver to the Client digitized data sets – some houses and roads. Can we use USGS Orthoimagery from The National Map layer for feature digitizing?

http://www.arcgis.com/home/item.html?id=5903c82adf4a42cfa525463593d0c66a
http://raster.nationalmap.gov/arcgis/rest/services/Orthoimagery


texts: nested SearchCursors to loop through two tables whilst adding rows and calculating fields

texts:
I'm trying to loop through each row in table "Sites_Copy" and look at "OID1" and "OID2". Then take these and loop through "BLPUs_PolygonNeighbors" and compare these to "src_OBJECTID" and "nbr_OBJECTID".

If "OID1" matches "src_OBJECTID" and "OID2" doesn't match "nbr_OBJECTID", then  copy the row and insert it to "Sites_Copy" and calculate "OID3" to be "nbr_OBJECTID".

However, this code doesn't seem to be doing it. Currently it doesn't even like the getValue. I'm in arcGIS 10.1, any help greatly appreciated.

import arcpy, os, sys
from arcpy import env

arcpy.env.workspace = "C:\Users\Ant\Documents\ArcGIS\ITN.gdb"
edit = arcpy.da.Editor(r'C:\Users\Ant\Documents\ArcGIS\ITN.gdb')

edit.startEditing(False,True)

DISSOLVED2 = "Sites_Copy"
with arcpy.da.UpdateCursor(DISSOLVED2,["OID1","OID2"]) as cursor:
    for row in cursor
        tabcur = arcpy.InsertCursor(DISSOLVED2)
        n_row = tabcur.newRow()
        TABLE = "BLPUs_PolygonNeighbors"
        searchRows = arcpy.SearchCursor(TABLE,["src_OBJECTID","nbr_OBJECTID"])
        blpu1 = row.getValue("OID1")
        blpu2 = row.getValue("OID2")
        for searchRow in searchRows:
            searchRow1 = searchRow.getValue("src_OBJECTID")
            searchRow2 = searchRow.getValue("nbr_OBJECTID")
            if searchRow1 == blpu1 and searchRow2 <> blpu2:
                tabcur.insertRow(n_row)
                arcpy.CalculateField_management(DISSOLVED2, "OID3", searchRow2)

edit.stopEditing(True)

EDIT:

To explain what I am doing - I have a layer of polygons, which I want to combine into larger and larger polygons by adding their neighbors one by one. I want to qualify these potential merges with if statements, such as whether the existing polygon is below a certain size then keep adding polygons. Eventually, I want to be able to take one layer of polygons, calculate all of their neighbors, then run a script that will keep adding neighboring polygons one by one based on certain criteria not having been met (such as size, flood risk), up to a total of 15 potential merges. But I don't want any duplicates, as this could very quickly get out of hand.

So I've written the first part that takes the original polygons, calculates neighbors and dissolves all possible 2-polygon combinations and appends them to the table. I now want to do all the possible 3-polygon combinations, then 4 etc up to 15.

EDIT:

Is this any closer? I'm not sure how to change the insert row part, it should copy the line being looked at in Sites_Copy and append it the end of Site_Copy. Then the updatecursor can calculate field OID3 hopefully.

DISSOLVED2 = "Sites_Copy"
with arcpy.da.SearchCursor(DISSOLVED2,["OID1","OID2"]) as cursor:
    for row in cursor:
        tabcur = arcpy.InsertCursor(DISSOLVED2)
        n_row = tabcur.newRow()
        TABLE = "BLPUs_PolygonNeighbors"
        searchRows = arcpy.da.SearchCursor(TABLE,["src_OBJECTID","nbr_OBJECTID"])
        blpu1 = row[0]
        blpu2 = row[1]
        for searchRow in searchRows:
            searchRow1 = searchRow[0]
            searchRow2 = searchRow[1]
            if searchRow1 == blpu1 and searchRow2 <> blpu2:
                tabcur.insertRow(n_row)
                arcpy.da.UpdateCursor(DISSOLVED2, "OID3", searchRow2)


texts: How to plot osm-polygons using osmdata and leaflet (in R)?

texts:
I am trying to plot buildings from osm using the leaflet-package in R. Unfortunately with little success and I couldn't find a reproducible example.

In a first step, I define the bounding box and add the 'feature' building:

library(dplyr)
library(osmdata)

q1 <- getbb("steckborn, switzerland") %>%
  opq() %>%
  add_osm_feature("building")

In a next step, I pass the query to overpass and extract the polygons:

out <- osmdata_sf(q1)
poly <- out$osm_polygons

Now comes the tricky part. How can I plot them using leaflet? I tried the following:

library(leaflet)

leaflet() %>% addTiles() %>% addPolygons(lines, col = "blue")


texts: Morphing between two cartograms made in QGIS

texts:
I've used the Cartogram plugin for QGIS to produce several cartograms.

Is there a way to animate the transitions between shapefiles / svgs using QGIS?


texts: Basic question about downloading SRTM 3 arc resolution data

texts: I want to be able to download high resolution 3 arc degree resolution (90 meters) from NASA's earthexplorer.gov site. However it is a bit confusing for a beginner like myself. I want to be able to do this for my country i.e. India. I go here http://earthexplorer.usgs.gov/ and by pressing shift I zoom into the area of interest by creating a rectangle. Then it displays 4 coordinates and then I ask for datasets. I get so many options and each are of very small sizes. Am I supposed to download all of it or just any one of it ? If I am supposed to download all of it is there a way to do it all in one download ? I presume then I will have to use progamming code to concatenate these separate .hgt files together.


texts: ArcGIS and SqlServer.Types: Does feature.Shape.SpatialReference.FactoryCode == srid?

texts:
I created a test implementation of the ESRI Geometry to WKT recipe provided by @SagebrushGIS. It seems to work great, but I'm wondering if the SRID value expected by Microsoft.SqlServer.Types (specifically SqlGeometry.STGeomFromWKB) corresponds directly to feature.Shape.SpatialReference.FactoryCode?

I stumbled across this thread in the ArcGIS forums where user zroberthu says (not so difinitively) that the two are equal. And when I debug this line (my feature class is projected to NAD_1983_StatePlane_Missouri_Central_FIPS_2402_Feet):

int srid = feature.Shape.SpatialReference.FactoryCode;
// I get srid = 102697

Next, if I go to SpatialReference.org and search by my ESRI projection name, it takes me here, and I see the value 102697 most everywhere I expect to find it. However, if I select the PostGIS insert statement, it shows srid is 9102697, and then an "auth_srid" field corresponds to 102697.

So my questions are these:

1) At the end of the day, does the SRID even matter if I'm not performing spatial operations on two different getdatasets? (Presently, I just want a simple way to expose a feature's WKT in the ArcMap UI.)

2) Can I difinitively say an ArcGIS feature's Shape.SpatialReference.FactoryCode corresponds directly to the SRID expected by SqlServer.Types and/or OGC-compliant utilities?

I can apply the SRID using other techniques, but if this is true it is handy! Thanks so much. /E


texts: Problem using ogr2ogr to convert postGIS table to personal geodatabase

texts:
I need to convert a PostGIS table to a personal geodatabase using ogr2ogr. I can convert tables to a shapefile without a problem but whenever I try to convert it to .mdb using the ODBC driver, I get an error. I have got the 64-bit GDAL version and also the 64-bit ODBC driver installed.

This is my command:

ogr2ogr -f "ODBC" C:\users\[user]\file.mdb PG:"host=localhost user=[user] dbname=[db] password=[password]" "[tablename]"

This is the error I get:

ODBC driver failed to create C:\users\[user]\file.mdb

Am I using the right command to do this, or am I missing a driver or something?


texts: Python Script to Create Table Using Data Driven Pages

texts:
I am trying to convert some python script to display a table (based on a dbf) of features located within a specific data driven page. So far, I have the script successfully able to refresh the map to the specific table, but it does not update the table.

I have it set-up as three text boxes that should be updated with three specific fields when the user runs the script from ArcToolbox.

Any suggestions on why my table is not updating?

import arcpy, sys, os

#Reference current MXD
mxd = arcpy.mapping.MapDocument("current")

#Get input parameter
Name = arcpy.GetParameterAsText(0)

#Reference  data frames
mapatlasDF = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
locatorDF = arcpy.mapping.ListDataFrames(mxd, "Locator Map")[0]

#Reference appropriate layers
atlasLyr = arcpy.mapping.ListLayers(mxd, "PinalCreekMapAtlas_HalfMile", mapatlasDF)[0]
locatorLyr = arcpy.mapping.ListLayers(mxd, "Locator Map", locatorDF)[0]
atlasoutlineLyr = arcpy.mapping.ListLayers(mxd, "Map Atlas Outline", locatorDF)[0]

#Reference layout elements by calling ListLayoutElements
for elm in arcpy.mapping.ListLayoutElements(mxd):
  if elm.name =="Table1Column1": tab1Col1Txt = elm
  if elm.name =="Table1Column2": tab1Col2Txt = elm
  if elm.name =="Table1Column3": tab1Col3Txt = elm

#Reference the Data Driven Page object
ddp = mxd.dataDrivenPages

#Set the current page to be the one selected in the script tool
arcpy.AddMessage(Name)

pageID = mxd.dataDrivenPages.getPageIDFromName(str(Name))
mxd.dataDrivenPages.currentPageID = pageID

#Set the appropriate definition queries
atlasLyr.definitionQuery = "Name = '" + Name +  "'"
locatorLyr.definitionQuery = "Name = '" + Name +  "'"
atlasoutlineLyr.definitionQuery = "Name <> '" + Name +  "'"

#Update Sheet Index data frame
arcpy.SelectLayerByAttribute_management(locatorLyr, "NEW_SELECTION", "\"Name\" = '" + Name + "'")
locatorDF.panToExtent(locatorLyr.getSelectedExtent())

#Reference Affected Parcels table and select appropriate records
parcelTable = arcpy.mapping.ListTableViews(mxd, "AffectedParcels")[0]

#Build query and create search cursor to loop through rows
parcelFieldValue = "Page " + Name
queryExp = "\"MapPage\" = '" + parcelFieldValue + "'"  #e.g., "MapPage" = 'Page 01'
parcelRows = arcpy.SearchCursor(parcelTable.dataSource, queryExp)

#Clear all table text values
tab1Col1Txt.text = " "; tab1Col2Txt.text = " "; tab1Col3Txt.text = " "

#iteate through each row, update appropiate text
count = 0
for row in parcelRows:
  if count < 30: #Table1 - static position
    tab1Col1Txt.text = tab1Col1Txt.text + row.getValue("OwnerName") +"\n"
    tab1Col2Txt.text = tab1Col2Txt.text + row.getValue("APN") + "\n"
    tab1Col3Txt.text = tab1Col3Txt.text + row.getValue("LengthTrail") + "\n"
  if count ==30:
    arcpy.AddMessage("Table Overflow") #The code could be reworked to show the last 90 records
  count = count + 1

arcpy.RefreshActiveView()
arcpy.AddMessage("PROCESS COMPLETED")


texts: Adding action to map in QGIS when link to actions menu item is missing?

texts:
I am running qgis 3.8.0 zanzibar on ubuntu 18.04. I am trying to set a hyper link on a point on the sample map (Alaska).

A casual perusal tells me that I should set up an action. https://www.northrivergeographic.com/archives/qgis-and-hyperlinks. There is supposed to be a gear button. I don't find one.

Then at this point on stack exchange https://gis.stackexchange.com/tags/actions/info there is a link to help on setting up actions.

http://docs.qgis.org/2.0/en/docs/training_manual/create_vector_data/actions.html?highlight=actions

The help link is broken.


texts: Handling of accented characters in GMAPSUPP.IMG

texts:
I'd like to use my Garmin 20 to go biking. Since I do not want to buy one of microSD card from garmin, I'd like to build one myself.

For this I went to:

http://garmin.openstreetmap.nl/

Selected:

"Routable Bicycle (Openfietsmap Lite)"

and

"Enable manual tile selection: "

And then simply selected region north of Toulouse, France:

This seems to be the direct link:

http://osm.pleiades.uni-wuppertal.de/garmin/openfietsmap_lite/07-05-2018/63442359.img

After a couple of minutes, I received an email containing a direct link to the GMAPSUPP.IMG. If I extract this file and copy it:

$ unzip openfietsmap_lite_gmapsupp.zip
$ cp gmapsupp.img /media/malat/GARMIN/GARMIN/GMAPSUPP.IMG

Then everything works as expected, except one tiny detail: accented characters. My Garmin 20 does not display some city names properly.

Some cities contains odd characters for example:

Bruguières is stored as "BRUGUI?RES"
Saint-Geniès-Bellevue is stored as "SAINT-GENI.S-BELLEVUE"
Villeneuve-lès-Bouloc is stored as "VILLENEUVE-L.S-BOULOC"

Is there a way to export/re-create this particular map using proper Latin1 encoding to fix all the invalid encodings ?

Update: I can fix the binary file directly using hexedit, for example I can generate the correct name for "Bruguières" using:

$ file input
input: UTF-8 Unicode text
$ cat input
BRUGUIÈRES
$ iconv -o output -f utf8 -t latin1 input
$ file output
output: ISO-8859 text

Then I simply replace the original '3F' into 'C8' and then everything works as expected. While this is obviously not a proper solution (I would need to fix hundreds of binary strings) this demonstrate that a proper conversion is possible.

It seems the original 'img' file:

http://osm.pleiades.uni-wuppertal.de/garmin/openfietsmap_lite/07-05-2018/63442359.img

Already contains the invalid character encoding. So I need to generate the img file myself.


texts: Iterator in ModelBuilder does not complete final iteration (last action)?

texts:
I am using the ModelBuilder to run an iterative process using the "for" iterator. The entire process is about 7 steps that are iterated several times, depending on the input to the tool (to value, from value, By value). The final two steps involve adding a field and copying the result of a previous step into this field (so that the iterative process does not write over the previous results). The tool works fine except for the last iteration. Regardless of how many iterations it runs, in the last iteration is does everything except copy the field over to the new field. It does complete the step of adding a field, but the copying over of the values from the result field doesn't take place in the very last iteration (works fine for all other iterations).

Any idea why this would happen?

The field shows up with values "0". The exception is that if the last iteration happens at a value that is less than the maximum value (the "to value") then the iteration is fine: so if I use input like: from:1 to:103 by:10 then I will get a complete last cycle at 101. But if I define from:1, to:101 by:10. The field defined at iteration 101 is populated by the value "0".


texts: error trying to create two variables Cannot acquire a lock

texts:
I am trying to create two variables one for x vertices and another for y vertices, when I leave the vertices as x, y the code runs but not when I separate the vertices into verticeX & verticeY

c_cursor = arcpy.UpdateCursor(out_shp)
for census in c_cursor:
    geo_census = census.Shape
    census_x = []
    census_y = []
    c_parts = geo_census.partCount
    for censusline in range(0, c_parts):
        parts = geo_census.getPart(censusline)
        for cord in parts:
            if cord:
                census_x.append(cord.X)
                census_y.append(cord.Y)
print 'step 1c'

for row in arcpy.da.SearchCursor(input_shp, ["OID@", "SHAPE@"]):
    print("Feature {}:".format(row[0]))
    partnum = 0
    for part in row[1]:
        print("Part {}:".format(partnum))
        for pnt in part:
            if pnt:
                verticeX= ("{}".format(pnt.X))
                verticeY= ("{}".format(pnt.Y))
                print verticeX, verticeY
            else:
                print("Interior Ring:")
        partnum += 1
print 'step 1c'

Here is my error message

Traceback (most recent call last):
  File "C:\Users\Michaelf\Desktop\GEOG M173\FPT.py", line 51, in <module>
    c_cursor = arcpy.UpdateCursor(out_shp)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\__init__.py", line 1211, in UpdateCursor
return gp.updateCursor(dataset, where_clause, spatial_reference, fields, sort_fields)
  File "C:\Program Files (x86)\ArcGIS\Desktop10.3\ArcPy\arcpy\geoprocessing\_base.py", line 364, in updateCursor
self._gp.UpdateCursor(*gp_fixargs(args, True)))
RuntimeError: ERROR 999999: Error executing function.
Cannot acquire a lock.
Cannot acquire a lock.

update 1: Here is the line of code above. The code was running earlier then I added the verticeX= and verticeY= then the error message started appearing even when I converted it back to the format that worked.

fields = [
    ('NAME', 'TEXT'),
    ('STATE_NAME', 'TEXT'),
    ('CNTY_FIPS', 'FLOAT'),
    ('totpop', 'LONG'),
    ('Centroid_x', 'LONG'),
    ('Centroid_y', 'LONG')
]
print 'step1e'
for field in fields:
    arcpy.AddField_management(out_shp, "Centroid_X")
for field in fields:
    arcpy.AddField_management(out_shp, "Centroid_Y")
print 'step1f'
County_Name_List = []
State_Name_List = []
County_Fips_List = []
Tot_Pop_List = []
Centroid_List = []
print 'step1g'


texts: Unable to see whole world map by decreasing panzoom bar?

texts:
I am seeing one weird thing in Openlayers today. I am unable to see whole map by using panzoombar, previously i used to.

  <title>OpenLayers Example</title>

this is the code, panzoombar is showing all the levels, but it stopped at last above two levels and not coming down.


texts: How to return a value from the database just by using Geoserver?

texts:
There's a spatial table in Postgis with polygon geometry, a column with id and a column with the needed value. There are several users who input points in a website

The coordinates of these points fall within a certain polygon in this table, the website needs the values from the polygon table.

In other words, the input would be lat, lon. And the output would be a 5 letter value reference.

Is it possible for Geoserver to return this value reference? and if so how to do it? Or is it better to build a function on the database?


texts: Calculating geometry for feature class with x/y and Lat/Long values in different projections?

texts:
I have a feature class with x/y values populated on the native projection of the feature class (state plane).

In the same feature class I also have Lat/Long fields that I need to populate (WGS 84 in decimal degree).

The problem I have is the calculate geometry function doesn't allow me to choose a different projection other than State Plane when I try to auto populate the Lat/Long values.

Does anyone have any python code or ideas that might help with this request?


texts: Get the shortest path between a start point and end point in pgrouting

texts: I want to find the shortest path for a start point and end point chosen by the user. How can I accomplish this in pgrouting. I have the latitude and longitude of the start point as well as for the end point. How can I accomplish this ?


texts: OpenLayers Performance issue with IE 7 & 8

texts:
I'm using open layers to  draw the world map and below is the code. Basically there's a JSON file which contains the coordinates of all countries which will be read by OpenLayers and the fill color (which will be dynamic and it can be any color) of each country is got from the DB through a separate AJAX call (single call will get the color for all countries).

It works fine in Firefox and Chrome but in IE 7 and 8, it takes a very long time to draw the map. Please let me know how to improve the performance..

Code:

Layer creation:

var vecLayer = new OpenLayers.Layer.Vector("vector", {
                      rendererOptions: { zIndexing: true },
                      styleMap: new OpenLayers.StyleMap({
                          'default': allCountryStyle,
                          "select": new OpenLayers.Style({
                              strokeWidth: 3,
                              strokeColor: "#000000",
                              graphicZIndex: 2
                          })
                      }
                      ),
                      protocol: new OpenLayers.Protocol.HTTP({
                          url: url,
                          format: new OpenLayers.Format.GeoJSON()
                      }),
                      strategies: [new OpenLayers.Strategy.Fixed()]
                  });

Fill Color:

var allCountryTemplate = {
                          cursor: "pointer",
                          fillOpacity: 1,
                          fillColor: "${getAllCountryColor}",
                          pointRadius: 5,
                          strokeWidth: 1,
                          strokeOpacity: 0.2,
                          strokeColor: "black",
                          graphicName: "triangle"
                  };

Please let me know if you need any further information


texts: Get maximum value from two raster using gdal_calc.py with option Ignore NoData calculation enabled

texts:
I would like to get maximum value from two raster using gdal_calc.py with option Ignore NoData calculation enabled.

My question is similar to this unsolved problem: How do I get the maximum value of raster cells ignoring nodata with gdal_calc?

If using ArcGIS Desktop, its easy using Cell Statistics within the Spatial Analyst Toolbox with option Ignore NoData calculation enabled/checked. But currently I don't have any access to ArcGIS, only have gdal.

So, is it possible to use gdal for that purpose?


texts: Automate testing of web app based on ArcGIS JS API

texts:
So, there are multiple products that can let you automate testing interaction with web pages. I have used Selenium IDE for some time now and it works great for creating unit tests for HTML elements on the client side (make sure URLs work, you can access values in the drop-down list etc).

However, I have not found on the Internet any evidence that someone is using any out-of-the-box product for automating testing of web pages that are using ArcGIS JS API.

What I have found:

Writing Unit Tests for Your ArcGIS API for JavaScript Apps (an
old code sample, not relevant any longer)
GIS.SE
Testing software (like QTP ,Selenium) for ESRI platform (Desktop and Web based)
(just a link of products)
GeoNet post (a list of JS modules for testing)
Automated Headless Unit Tests with Esri JS API (something close
to what I want, but requires heavy JS API expertise).

Consider testing an Editing template widget web page. You cannot capture selecting a feature template and creating a feature on the map using, for instance, with Selenium IDE. This is because those things don't happen at the client side, and the testing software is not aware of JS API and considers editing templates to be just a group of CSS elements.

Of course I automate testing of the feature services via the REST and can verify that the services are capable of creating and storing features, but I am interested specifically in the web page (feature service can be working, but the editing template may get broken and user won't be able to create a feature).

Before I will go and try all trial versions of the testing software that are out there, maybe someone can say if there is a product (can be either commercial or free, doesn't matter) that is capable of recording and reproducing a user page interaction workflow when having functionality from ArcGIS JS API embedded? If recording/playing is not an option, then at least a piece of software that would create a test case with some manual configuration, but without becoming a JS guru.


texts: How can i display GIF images in map tip using ArcGIS silverlight API?

texts:
I'd like to display GIF image in map tip using Silverlight API .I found the below code but it doesn't work for GIF image. Is there any way to display GIF images in map tip using ArcGIS silverlight API?

<StackPanel Orientation="Horizontal">
         <Image x:Name="MyImage" Source="/Assets/images/i_zoomin.png" Stretch="None"></Image>
</StackPanel>

Thanks for Advance


texts: Selecting rows of attributed relationship class (intermediate table) using relate table function

texts:
I have 2 classes:

Owners

Properties

And 1 relation class (M-N) attributted

In my ArcMAP (10.3.1) the intermediate table doesn't appear automatically (The table of relationed class appear). If I opening a table of intermediate table and running the function "relate table" again, occurs a error in this table:

And nothing is selected in relation table... (but in the relationed class the behavior is normal).

I found this old tutorial that it works well

"http://webhelp.esri.com/arcgisdesktop/9.2/tutorials/EditingRelationships_4.htm"

In this link, in segment 4/5, is showing how to edit a intermediate table, using a function relate table.

I guess this a bug of new versions. Can Anyono test this too?


texts: QGIS 3.16 Python script: processAlgorithm return empty layer

texts:
The script process well except the returned output. I want that the script displays the "output_layer" at the end of my script as a temporary layer in my QGIS project.
I understand that the output have to be a sink type.
Following this tutorial: http://www.qgistutorials.com/en/docs/3/processing_python_scripts.html, I try to add the features of the output_layer in sink at the end of the script.
def initAlgorithm(self, config=None):

    self.addParameter(QgsProcessingParameterVectorLayer(self.INPUT_vector,self.tr(
    'couche parcelle'),
    types=[QgsProcessing.TypeVectorPolygon],
    defaultValue=None)
    )

    self.addParameter(QgsProcessingParameterRasterLayer(self.INPUT_raster,self.tr(
    'raster classification'),
    defaultValue=None)
    )

    self.addParameter(QgsProcessingParameterFeatureSink(self.OUTPUT, self.tr('Output layer'), type=QgsProcessing.TypeVectorPolygon, createByDefault=True, defaultValue=None))

def processAlgorithm(self, parameters, context, feedback):

    source = self.parameterAsSource(
        parameters,
        self.INPUT_vector,
        context
    )

    (sink, dest_id) = self.parameterAsSink(
        parameters,
        self.OUTPUT,
        context,
        source.fields(),
        source.wkbType(),
        source.sourceCrs()
    )

    [...]

    # At the end of the script: Read output_layer and create output sink

    for f in output_layer['OUTPUT'].getFeatures():
        sink.addFeature(f, QgsFeatureSink.FastInsert)
        feedback.pushInfo('feature: {}'.format(f.fields().names()))

    return {self.OUTPUT: dest_id}

The displayed output layer contains the input layer fields instead of the output_layer fields. feedback.pushInfo displays correct info, "output_layer" is OK.
What is the correct code to have "output_layer" correctly returned and displayed at the end of the script?


texts: Calculating Landsat 7 NDVI images using QGIS

texts:
I have Landsat 7 images from 2011 to 2016 for my agricultural studies. First I corrected the slc-off problem of band 3 and band 4. Then I calculated the NDVI using both the raster calculator and the vegetation index (slope based) processing toolbox. I realised that the data range of the NDVI Images are different. The raster calculator results between -0.242 - 0.568 and the vegetation index under processing toolbox results between -0.225993 - 0.553768.
Can this be due to rounding or is there something that I may be missing?

I also use the raster layer statistics tool to see if these two NDVI images are really different. The results are:

From vegetation index algorithm:
Valid cells: 42384039
No-data cells: 15942162
Minimum value: -0.991935491562
Maximum value: 0.982142865658
Sum: 2857838.41327
Mean value: 0.0674272315876
Standard deviation: 0.184433938177

From raster calculator (which I choose from the dropdown menu bar of Raster)
Valid cells: 42696562
No-data cells: 15629639
Minimum value: -1.0
Maximum value: 1.0
Sum: 2862525.41327
Mean value: 0.067043463904
Standard deviation: 0.20274331204


texts:
when I zoom level 16  and over I have two circle segments, I don't know if it's normal (projection) or a bug.

Have you an idea ?

Openlayers : 2.13.1
Problem With Chrome, IE and Firefox

formula circle

function CircleMax(radius)
{
var pointsCircle = [];
var side = 160;
var angle;
var projectedLonLat, geometryPoint;
var points = [];
for (var i = 0; i < side; i++)
{
    angle = (i * 360 / side) + side;
    projectedLonLat = OpenLayers.Util.destinationVincenty(centerCircle, angle, radius);
    projectedLonLat.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));
    geometryPoint = new OpenLayers.Geometry.Point(projectedLonLat.lon, projectedLonLat.lat);
    pointsCircle.push(geometryPoint);
}
var layerCircleStyle = OpenLayers.Util.extend({}, OpenLayers.Feature.Vector.style['default']);
var style_poly = OpenLayers.Util.extend({}, layerCircleStyle);
style_poly.strokeColor = "red";
style_poly.fillColor = "transparent";
var linearRing = new OpenLayers.Geometry.LinearRing(pointsCircle);
var polygonFeature = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Polygon([linearRing]),{},style_poly);
circleMaxLayer.addFeatures([polygonFeature]);

}

Zoom level 6

Zoom level 16 and over


texts: Script for creating a tile-pyramid from a wms service

texts:
Given a WMS service, is there a ready-made script that, for a given extent, creates a tile-pyramid that is compliant with:

http://leaflet.cloudmade.com/reference.html#tilelayer

That is urls on the form:

'http://{s}.somedomain.com/blabla/{z}/{x}/{y}.png'

I think what I want is MapProxy. I can configure a TMS layer that caches my WMS service, and copy the files that it generates.