texts: Getinfo only returns the first cover inserted

texts:
I'm using GetInfo to view the cover information and my problem using this command is: The information displayed is not from the cover seen on the map, but from the first cover inserted in the code. I always see information from the cover Layer_21_11_19 even if I'm seeing and clicking on the cover Layer_12_12_19.
Please, does anyone know how to show the information only on the cover I'm seeing and clicking?
map.on('click', function getInfo(e){
 if(e.name !== 'Click'){
  e.name = "Click";
  map.addEventListener('click', (evt) => {
   const projection = map.getView().getProjection().getCode()
   const isGlobal = map.getView().getProjection().isGlobal()
   const viewResolution = view.getResolution();
   const wmsSource = new ol.source.ImageWMS({
    url: 'http://localhost:8080/geoserver/WORK/wms',
     params: {'LAYERS': [
      'Layer_21_11_19',
      'Layer_23_11_19',
      'Layer_12_12_19'
     ]} });
   url = wmsSource.getFeatureInfoUrl(
    evt.coordinate,
    viewResolution,
    'EPSG:4326',
    {'INFO_FORMAT': 'text/html','FEATURE_COUNT': 1}
   );
   if(url){
    const closer2 = document.getElementById('popup-closer2');
    const content2 = document.getElementById('popup-content2');
    const xhttp = new XMLHttpRequest();
    xhttp.onreadystatechange = () => {
     if (xhttp.readyState === 4 && xhttp.status === 200) {
      content2.innerHTML = xhttp.responseText;
      thisoverlay2.setPosition(evt.coordinate)
     }};
     xhttp.open("GET", url, true);
     xhttp.send();
    } else if (e.name === 'Click'){
     e.name = "Unclick";
     map.removeEventListener('click');
    } }) } } })


texts: Inconsistent zoom levels for OpenLayers image and vector map layers

texts:
My OpenLayers map has 2 seperate layers, a TileLayer with a custom XYZ source and a VectorTileLayer with a custom VectorTile source:

var tileSource = new ThemedTileLayerSource({ url: this.props.url + "/GetThemedTile/{x}/{y}/{z}" }, this.props.theme);
var tileLayer = new TileLayer({ source: tileSource });

var labelSource = new LabelLayerSource({ url: this.props.url + "/GetLabels/{x}/{y}/{z}" }, this.props.theme, this.Map);
var labelLayer = new VectorTileLayer({ declutter:true, source: labelSource });

this.Map.addLayer(tileLayer);
this.Map.addLayer(labelLayer);
this.Map.setView(new View({ center: [2690583.3956,-3375459.1691], zoom: 5, minZoom: 5, maxZoom: 18, constrainResolution: true }));
this.Map.setTarget(this.MapDiv);

When the map initialises, even though zoom and minZoom on the view are set to 5, the vector tile layer requests tiles for zoom level 4 (the tile layer works correctly and requests tiles for zoom level 5). The vector tile layer will, from then on, consistently request tile data 1 zoom level below the tile layer each time the map is zoomed.

If I go ahead and attach minZoom and maxZoom properties to the sources:

var tileSource = new ThemedTileLayerSource({ url: this.props.url + "/GetThemedTile/{x}/{y}/{z}", minZoom:5, maxZoom: 18 }, this.props.theme);

var labelSource = new LabelLayerSource({ url: this.props.url + "/GetLabels/{x}/{y}/{z}", minZoom:5, maxZoom: 18 }, this.props.theme, this.Map);

Both layers start correctly and both request tiles for zoom level 5, but when zooming beyond zoom level 5, the vector tile layer once again remains 1 zoom layer behind the tile layer as it did without the min and max zooms set.

Interestingly, when zooming from level 5 to 6, the tile layer retrieves tiles for zoom level 6, but the vector layer does not request any new tiles at all. From then on, every time the map is zoomed the vector tile layer will request tiles for 1 zoom level below the tile layer.

Given that my max zoom on the view is set to 18, the issue with the vector tile layer means I can never retrieve the vector features beyond zoom level 17 for the vector tile layer.

Both the sources override the tileLoadFunction to make a simple XHR request to the server for the data they need and make no changes to the request URL:

tileLoadFunction = (tile, url) =>
{
    request.open("GET", url, true);
    request.responseType = "json";
    request.setRequestHeader("Content-Type", "application/json");

    request.onload = function(e)
    {
        ...
    }

    request.send();
}

Does anybody know if this is a bug with OpenLayers or if I've just configured it incorrectly? And more importantly, how I can go about synching the zoom levels across the layers.


texts: Finding distance (in time) from nearest point out of 4 along road network using ArcGIS Desktop?

texts:
I have four points representing harbors along the coast.  I also have a roads layer that has info on each road segment such as length, speed limit, and travel time.

I calculated travel time with [(length in miles) / (speed limit in mph)] * 60 for the time it takes to traverse each road segment in minutes.

What I want to do now is: Work out from each harbor point along the road networks to get the total travel time to the nearest harbor for each road segment.  All the tools I've found that do something similar to this require both a start and end point.

Is there a way to do this without turning each road segment into a point itself?

To better visualize my end goal, I essentially want a sort of "Euclidean Distance" effect, except it needs to stay along the roads layer and will total in time rather than meters/miles/etc.

I am using ArcGIS Desktop 10.0.


texts: How to get first, most current coordinate in GeoCoordinateWatcher?

texts:
It seems like when I have an app that uses a GeoCoordinateWatcher and I attempt to get the first coordinate, it always pulls the last coordinate that the GPS used first when raising the PositionChanged event. It's not always the first PositionChanged event, but the last time an app used a GeoCoordinateWatcher.

Any idea why this would be the case? I understand that it also tracks the GPS entry when the device just sits and looks like its not (due to the sensitivity).


texts: Spatial query that does not split objects

texts:
I’m a novice user of QGIS. I have searched this site and failed to find an ability to split a layer into new layers based on a secondary input.

I have a layer of buildings with no attributes. I want to devide them into new layers/files by zip code. I have a layer with zip codes. Both are in the same CRS. However when I use split or intersection operations it will cut the house in half if it crosses the zip code. Is there a way to retain the integrity of the house and have it duplicated into both zip code layers?


texts: Exploding features based on numerical field in QGIS?

texts:
I have a set of data as polygons, each with a Number field with value X. Is there then a way to copy this into X number of polys at the same location? (ideally points distributed across the poly but that's a bonus).

In QGIS I have tried Random Points, but this doesn't inherit attributes, and Join Attributes by Location is useless if the parent polys overlap.

The reason behind this is for collating data easily with the GroupStats plugin.


texts: Filtering data with more than 2 criteria in lidR

texts:
I am just wondering whether lasfilter() is able to filter the las data with more than two criteria such as z value between 5 and 10 m and Number of point records greater than 1. I have tried the following code but it didn't work. I don't know how to filter the datasets with multiple criteria. There are 1173 files in my folder but when I used the following code it could only write 67 files because after 67th file there is another file which doesn't have point fitting with this criteria. So I want to write all those files which do meet the above criteria.

plotlist16 <- list.files(path = "./data/LidarData/2016_random_plot/AllTogether/normalized", pattern = ".las", full.names = T, recursive = FALSE)

for (i in 1:length(plotlist16))
{
   Rplot <- readLAS(plotlist16[i])
   ht_1.3_5m <- lasfilter(Rplot, Z>=1.3 & Z<5) # with this could only write 67 files
   ht_1.3_5m <- lasfilter(Rplot, Z>=1.3, Z<5, Rplot@header@PHB$Number of point records>=1) # so want to filter with third criteria which has at least one point in this height range

   file_name <- gsub('.*/','',plotlist16[i])
   file_name <- gsub('.las','',file_name)
   file_name <- print(file_name)

   outname <- paste0('./data/LidarData/2016_random_plot/AllTogether/stratawise/strata_1.3_5m/', file_name, "_ht_1.3_5m.las")
   writeLAS(ht_1.3_5m, outname)
}


texts: Applying Extrude Expressions to Multiple Layers/Shapefiles in Arcscene? Python script

texts: I have 100 shapefiles of cities with census tracts that I need to be extruded to certain values. I already have the shapefiles set up the way they need to be and would like to avoid manually opening every file to set the extrude expression. Can I use python to do this? I don't mind running 100 lines of script (1 for each file), but I can't seem to figure out how to do that either.


texts: Iterating table fields to create individual Shapefiles

texts:
I am trying to create individual shapefiles from a single table that contains the following:

Weather Station Names
Station XY Cordinates
31 individual field columns of daily data for each weather station

I am trying to use the iterate field values from another spreadsheet that contains only a single column the date of the weather data that I want to create each individual shapefile.  The dates in that spreadsheet match the column field heading in the spreadsheet that contains the daily data.

I am getting an error in the Make XY Event Layer when I try to set the "Z Field" to "Value" for the iteration process.  I have attached an image of my model below.

Any advice on how to get this thing to run?


texts: Tool for rendering/drawing maps from coordinates

texts:
What tools can be used to convert a set of coordinates into polygons?

For example: this code represents a room by providing information about it's four corners.

<node id='-202' lat='41.015146' lon='6.092984' />
<node id='-200' lat='41.015146' lon='-6.092817' />
<node id='-198' lat='41.015075' lon='-6.092977' />
<node id='-196' lat='41.015090' lon='-6.092806' />

<way id='-266' type='room'>
    <nd ref='-202' />
    <nd ref='-200 />
    <nd ref='-198' />
    <nd ref='-196' />
 </way>

What I want to do is read that information and draw the respective room. Making possible that way to have an indoor map.

This screenshot shows the kind of result that I'm trying to achieve. Where the outline of the  rooms of a building was converted into a well designed map, unfortunately that app is for android only.

In this community the feature "Delimited Text Layer" of QGIS has also been suggested. Is there any other tools to perform this kind of task?


texts: Assign point data in different location according to criteria

texts:
I have a set of farms which are assigned to grid squares and the exact coordinates are unknown.

I also have a layer which subdivides the grid squares according to topographic, climate conditions etc... in each of these categories. Each farm falls in one of these categories which is known from the dataset.

How can I assign the farms into points that are randomly somewhere in the grid square and also in the subdivided topographic area?

For instance, in the Example 1 , it is known that the farm belongs to upland area (green area). So how do I reallocate it in the green area that falls within the grid square boundaries?


texts:
What applications and workflow(s) do you use for gathering, displaying and storing GPS data, with your centralised corporate data, for people who are not GIS folk?

We're in the process of standardizing across all branch offices and I'd like to hear what other folks are doing. While we have GIS users there is a significant and growing number of staff who are not and will never be GIS practitioners but are nevertheless called upon to work with spatial data. Putting Arcmap on the desktop is too expensive in time and training let alone dollars, which also knocks Quantum GIS and friends out of the running.

Google Earth is certainly easy to use and the latest versions import GPS data with a minimum of fuss. GE doesn't work for us because their base imagery in our area is so poor it doesn't line up with GPS data by tens of metres and there is no facility to replace their base with our own. Also the GE elevation model is poor and the GPS tracks disappear beneath the ground unless one discards the GPS elevation on import.

The free ArcReader solves admirably the problem of fast and easy geo browsing with custom base data  -- provided the central agency has ArcPublisher, which we do -- but there is no means of easily dropping GPS data on top.

Garmin now has the free Basecamp, but there doesn't seem to be an easy means of getting the GPS data out of Basecamp and into our central data repository (unless I've missed something?).

So how about it, what do you do?

UPDATE:At the moment the primary use case is for field staff (water license inspectors, conservation officers, wildlife biologists) to collect points and tracks in the field, bring them back to the office, overlay on our in-house base data, pan/zoom/browse/etc., do the odd Identify query, export as bitmap or wmf to include in a report, and save the GPS data somewhere in an ArcGIS accessible format.

We, the real GIS folk, pick up the GPS data from the drop box and stuff it into a proper geodatabase for shared corporate use, after the appropriate data massage is complete.


texts: RQGIS3 : AttributeError: module '__main__' has no attribute 'RQGIS3'

texts:
I am trying to use the RQGIS3 package to access QGIS3 functions from R, and although briefly I had things working (mostly), running the following code:

library(RQGIS3)
qgis_env <- set_env("C:/Program Files/QGIS 3.4")
qgis_session_info(qgis_env=qgis_env)</code>

now produces the following error:

Error in py_get_attr_impl(x, name, silent) :
  AttributeError: module '__main__' has no attribute 'RQGIS3'

I'm not sure what changed. Another post suggested that the order in which packages were loaded determined whether this error cropped up, but in my case, I have not even loaded any other packages. I am pretty new at using RQGIS(3), and know next to nothing about Python.

I am using QGIS 3.4.7, and R 3.5.0 (I will get out IT staff to upgrade R next week to see if that fixes things).

Any thoughts what else might be going on here?


texts: Trouble adding tabs in identity popup JS API

texts:
May 28 Edit

I have edited my code a bit and have come up with a fix to the tab container, however I am now having troubles getting my attributes to show when I click on one of my service layers.  This is what I have so far

    var infoWindow = new InfoWindow(null, domConstruct.create("div"));
    infoWindow.startup();
    map.infoWindow.resize(300,300);

//Create info template to hold the content inside
var vliTemplate = new esri.InfoTemplate();
vliTemplate.setTitle("VLI");
vliTemplate.setContent(getWindowContent);

function getWindowContent(graphic) {
//VQO
//make a tab container
var tc = new dijit.layout.TabContainer({
style:"width:100%;height:100%;",
useMenu: false,
useSlider:false,
}, dojo.create("div"));

//add content pane 1 and 2 - these are the tabs
var cp1 = new dijit.layout.ContentPane({
title: "Current",
content: "Visual:
VLI Number: " + graphic.attributes.Tbl_ResultSummary_VQO_CFLBarea + "
	"
});
var cp2 = new dijit.layout.ContentPane({
title: "Approved",
content: "

VQO: ${Tbl_ResultSummary_VQO_EVQO_CD}
	"
});

tc.addChild(cp1);
tc.addChild(cp2);
return tc.domNode;
}

As you see my cp1 and cp2 have different ways of showing my attributes (in order to try and find something that works) cp1 "Current" tab when clicked on reads "Undefined" as the attribute information, and cp2 "Approved" tab shows text written as

VQO: Tbl_ResultSummary_VQO_EVQO_CD

Now i'm trying to figure out how to properly get my attributes to display in the appropriate tab pane!

May 22

I have a ArcGIS JS API map created with an InfoTemplate popup to display attributes but I need to have a tab in my popup window so that I can display different attributes from the same service.  For example on one tab I will have "Current" attributes, and in the other tab I will have "Approved" attributes.  This is my code for my InfoTemplate, but I don't know how to wrap the tab function around what I currently have displayed.

var vliTemplate = new InfoTemplate(
"Visual", "
VLI Number: ${VLI_VLI_NO}
	"+
"

VQO: ${Tbl_ResultSummary_VQO_EVQO_CD}
	"+
"

VAC: ${Tbl_ResultSummary_VQO_VAC_FIN_CD}
	"+
"

CFLB Area: ${Tbl_ResultSummary_VQO_CFLBarea:NumberFormat(places:0)} Ha
	"+
"

THLB Area: ${Tbl_ResultSummary_VQO_THLBarea:NumberFormat(places:0)} Ha
	"+
"

Total Area: ${Tbl_ResultSummary_VQO_HA:NumberFormat(places:0)} Ha
	"+
"

Greened Up Height: ${Tbl_ResultSummary_VQO_Height:NumberFormat(places:0)}m
	"+
"

Not Greened Up CFLB: ${Tbl_ResultSummary_VQO_Not_Greened_Up_Ha:NumberFormat(places:0)} Ha
	"+
"

Greened Up CFLB: ${greened:compare6}Ha
	"+
"

Maximum Target Percent: ${Tbl_ResultSummary_VQO_Pct_tgt:NumberFormat(places:0)}%
	"+
"

Maximum Target: ${Tbl_ResultSummary_VQO_Target_Ha:NumberFormat(places:0)} Ha
	"+
"

Surplus/Deficit: ${surplusDef1:changeColor6}
	")

compare6 = function (value,key,data) {
 var result = "", diff;

 switch (key) {
    case "greened":
      diff = data.Tbl_ResultSummary_VQO_HA - data.Tbl_ResultSummary_VQO_Not_Greened_Up_Ha;
      break;

}

   result = diff.toFixed();
   return result;

};

I have been looking at the sample on https://developers.arcgis.com/javascript/jssamples/find_drilldown.html but I'm stumped....


texts: Using Sort tool in ModelBuilder of ArcMap

texts:
I am using the model builder in ArcMap to create zonal statistics as table (daily time series-so iterating rasters in the beginning). The tool works fine, it's just that I have another additional step, where I want the zonal statistics table to be sorted in descending order (for the polygon IDs) rather than the default ascending order. So, for that I added the sort tool in the model, the tool is then linked to the append tool to finally merge all the zonal tables into a single table. In all this I am getting an error in the append tool which states that all the inputs need to be in the same format. Although, in the sort tool I am setting the sort output as table and target dataset in Append tool is also a .dbf table.
How to fix this in ArcMap 10.7.1?


texts: Applying NDVI formula with PyQGIS on multiple rasters in the Layers Panel

texts:
I'm trying to write a Python script in QGIS using the Python console that applies the NDVI formula to all rasters in the Layers Panel, and outputs a new NDVI raster for each original raster. My skill level in Python is very minimal, considering that, I've made some decent progress thus far.
My current script references all rasters in the Layers Panel, and outputs a resulting raster with a pre-determined naming convention.

The problem that I'm having is the new NDVI rasters have "nan" values and are therefore useless. I've read a number of blogs on this issue but to no avail. I believe the issue exists in how I'm referencing the red and nir bands (see the Raster Calculator and how the resulting NDVI layer only has one band), and/or how they're being applied in the Raster Calculator.

    import glob, qgis
    from PyQt4.QtCore import QFileInfo
    from qgis.analysis import QgsRasterCalculatorEntry, QgsRasterCalculator
    from qgis.core import QgsMapLayerRegistry, QgsRasterLayer
    import processing

    lddLrs = qgis.utils.iface.legendInterface().layers()
    path = "D:/QGIS/Project/"
    for lyr in lddLrs:
        entries = []
        ras = QgsRasterCalculatorEntry()
        ras.ref = 'ras@1'
        ras.raster = lyr
        ras.bandNumber = 1
        ras = QgsRasterCalculatorEntry()
        ras.ref = 'ras@4'
        ras.raster = lyr
        ras.bandNumber = 4
        entries.append( ras )
        calc = QgsRasterCalculator( '(ras@4 -  ras@1) / (ras@4 + ras1)', path
        + lyr.name() + "_NDVI.tif", 'GTiff', lyr.extent(), lyr.width(),
        lyr.height(), entries )
        calc.processCalculation()


texts: How to make two vertices to have a certain bearing in QGIS

texts: I have a shapefile in QGIS which was hand-drawn and I want to align the N/S and E/W lines to true N/S and E/W, is there a way to select the two vertices of the line and make one/both move to make the line a specific bearing?


texts: How do you get values of variables in Chrome Developer Tools console for ArcGIS Javascript API?

texts:
I'm sure this question could be worded better, but here's what I'm trying to do...
I create a map (using ArcGIS Javascript API 4.17)  I have my javascript in a separate file (app.js)
index.html:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>ArcGIS Javascript API Tutorial</title>
    <link rel="stylesheet" href="style.css">
    <link rel="stylesheet" href="https://js.arcgis.com/4.17/esri/themes/light/main.css">

app.js:
require([
    "esri/Map",
    "esri/views/MapView",
    "esri/layers/FeatureLayer"
], function (
    Map,
    MapView,
    FeatureLayer
    ) {
    var map = new Map({
      basemap: "streets"
    });

    var view = new MapView({
      container: "viewDiv",
      map: map,
      center: [-81.91, 40.55], // longitude, latitude
      zoom: 13
    });

    var myFeatureLayer = new FeatureLayer({
        url: "https://services1.arcgis.com/<myFeatureLayerUrlInfo>"
    });

    map.add(myFeatureLayer);

  });

Now what I want to do is open up Chrome Developer Tools and on the console tab, type in:  ap_holmes_FL <ENTER>  to get info on that feature layer.  However, I get the message: Uncaught ReferenceError: ap_holmes_FL is not defined
Am I just missing something incredibly simple?  (Hint, I'm not a javascript expert...)


texts: Adding points with defined intervals in QGIS

texts: I'm trying to make a grid with points of defined intervals (e.g. 5 m). How can I achieve this with QGIS?


texts: Zoom to see entire MapLayer in Bing Maps

texts: If I have a MapLayer that I'm applying to Bing Maps where I have a list of coordinates, how can I zoom to see the full MapLayer (dynamically zoom to the proper size) and toggle between seeing the starting point and ending point?


texts: Using ArcPy to run Report Layout File (RLF) report and add to layout (for Data Driven Pages)?

texts:
I currently have a data driven page template set up which I manually cycle through and for each page run a Report Layout File (RLF) report and then add this to the ArcMap layout.  The added element is then positioned on the legend to give additional data to the map user.  The RLF draws it's data from the attribute table of a map layer that is not the DDP index layer.

I now want to automate the production of these maps.  I have no problem with the scripting for the data driven page and exporting side of things, but not sure how to go about adding the report for each page before exporting.

Can anyone suggest if there is a way to do this?

I looked at arcpy.mapping.ExportReport but couldn't see how this works with bringing them back into the mxd and positioning them?  It seems to be more for exporting standalone reports to later add to a book.  Also the outputs were not quite the same as what the run report option within Arcmap produces, which is perfectly aligned to the size I need. They were either the wrong size, layout, or quality.

I also considered adding tables as is described here but don't want the grid lines to show.


texts:
I am attempting to do a project for work that requires checking general (assumed or average) flight paths (position and speed along the route) against other data. Does this exist somewhere?

Ideally there would be some database. I could build some average paths from some of the live updating sites I've seen, but I haven't found a way to actually pull off data using a program.

Flight paths in the Mediterranean specifically.

Ideally I could get something like:
{latitude, longitude, altitude, magnitude of velocity}

EDIT: I did find this (https://developer.flightstats.com/api-docs/flightstatus/v2) which looks like I could write something to potentially average out some flight paths, but if there is already something out there that exists I would much prefer to not have to do that.


texts:
I'm developing a plugin in QGIS using the Keras' library for deep learning.

I have some problems when I load and save the model.

The error is the following:

  File "h5py/h5p.pyx in h5py.h5p.PropFAID.set_libver_bounds
               ValueError: Invalid high library version bound (invalid high library version bound)


texts: Is the Albers Equal Area projection only useful for calculating the area over small differences in longitude?

texts:
I've been trying to calculate the area of a map, given its WGS 84 coordinates, with the following code:

import pyproj
import shapely
import shapely.ops as ops
from shapely.geometry.polygon import Polygon
from functools import partial

geom = Polygon([(-90, 40), (90, 40), (90, 45), (-90, 45), (-90, 40)])
geom_area = ops.transform(
    partial(
        pyproj.transform,
        pyproj.Proj(init='EPSG:4326'),
        pyproj.Proj(
            proj='aea',
            lat_0=(geom.bounds[1] + geom.bounds[3])/2
            lat_1=geom.bounds[1],
            lat_2=geom.bounds[3])),
    geom)

# Print the area in m^2
print(geom_area.area)

This works for the most part, but if I try it with the coordinates given in the code above, I get an area of 3303671782400.2344 square metres, while inputting the coordinates in GeoJSON gives me 8220117041870.774 square metres. I suspect that it may be that Albers Equal Area just isn't very accurate over such big differences in longitude, but I'd just like to confirm or know whether it's something else that I'm missing.

I've also tried it with other coordinates, for example I set geom = Polygon([(-90, 40), (-100, 40), (-100, 45), (-90, 45), (-90, 40)]), and the answer is fairly accurate at 455342769143.7002 versus 456673168992.82043 from GeoJSON.


texts: QGIS - Translate group of polygons to centroid

texts:
Using QGIS Process Modeler, I need a way to create a grid that is centered on an input feature. My issue is that the [Create grid] algorithm, creates a grid whose upper left corner is aligned to the upper left corner of the extents defined during the grid creation process (as opposed to aligning the center of the grid to the center of the input feature's extents like I want).
I am able to shift the grid using the [Translate] algorithm, but (in Process Modeler) I do not know how to easily calculate the XY shift between the two respective centroids and incorporate that shift back into an expression in Process Modeler.
Does anyone have any suggestions?


texts: ResultObject: Error in getting output (os.path.join to SDE)?

texts:
I have a scratch FileGeodatabase where I do some raster processing...

arcpy.env.scratchWorkspace  = r'C:\test\scratch.gdb'
arcpy.env.workspace = arcpy.env.scratchGDB
arcpy.env.overwriteOutput = True

I have a SDE connection that is my final output location...

folder_path = r'C:\test\testfolder'
test_SDE = arcpy.CreateDatabaseConnection_management(folder_path,
                                                   out_name='SDEconnection',
                                                   database_platform='SQL_SERVER',
                                                   instance='test_instance',
                                                   account_authentication='OPERATING_SYSTEM_AUTH',
                                                   database='test_database',
                                                   version_type='TRANSACTIONAL',
                                                   version='dbo.default')

I'm using arcpy.copyRaster_management to copy raster datasets out of my scratchGDB into the SDE...

arcpy.CopyRaster_management(rasteroutput, os.path.join(test_SDE, "testSDEraster"))

I am getting the following error:

<class 'arcpy.arcobjects.arcobjects.Result'>
ResultObject: Error in getting output

How do I copy the raster datasets into my SDE? I think it has something to do with the os.path.join.


texts:
Ok, so this has probably been asked by someone else out there somewhere but I can't find it via google or this stack, so...

I've got two tables from an SDE database (SQLServer Express 2008 r2) that are joined.  Now I'm trying to write a SQL Select by Attribute statement that tests if string from one table is like string from another table.

What I tried looks something like this:

"Database1.DBO.RoadsFC.Field1" LIKE '%Database1.DBO.RoadsAnnotation.TextString%'

I've tried various other combinations such as '%'+Database1.DBO.RoadsAnnotation.TextString+'%' but nothing I've tried has validated or run correctly (when it does work it's reading Database1.DBO.RoadsAnnotation.TextString as the string to test against, not the value of that field to test against).

Again, sorry if this's been asked, but I couldn't find it.


texts: Compare attribute columns of a feature class in ArcGIS

texts:
Is there a solution in ArcGIS 10x? Thanks.
I used GME (newer Hawth's Tools) and was able to count the number of pixels of any raster class within a vector polygon. I am trying to map crops within a field, so sometimes there can be different classes (crops) within a field polygon.
GME spits out class counts as different columns. So if I have 3 raster classes, three count columns.
I am looking for a solution to compare the counts of these 3 columns and identify the highest count and attribute that to a new column. I.e. I want to identify the dominant crop within the field.
I can look at the column count numbers and identify the dominant class, but this isn't very efficient when you have 100's of fields.
Sothing similar is what I am looking for: http://www.get-digital-help.com/2009/07/17/extract-largest-values-from-two-columns-using-array-formula-in-excel/

This still doesn't work and Python gives error. I edited the V#V1 as Canola, V#V2 as Barley, V#V3 as Wheat by adding three new text fields, ![enter image description here][1]and then ran:

GetMaxFieldName({"Canola": !Canola!,"Barley": !Barley!,"Wheat": !Wheat!})

A friend helped me solve it in Excel. 1) Run MAX formula in a new column ("Max"; column O) on the four classes (rows K1:N1) to identify the highest count. 2) Add new column ("Crop", column P) after Max and run: =INDEX($K$1:$N$1,1,MATCH(O2,K2:N2,0))

See image links:
http://postimage.org/image/68ham84uv/
http://postimage.org/image/r1sz7e21l/

Let me know if you solve this with Python.


texts: Accessibility to developer of "Alter" and similar constructs in MapInfo MapBasic

texts:
Parts of the MapInfo MapBasic API are accessed as follows:

  Alter ButtonPad "Main"
        Add ToolButton
            ID 101
            Icon 8
            Calling OnToolClicked
            HelpMsg "Custom Edit Tool.\nCustomTool"
        Show

The Alter ButtonPad statement with nested Add and Show commands looks a bit like the builder pattern or a "fluent" interface in object oriented languages. I'm wondering if the Alter ButtonPad statement is defined with a language construct that a developer can take advantage of when building a MapBasic application.

For example I'm developing an application that will dynamically populate a form with drop-down lists. It would be nice if I could build up the constraint lists with something like:

Create ConstraintCollection
    Add Property
        Name "property"
        Add Value "value 1"
        Add Value "value 2"
        Add Value "value 3"

Is defining this Create ConstraintCollection statement something that is possible with MapBasic?


texts:
I have several raster tiles . I have merged them. I don't know why I get a black boarder around the merged map (the pixel values are 0)
I have created a polygon for the area of interest to remove the black area but the raster clipper seems doesn't work and again after the clip, I have the black border around my raster.
 First I don't know why Qgis creates the black border and

Second I don't know why the Raster clipper doesn't work!

I now that I can remove the black border (Just for visualization purposes) through property --> transparency tab. I am looking for a permanent solution)


texts: Create Pseudo Drilling Spacing Units - Polygon inside another polygon from its boundaries

texts:
I am trying to create pseudo Drilling Spacing Units. That corresponded with the section, township and range that they are generated from.

I am working with Sections from the Land grid in Oklahoma; Section Township and Range.

I need to generate a new polygon inside each section, with specific distances from the section boundary that it is generated inside of. The new polygon needs to be parallel with the boundary line and 165' from the north line, 165' from the south line, 330' from the west line and 330' from the east line.

This is ruffly what one new DSU (Drilling Spacing Unit) would look like

This is a schematic for what dimensions and the boundaries that are generated from.

The finished product would auto-generate the polygons like so:

I have used the buffer tool to create a polygon from the midpoint, however the boundary's that the new polygon draws from will change as you move across townships / ranges. so i need to go off each sections unique boundary.


texts: Is there an R package to download a shapefile of points for LEHD data?

texts:
The Census OnTheMap download links seems regular in formatting 1.  This suggest someone may have already written an R package to download these files. Does such a package exist?

Other Comments:

I don't want Decennial Census, or ACS (or else I'd use totalcensus or tidycensus).
I already have the tabular data (CSV).
Once I have a link, I know how to download it.

If not, how might I do so?  (I have a list of about 30 counties I wish to do it for). The links seem regular. Regular links, for SLC, Utah and Denver, Colorado:

https://onthemap.ces.census.gov/cgi-bin/report.py?report_id=otm_d2c5f4708fff45dd8a153aeea29b66ae&settings=%7B%22analysis_type%22%3A%22area_profile_report%22%2C%22view%22%3A%22summary%22%2C%22characteristic%22%3A%22c000%22%2C%22year%22%3A2015%2C%22job_type%22%3A%22jt00%22%2C%22ap_segment%22%3A%22s000%22%2C%22origin%22%3A%22work%22%2C%22color%22%3A%5B%22%230000AA%22%5D%7D&mode=export_geography&format=shp

https://onthemap.ces.census.gov/cgi-bin/report.py?report_id=otm_b874bc58baa84cbea0d57c2f654450ef&settings=%7B%22analysis_type%22%3A%22area_profile_report%22%2C%22view%22%3A%22summary%22%2C%22characteristic%22%3A%22c000%22%2C%22year%22%3A2015%2C%22job_type%22%3A%22jt00%22%2C%22ap_segment%22%3A%22s000%22%2C%22origin%22%3A%22work%22%2C%22color%22%3A%5B%22%230000AA%22%5D%7D&mode=export_geography&format=shp

The string for the download link consists of 3 parts, the first and third of which are identical, viz:

1) https://onthemap.ces.census.gov/cgi-bin/report.py?report_id=otm_
2a) d2c5f4708fff45dd8a153aeea29b66ae
2b) b874bc58baa84cbea0d57c2f654450ef
3) &settings=%7B%22analysis_type%22%3A%22area_profile_report%22%2C%22view%22%3A%22summary%22%2C%22characteristic%22%3A%22c000%22%2C%22year%22%3A2015%2C%22job_type%22%3A%22jt00%22%2C%22ap_segment%22%3A%22s000%22%2C%22origin%22%3A%22work%22%2C%22color%22%3A%5B%22%230000AA%22%5D%7D&mode=export_geography&format=shp

In other words, is there a way to use R to automate a query on a webmap server?


texts: How to intersect two geodatabases in ModelBuilder?

texts:
Trying to intersect features from two file geodatabases in model builder. However, the databases can not be connected to the intersect as input features.

Second opting - put all features into one database, but in this case it will just run on individual features without results.

Each database has several points or polygon layers, which are not necessary overlap.


texts: Does anybody know where to download the QGIS toolbar icons?


texts: Accessing gdalinfo and gdal tools on colab

texts:
I can access the python wrapper to gdal using the approach here:
http://www.acgeospatial.co.uk/colaboratory-notebooks-and-gdal/
However is there a way to access gdal tools like gdalinfo directly in colab?


texts: QGIS Plugins from Local Source (Firewall excludes Official Repository)

texts: Is there a way to load Plugins From a local Source rather than using the Official Repository. As the authority I work for do not allow QGIS to go past their firewall.


texts: I have a few thousands of polygons, which I found the centroid for each one of them. Now I want to find the coordinates of each centroid. But for some reason the x and y columns are empty and I don't know how to fix it.


texts: Editable views in QGIS - update affects the wrong row

texts:
Updating views from QGIS doesn't work as I expect it to work.

I've got the following (simplified) tables, views and triggers:

    CREATE TABLE public.parcels
    (
      id serial,
      geom geometry(MultiPolygon,27700),
      "Land Registry Reference" character varying(30),
      type integer,
      area double precision,
      "Design Issues" text,
      sys_period tstzrange NOT NULL DEFAULT tstzrange(now(), NULL::timestamp with time zone),
      CONSTRAINT parcels_pkey PRIMARY KEY (id)
    )
    WITH (
      OIDS=FALSE
    );

    CREATE TABLE public.owners
    (
      id integer,
      "Title Number" character varying,
      "Proprietor Name" character varying,
      sys_period tstzrange
    )
    WITH (
      OIDS=FALSE
    );

    drop view if exists from_two;

    CREATE VIEW from_two as(
      select "parcels"."id" AS "id",
      "parcels"."Land Registry Reference",
      "parcels"."geom",
      "owners"."Proprietor Name",
      "parcels"."Design Issues",
       ROW_NUMBER() over() AS uid
    FROM "public"."parcels"
    LEFT OUTER JOIN "owners" ON "parcels"."Land Registry Reference" = "owners"."Title Number"
    );

    CREATE OR REPLACE function update_from_two()
      returns trigger
      AS $f$
      BEGIN
        UPDATE public.parcels
        SET
        id = NEW.id,
        "Land Registry Reference" = NEW."Land Registry Reference",
        geom = NEW.geom,
        "Design Issues" = NEW."Design Issues"
        WHERE id = OLD.id;

      UPDATE owners
      SET "Proprietor Name" = NEW."Proprietor Name"
      WHERE "Proprietor Name" = OLD."Proprietor Name";

    return NEW;
    END;
    $f$ LANGUAGE plpgsql;

    DROP trigger if exists tg_fromtwo on from_two;

    CREATE  TRIGGER  tg_fromtwo
    INSTEAD OF UPDATE
    ON from_two
    FOR EACH ROW
      EXECUTE PROCEDURE update_from_two();

it all works fine and when I update the view in pgadmin with

UPDATE from_two
SET
  id = 244,
  "Design Issues" = 'None'
WHERE id = 244;

I also can open this view in Qgis, but when I edit data and save it, the edited data ends up in the wrong table row. Do I have to do something different to be able to update correctly in Qgis?

I'm using Postgres 9.5, Postgis 2.2.2 and QGIS 2.16.2


texts: ArcSDE register with gdb vs register as versioned

texts:
When wanting to update tables within a sde gdb, is there a difference between registering as versioned vs registering with the gdb vs registering with sde?  I've read the question below and it hints that versioning is a subset of gdb registration.

I am hearing that Unregistering a table as versioned will allow the use of sql to update the table, I assume directly from say SSMS.

We are at ArcGIS for Server 10.1 and Microsoft SQL Server 2008 R2.

Difference between registering with ArcSDE and registering with Geodatabase?


texts: How to take object style (pen, brush, symbol) in MapBasic?

texts:
How can I take style from existing object?
Brush from region, symbol from point?

In MapBasic documentation and in Google I can find only how to change object's style but can't find how to take it.


texts: Symbology using multiple attributes in QGIS 2.18

texts:
Within a single polygon shapefile, describing the geological regions of Canada, I have 5 attributes I am hoping to combine to present a cohesive symbology. For the Legend I would like to display data from the "GENETIC250" field and, where that is blank, from the "GENETIC1MA" field. These data will also be ideally represented using the RBG values given within the 3 relevant columns. This last step is done easily enough, i.e.color_rgb("RED","GREEN","BLUE"), but I am struggling to incorporate the other expressions into the symbology.
Using QGIS 2.18.x, can anyone suggest a solution?


texts: Why does SQL job choke on stored package?

texts: I've written a stored package to pull a text file into a table in the geodatabase.  It works perfectly.  However, when it is a step in a SQL job, the job fails at that step.  I'm looking for ideas on how to troubleshoot this issue.


texts:
I have a GeoJSON file, I can select one of its objects and convert it to a feature object, I need to zoom to this polygon on the map so here is my code:
part of JSON object that I convert:

{ "type": "Feature", "properties": { "NAME": "TORSHAVN" },
    "geometry": { "type": "Polygon", "coordinates":
        [ [ [ -6.758638858795166, 62.015167236328125 ],
        ................

Here is my code :

changJsonToFeaturLayer(jsonFeature, cb) {
    var geojsonFormat = new GeoJSON();
    var features = geojsonFormat.readFeatures(jsonFeature);
    cb(features)
}
onChange = value => {
    this.setState({
            selectedFeature: this.state.data[value]
        },
        () => this.changJsonToFeaturLayer(this.state.selectedFeature,
            (feature) => {
                console.log(feature) // log the feature successfully
                const extent = feature.getGeometry().getExtent() //error getGeometry() is not a function
                map.getView().fit(extent);
            }))
}


texts: Is it possible to use ArcGIS to define a boundary around a self-constructed 3D feature?

texts: I am creating a 3D rendering of a future building and would like to know the distance from which this building would be visible from. Is it possible to use ArcGIS to define a boundary that delineates where you could see the building from? I plan on using SketchUp Pro 2016 to create the building and Arc to show the distance from which the building can be seen.


texts: Can geoserver oracle spatial ds recognize public synonyms

texts: I'm trying to find out if geoserver can view tables referenced by a public synonym in oracle spatial. We get regular updates to our data and save them in the db as [type]_[date] so we'd like to create a synonym like [type] that we can update when new data comes in so that geoserver doesn't constantly need a new data_dir release for new data updates.


texts: Why aren't all Shapefile vector features displayed correctly?

texts:
I am a new user of QGIS 1.8.0. I do not display correctly SHP layer. When I want zooming layer so that half of the layer is outside the map window - display layer disappears. In the settings I can not find a way to stop this.
SHP layer is visible only when the complete layer fits in the map window.

Update:

The problem is solved. Viewing layers functioning incorrectly in layers containing. Qix file. If I leave only at layer shp, dbf and shx everything is fine. Qix I have to delete all the layers are displayed well.


texts: Uploading Geopackage contents to PostgreSQL

texts:
As a bit of background, we are looking to transition away from the use of shapefiles. We've already started using Geopackages for desktop work (QGIS / ArcGIS) but often have a requirement to upload data to our PostgreSQL databases.

I'm aware that you are able to upload Geopackage content to Postgres using QGIS but wondering if there are any commandline utilities similar to shp2pgsql for uploading geopackages or tables in geopackages to Postgres? I'm assuming possibly ogr2ogr but can't find the documentation.


texts: I am getting the wrong result for north coordinate

texts:
from pyproj import Proj

#converting lat/long - UTM
lats = -22.818009494
longs = -47.059235202
alt = 644.2332

myProj = Proj("+proj=utm +zone=23K, +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs")
x, y = myProj(longs, lats)

print (x, y)

I'm running this code and I'm getting this result below:

The E coordinate is right; however, the N coordinate is wrong


texts: Can I create a 3D model in QGIS or is there some model for 3D city models?


texts: Preventing layer's labels from overlapping other layers in QGIS?

texts:
I am using QGIS 2.14 and trying to move labels from one layer (="polygon") in order to not overlap features from another layer (=purple "point"):

I tried to move the labels with the Placement option in the Label tab properties-but with no success. I also read a lot of questions in this subject but I didn't understand how can I do it (Is there a way to prevent labels from being on top of everything else? etc).

I am seeking for a similar answer as in ArcGIS, see this answer: How to prevent labels from one layer from overlapping features in another layer


texts: Convert data to another Coordinate Reference System

texts:
Assuming I've a point like this :

  POINT (751318 9760879)

This point is in EPSG:27700 coordinate reference system.

How do I convert the point to display in a map with EPSG3857 coordinate reference system ?

Update

I don't use any GIS application. I am developing a web application (using leafletjs ). So I don't want to convert data with a tool,I've to convert in code.


texts: PostGIS Spatial Relationships query performance

texts:
I have a very large dataset contains over 700 million points and a polygon dataset as a buffer zone.
My task is to extract all points inside the buffer zone and create a new table.
Below is my code. I test it with a small point dataset and it works fine.
create table schema1.result as

select point.* from

schema1.site as point, schema2.buffer as poly

Where ST_Intersects(point.geo_loc,poly.wkb_geometry);

Unfortunately, the query lasted for 1 day and showed no signs to finish.
Is there any advice to optimise my code to speed up the query?
Update: The output of Explain

"Nested Loop  (cost=0.41..17773703.88 rows=6789472 width=208)"
"  ->  Seq Scan on buffer poly  (cost=0.00..18.50 rows=850 width=32)"
"  ->  Index Scan using idx_site on site point  (cost=0.41..20902.23
rows=799 width=208)"
"        Index Cond: (geo_loc && poly.wkb_geometry)"
"        Filter: st_intersects(geo_loc, poly.wkb_geometry)"
"JIT:"
"  Functions: 6"
"  Options: Inlining true, Optimization true, Expressions true,
Deforming true"


texts: Using ArcPy to insert new data into shapefile without editing it?

texts:
I want to insert new data into a empty shapefile.
I have an array with the fields values of each row and I use InsertCursor to add these data to my shapefile.

When I run the code if the shapefile is in edit form I get the result, but if the shapefile is not in editing form I get nothing.

I want to achive the result in the second case, but I suppose that I have to create a newRow first and then use insertCursor.

The code is:

for i in arcpy.da.SearchCursor(a, ["SHAPE@XY"]):
cor = i[0]

p1=float(cor[0])+1.25, float(cor[1])-0.75
p2=float(cor[0])+1.25, float(cor[1])+0.75
p3=float(cor[0])-1.25, float(cor[1])+0.75
p4=float(cor[0])-1.25, float(cor[1])-0.75

row_values=[((p1[0],p1[1]),1),((p2[0],p2[1]),1),((p3[0],p3[1]),1),((p4[0],p4[1]),1)]  #esto hay que mejorarlo para meter un FOR

cursor=arcpy.da.InsertCursor('points',['SHAPE@XY','Id'])

for row in row_values:
    cursor.insertRow(row)


texts: Transportation representation Standard on roads

texts:
Is there a GIS standard to display transportation specific information in GIS databases.
The information I'm interested in are:

Road Directionality
Center turning lanes
Ramps / Bridges / Over or under passes / culverts / merge lanes
grade / crown / ditch
Traffic Signals and timing
allowable turning movements, u turns / left / right / through turns, penalties or bonuses(Time)

As we're all aware, transportation data is very general and includes a lot of fields. The only resource that address this are GIS-T book by Milelr, ESRI's designing transportation databases book, and a few papers by Michael Goodchild

Some Software like TransCAD, Emme 2/3, and ArcGIS have their own ways of representing network topology. It'll be interesting if there was a standard that all software companies can adhere too


texts:
I want to use cubiccurve in openlayers 2.13, And I have added the necessary files, But when drawing the line is drawn instead of the curve.

Files are available on the website:
http://trac.osgeo.org/openlayers/ticket/1715#no1

Drawing curve is very important for us and I no way I could control my curve.

Can one help me?


texts: a plugin for the Print Composer checks if the current project has at least one Composer when loading to avoid the error when creating the menu on a Composer that doesn't exist. However, once the plugin is installed and QGIS starts up, it does it with an empty project that doesn't have any Composers, so the menu is not created. The current situation is that once I'm working on a project with a Composer, I have to open "Manage and install plugins" and reload the plugin to create its menu. Any workarounds?


texts: Calculating incidence angle of polyline?

texts: How can I calculate the angle of each polyline in ArcGIS?


texts: Combine multiple rows in attribute table into one

texts:
I'm running into problems while trying to edit some data.

I'm trying to merge a number of land-use categories into less categories. So for example I have 5 types of "forest" which I want to merge into just one attribute.

All of this is in a single layer and thus in a single attribute table.

After I have my desired categories, I want to use another layer with the same categories to compare the difference over time.

Yet I can't figure out how to effectively combine the categories. Selecting by attribute and creating a new layer with that selection works, but it leaves me with a number of layers which still have different categories for the attributes when I only want one. For example, the layer "Forest" still has the separate polygons for different kinds of forests in the attribute table. I just want one big polygon for each category.

The image is an example of one of the layers, which is just arable land. I want to combine all of the polygons into one big one.

I also tried dissolving the separate layers I created by selecting by attribute, but on some layers it gives me the error:

  Invalid Topology [incomplete void poly.]


texts: How to route requests to GeoServer on Tomcat?

texts:
So I have a Window Server 2012 (IIS 8) that I connect to remotely (on a different network) and log in. Our goal is to be able to publish a web map serving layers from this Windows Server. I am trying to install GeoServer in a way that lets me access it on my desktop. I found this and decided that Tomcat would be the best approach.

I have Tomcat 9 installed with the Connector tag edited and GeoServer 2.13 is deployed and its working great locally on the server with both on port 8080. Now, I'm stuck trying to route all traffic to http://my.test.net (step 4 in that guide). I have tried setting up URL Rewrite rules so it gets routed to http://localhost:8080/{R:0}. I've tried using ARR but I dont think I did it right.

Most of the posts (like this and this) and information I've found on this is almost a decade old and theres a lot of assumptions in the guides. I have never done anything like this and need a more in depth explanation.

Are there any other alternatives to Tomcat with GeoServer? Is there a way I can reroute Geoserver so it is accessible remotely? Is this still the approach I should take?

If anyone knows of any alternatives I'm not married to Tomcat and am open to other options.


texts: Joining points to polygons (Tobacco Retailers to census tracts)

texts:
I'm attempting to join points to polygons but I fear it is severely skewing my analysis. I did a spatial join to join the retailers to their respective tracts. However, when I do spatial analysis tests with demographic data, I get a very low R2 value (.01). I have a compliance score for my tobacco retailers (0, .5 and 1) want to do an analysis of the scores and how they relate to various demographics.

Any advice on joining the points to polygons or anything else?


texts: Automatically selecting street segments from address list?

texts:
I browsed around this site and a couples of other QGIS sites, and couldn't find solutions to my problems. However, I'm quite new to QGIS, so my question is possibly pretty naive.

I need to create map of a city, containing all the streets of the city (I already finished this using OpenStreetMap). Then, I have a list of addresses (around 2,000 addresses, in .csv format) that I need to locate in my city map. However, instead of geolocate them as points on the map, I need to highlight the street segments that each address belongs to. I currently face two problems:

how to automatically tag the streets that contains at least a location in my address list? and
how to select only the street segment with the location, not the entire street?

I'm using QGIS 2.18.15 on Mac.


texts:
I'm doing research on US cotton price fluctuations from 1877-1930.

Here's the problem: my data is county-level, but county borders changed from 1877 to 1930!

To solve this, I plan to "aggregate up" to the smallest consistent unit (eg. if a county border splits, use the un-split original county as the unit of observation).

How can I do this on QGIS? I am using data from the Historical County Project here: http://publications.newberry.org/ahcbp/


texts: Importing tif image from PostgreSQL Database to webpage

texts:
I am trying to import tif images from PostgreSQL Database to my website. In the website, I need to make a button control which will open the images. I think I have to use Python as a server side language and Ajax as well.

Does anyone know how I can connect to the database by using that button?

I already put/export my tif images into the PostgreSQL Database by raster2pgsql command.

My python script which I am planning to use for this button  is below: When I run this script, I can not see anything.

import psycopg2

def connect_db():

    try:
        conn = psycopg2.connect("dbname='postgis_21_sample' user='postgres' host='localhost' password='elbasit99'")
        conn.set_session(autocommit=True)
        return conn
    except:
        print "I am unable to connect to the database"
        return None

def get_raster(raster_id,conn):
    query = "SELECT ST_AsText(geom) from node where id={}".format(raster_id)
    conn.cursor().execute(query)
    res = cur.fetchall()

    return res[0] [0]


texts: Time.Sleep between arcpy.mapping.ExportToTIFF in Data Driven Pages

texts:
I'm building a code in Python to export in geotiff my imagery.

I need specific spots so I created a Data Driven Pages with polygons.

Everything works fine, except that my imagery layer takes a long time to be completely draw, and the output of my script shows just small parts of what I want. Please, see image below:

So, what I need is a way to insert time.sleep in my python script to wait until imagery layer is completely loaded.

This is my script:

    mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
ar = df.extent.height / df.extent.width
for page_number in range(1, mxd.dataDrivenPages.pageCount + 1):
    mxd.dataDrivenPages.currentPageID = page_number
    print "Exporting page {0} of {1}".format(str(mxd.dataDrivenPages.currentPageID), str(mxd.dataDrivenPages.pageCount))
    arcpy.mapping.ExportToTIFF(mxd, r"C:\Users\Istus\Documents\XXXXXXXX\Imagery\mapas\GEOTIFF\map_" + str(page_number) + ".tiff", df, 9306,9306*ar, resolution=300, geoTIFF_tags=True)
del mxd

I'm using ArcMap 10.1 and Python 2.7.2.


texts: Invalid Data Source : /Applications/from multiprocessing.semaphore_tracker import main;main(35) is not a valid or recognized data source

texts:
I'm using sentinel2 images but the scp plgin can't preprocess it
QGIS 3.8 on Macbook


texts: Different colors and labels for overlapping areas

texts:
I am using Geoserver 2.9.2 + WMS and I need to apply the following for a single layer:

make overlapping polygon areas have a distinct color and
have those overlapping areas labeled (centered of course) with unique labels?


texts: Modifying existing geometry type or create new geometry type in PostGIS?

texts:
I want to modify PostGIS geometry type TRIANGLE by adding additional information about its neighbours within TIN.

WKT representation might look as follows: TRIANGLEN ((0 0 0,1 1 1,1 0 2,0 0 0) ID n1 n2 n3), where ID is identifier of the current triangle and n1, n2, n3 are IDs of adjacent triangles.

Is it possible to achieve this?


texts:
In QGIS 3.4 I'm trying to categorize a column in my attribute table which contains a code, of which I only need the (highest) number (which implies a gradation). This probably means I need an expression to filter out the letters.

The code looks, for example, like this:

BA1ZA1PU3

The output in this example should be number 3.

To make it a bit more difficult, numbers higher than 6 shouldn't be taken in consideration and number 6 is less weighty than number 1.

Does anyone have a solution for this?


texts:
Ok, using Leaflet, JQuery GeoJSON layers, and JavaScript.

I have a simple map with an HTML checkbox, that should turn on a Leaflet layer. The html input has an onClick function that it passes a layer name to.

I use JQuery $.getJSON to read the GeoJSON data. with the layers defined inside the getJSON function. I need to place the updateLayerVis outside this function so the html part can see it. However now I can't use layerName.addTo(map); as layerName is now undefined.

I've looked at JavaScript namespace examples, and basically it's call the outsidefunction.insidefunction() but how do you do this with $.getJSON to get the layers?  Is there a better way? My code simplified.

<input id="larynx_chk" type="checkbox" class="list_item" onClick='updateLayerVis("larynx");'/>

var larynx;

function style(feature) {
    return {
        -----
    };
}

function theOnEachFeature(feature, layer){
    -----
}

$.getJSON(url, function(data) {
    larynx = new L.GeoJSON(data,{
    style: style,
    onEachFeature: theOnEachFeature,
    filter: function(feature, layer) {
        return feature.properties.CANCERTYPE =="larynx";}
    });

    larynx.addTo(map); // will turn layer on.
});

function updateLayerVis(layer){
    ----

    larynx.addTo(map);  // fails larynx undefined.
}


texts: How to create services with session tokens in geoserver?

texts:
I have a multi-tenant web mapping application running on ArcGIS server. I am trying to replace with geoserver. Identity of the users for tenants are maintained through another identity api. After successful login Api generates the session token through get token service for a user passing the fixed credentials. Geoserver provides Digest and http header method- but is there a way to generate unique tokens for every session- so that no information related to user authentication is hard coded in client side code and all the communication between client application and geoserver is happening with a session token similar to this:
https://xxxxx/rest/services/xxxxx/MapServer/export?bbox=xxxxx&size=1393%2C85&dpi=96&format=png24&transparent=truelayers=show%3A1&token=2Cj8mUHLD5jD2fNNZ8SO-bP-94.&f=image


texts:
I used this website to determine that the SRID for my shapefile is 3857.  Following that information, I used the shp2pgsql utility to convert my shapefile into the sql I need to insert into PostreSQL (using PostGIS):

shp2pgsql -s 3857 /my.shp > /my.sql

The data was inserted properly into Postgres giving me a geom column of type geometry(Point, 3857), which is what I expected.

My issue is that when I run the following query to get the lat / lon value, they don't give me the proper coordinates.  Here's my query:

select ST_AsText(ST_Transform(ST_SetSRID(geom, 3857), 4326)) from mytable limit 1;

The problem is that it gives me a latitude and longitude that points to a random location in India, when I know in fact that this should be pointing to a location in the United States.

It's worth noting that when I use the ogr2ogr utility to convert my shapefile to GeoJSON, it maps out all of the coordinates correctly, so the shapefile itself seems to be in proper order.

Here are some untransformed points from a basic ST_AsText query: POINT(-10683225.3808045 3373544.37856286)


texts: QField using QGIS Authentication database?

texts:
I run a postgres database with postgis on an external server.
To secure the connection to the database i have self singed certificates set up.
I added the certificates in QGIS and saved them together with the login credentials to the postgres database in the QGIS Authentification database.
For the also on the external server running QGIS-server to be able to connect to the database, i was able to specify enviroment-parameters in the server config pointing to the qgis-auth.db and the masterpassword for the qgis-auth.db safed as .txt.
As described here: https://docs.qgis.org/2.14/en/docs/user_manual/auth_system/auth_overview.html
I would also like to use QField and work directly on the postgis Layer with a secure connetction.
Is it possible to use the qgis-auth.db in QField similar to how its done with QGIS-server?


texts: Get time stamps from TileWMS Layer Openlayers

texts:
I've got a WMS Layer which contains many different images at different times. I'm able to display in Openlayers the images from a single time period if I specify a "time" parameter in params. I've seen it's possible to change the wms time automatically if you have a list of time values but was wondering if it was possible to take the time steps from the wms.

The time steps are all displayed in a WMS GetCapabilities request as well if that helps. Below is the javascript I have so far used in the OpenLayers call:

import Map from 'ol/Map.js';
import View from 'ol/View.js';
import TileLayer from 'ol/layer/Tile.js';
import ImageLayer from 'ol/layer/Image.js';
import OSM from 'ol/source/OSM.js';
import TileWMS from 'ol/source/TileWMS.js';
import ImageWMS from 'ol/source/ImageWMS.js';

var base_layer = new TileLayer({
  source: new OSM()
});

var dc_wms = new TileLayer({
  source: new TileWMS({
    url: 'http://localhost:5000/',
    params: {
      'LAYERS': '10DayIndices',
      'STYLE': 'ndvi',
      time: '2019-06-20'
    }
  })
});

var map = new Map({
  layers: [base_layer, dc_wms],
  target: 'map',
  view: new View({
  projection: 'EPSG:4326',
    center: [102.376126,48.031532],
    zoom: 6
  })
});

I can also provide more info on the GetCapabilities request (the time is in format ISO:8601) if that would help.


texts: Doing raster export from PostGIS to TIFF file

texts:
I am trying to do a lo_export of a raster record in PostGIS table:

SET postgis.gdal_enabled_drivers = 'ENABLE_ALL';

SELECT oid, lowrite(lo_open(oid, 131072), tiff) As num_bytes
FROM
( VALUES (lo_create(0),
ST_Astiff( (SELECT rast FROM raster_table) )
) ) As v(oid,tiff);

Finally I did SELECT lo_export(oid,'filesystempath');

But when I check the file system path there is nothing there... Anybody know why?

And how can I do to generate the TIFF file?


texts: Pixel Size after IDW Interpolation in QGIS

texts:
I am trying to use the IDW interpolation tool in QGIS to change the pixel size of my starting geotiff of 0.1 decimal degrees to 0.05 decimal degrees. First I used "Raster pixels to points" on the initial geotiff to change the layer to a vector layer. Then I used IDW interpolation on the vector layer with the same extent and a distance coefficient of 3.5 and specified a 0.05 pixel size. But then when I executed the interpolation , the pixel size was a little bit smaller (0.04977375600000000233,-0.04972375700000000037) and there is one extra row and column in the dimensions.

Starting file:

Vector layer after raster pixels to points:

End result after IDW Interpolation with pixel size 0.05 and distance coefficient of 3.5:

If I reduce the rows and columns by one I get a slightly closer to 0.05 pixel size result but still not the same:

Can someone explain why this tool is behaving like this? With this extent and pixel size it should be outputing exaclty a raster layer with a dimensions of 220 and 180 and a pixel size of 0.05 decimal degrees.


texts: How could I assess the value of a polygon according to the value of his neighbor?

texts:
I would like to know if it is possible to give a value to a polygon, according to the value of the polygons around.

I want to assess the ecological integrity of an aquatic network (lakes, pond, streams, rivers, etc.), where each features is assessed independently. For example, one of the criteria is the dominant riparian land cover. According to the kind of land cover, the integrity of a lake would vary.

I already have the vector of the hydrological network and the vectors of the riparian land cover around each feature of the hydrological network. Note that the composition of the riparian land cover is not homogenous around the lake.

How can I use QGIS to do this?


texts: Seamless, color balanced mosaics of aerial RGB photos with Open Source

texts:
I'm looking for an open source tool/workflow (even a command line one) to obtain what it is advertised in programs like

http://www.inpho.de/index.php?seite=index_orthovista

http://www.orthomapper.com/color_balance_example.html

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009t000001v8000000

I already tested OSSIM and GRASS, for instance

http://trac.osgeo.org/ossim/wiki/histogram_operations

http://grass.osgeo.org/grass64/manuals/i.image.mosaic.html

but results are not as expected. I also had no luck with

http://www.lizardtech.com/products/geoexpress/

that is the only close source that I was able to test thanks to a trial.

Maybe it depends from my input data, so a small working sample dataset would be highly appreciated.

By the way, does Orfeo do something like that?

Thanks in advance

PS
I'm open to use even a non GIS software


texts:
I have a text file that contains longitude and latitude of some items. How can i load this file onto a map?

<script src="http://openlayers.org/en/v3.0.0/build/ol.js" type="text/javascript"></script>
<script>
var attribution = new ol.control.Attribution({
                                    collapsible: false
                                });
                                var maptwo = new ol.Map({
                                    target: 'maptwo',
                                    layers: [
                                        new ol.layer.Tile({
                                            source: new ol.source.OSM()
                                        })
                                    ],
                                    controls: ol.control.defaults({attribution: false}).extend([attribution]),
                                    view: new ol.View({
                                        center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'),
                                        zoom: 2
                                    })
                                });
</script>

                            <style>
                                .maptwo {
                                    height: 100%;
                                    width:100%;
                                }
                            </style>


texts: Exporting coordinates of shapefile into CSV using FME?

texts:
I use FME to make a series of transformations from an autocad file to a shapefile (with line geometry).

What I am trying to do is to also export (together with the shapefile) a CSV file containing the coordinates.  More specifically I need to get only the first and last coordinate of each linestring in the shapefile.

How can I do this in FME 2014?

Right now I have managed to export only a CSV containing the attribute values corresponding to each line.


texts: How to create a color ramp in ArcGIS10 where the zero value is represented by white?

texts:
I have a simple problem which (to me) seems to be difficult to solve in ArcGIS.
The map I plot is a GeoTIFF with emission data. I use a default algorithmic color ramp (rainbow) to do so. Now I would like to replace the lowest value (=0.0) with white instead of blue.

The only solution I have come up with yet is to create a new Mulltipart color ramp with the first part being preset and the second algorithmic. This way, the color steps in the first part are much coarser than in the second one.
Is there a way to reduce the number of colors in the preset color ramp to 1?

Any help is really appreciated - thanks!


texts: Raster to polygon fails in ModelBuilder iteration

texts:
I need to vectorize some rasters to polygons and to do so, I use the "Raster to Polygon" tool in ArcGIS Desktop 10.4. As there are many rasters, I use a iteration in ModelBuilder.
The output workspace is a Geodatabase and here comes the problem. When the model runs, the first iteration works fine. However, at the second iteration, the model fails at the "Raster to Polygon" tool. When I open the tool (right-click) to check it, I see that the system automatically added a .shp extension to my polygon. As the output workspace is a GDB, the tool fails.
This problem occurs for any source of rasters.
Here are some screenshots to help you understand.
The model and the tool before I click run:

The error and the tool after it fails at second iteration:

Can anyone help me?


texts: How to calculate kml LatLonBox from corner coordinates?

texts:
I have corner coordinates for my image

upperleft  lat/lon 80.5434057263 -35.6660101669
lowerleft  lat/lon 74.8586568503 -16.5889844463
upperright lat/lon 83.3580195158 16.0865335458
lowerright lat/lon 76.4500836068 12.9849754068

For a ground overlay in a kml-file, there is coordinates with a rotation, but I somehow cannot see how to get from the above to this one:

<LatLonBox>
    <north>????</north>
    <south>????</south>
    <east>????</east>
    <west>????</west>
    <rotation>????</rotation>
</LatLonBox>

I guess some of you have done this before? Or is there a way of using corner coordinates?


texts: QGIS label from a polygon layer as a own layer

texts:
In my case I have an polygon layer with labels (Beschriftungen). Countries with country names. I want to have this labels as an own point layer without the polygons (countries).

Is this possible? QGIS 2.14


texts: ArcGIS Javascript example for geometry services?

texts:
I have a client that wishes to show him all the geometry services example in Javascript API

http://help.arcgis.com/EN/ARCGISSERVER/10.0/APIS/REST/geometryserver.html

...

I'm new to Javascript and ArcGIS, is there a sample with all the examples for geometry services?

https://developers.arcgis.com/en/javascript/jssamples/util_buffergraphic.html

Yes I have been here

https://developers.arcgis.com/en/javascript/

but they don't have all example.


texts: QGIS 3.6: variable functions, confusing explanation

texts:
The documentation (https://docs.qgis.org/3.4/en/docs/user_manual/working_with_vector/expression.html#id31) says:

  To use these functions in an expression, they should be preceded by @ character (e.g, @row_number).

map_scale is one of these variables. But if you see the example map_get( item_variables('Map 0'), 'map_scale')it is used without an @

Why is it in this case used without an @?


texts:
I have been trying to use OSM maps and my data is 60 GB around. I have imported it to QGIS as a vector layer but it seems the data is so big that the rendering is taking forever.

My system has Intel Dual Core and 2GB of RAM. So can anyone please tell me how i can work with my data without any rendering problems.

please help me work around this problem.


texts: Field Calculate unique ID, based on another column, overriding FID / Object ID order

texts:
I have a couple thousand polygons across several hundred towns.  I want the polygons within each town be labelled as such - first 3 letters of town name + _ + incrementing ID, so that they might look like this:

Ale_01
Ale_02
Bur_01
Bur_02

And so on.

Using the Python Parser of the Field Calculator, I have tried using an augmented version of the standard ID incrementing script floating around (pasted below):

prev_town = ""
rec=0
def autoIncrement(%Town%):
 global rec
 global prev_town
 if town != prev_town:
  rec = 0
 pStart = 1
 pInterval = 1
 if (rec == 0):
  rec = pStart
 else:
  rec += pInterval
 id = town[0:3] + "_" + str(rec).zfill(2)
 return id

The problem is that, the records within and across towns, were added at different times (i.e. Bur_01 was added before Ale_02), so that even after sorting by town, when applying the above script, I can get repeat ID (Ale_01 twice) due to the fact that the field calculator is applied in the order of ObjectID, and it doesn't (of course) keep track of previous IDs.

So, I have tried to augment the above code like so:

prev_town = ""
rec=0
ids = []
id = ""
def autoIncrement(town):
 global prev_town
 global rec
 global ids
 global id
 if town != prev_town:
  rec = 0
 pStart = 1
 pInterval = 1
 if (rec == 0):
  rec = pStart
 else:
  rec += pInterval
 id = town[0:3] + "_" + str(rec).zfill(2)
 while( id in ids):
  if town != prev_town:
   rec = 0
  pStart = 1
  pInterval = 1
  if (rec == 0):
   rec = pStart
  else:
   rec += pInterval
  id = town[0:3] + "_" + str(rec).zfill(2)
 ids.append(id)
 return id

But, this seems to hang and never complete - so I can't even tell if it is working or not....

Also, this data layer is a feature service, so I am trying to do this on a local replica and sync back - that of course brings with it its own limitations.

Any suggestions?


texts: ST_IsPlanar returns true even for invalid 3D polygons

texts:
We are trying to find a way to validate 3D polygons with arbitrary rotation. It seems like you should be able to do this with the function ST_IsPlanar, because it claims to "not drop the z index", but we are finding that it always returns true, even when the polygon is clearly invalid, due to a point being way out of the plane formed by the other points.

We understand a polygon being "valid" to mean that to mean that all of the points of the polygon fall in a 2D plane, even if this plane is not parallel to the XY, XZ or ZY axes.

According to the documentation, the function is supposed to not drop the z-index, so that why do both of these polygons return true?

/* Valid 3D polygon */
SELECT
    ST_AsText(ST_Polygon(ST_GeomFromText('LINESTRING(1 1 0, 1 4 0, 4 4 0, 4 1 0, 1 1 0)'), 2154)),
    ST_IsPlanar(ST_Polygon(ST_GeomFromText('LINESTRING(1 1 0, 1 4 0, 4 4 0, 4 1 0, 1 1 0)'), 2154)
);

/* Invalid 3D polygon */
SELECT
    ST_AsText(ST_Polygon(ST_GeomFromText('LINESTRING(1 1 0, 1 4 0, 4 4 9999, 4 1 0, 1 1 0)'), 2154)),
    ST_IsPlanar(ST_Polygon(ST_GeomFromText('LINESTRING(1 1 0, 1 4 0, 4 4 9999, 4 1 0, 1 1 0)'), 2154)
);

As you can clearly see, the invalid polygon has one of its points lifted very far out of the plane created by thee other points. But yet, ST_IsPlanar returns true regardless.

This may not be a relevant detail, but out of curiosity, we looked in the PostGIS SFCGAL source code for this function, and noticed that it has a precondition that IsValid() returns true, but this function only works in 2D.

Are we simply doing something wrong here? It seems that this function, despite apparently working on 3D geometries, is not actually validating them properly.


texts: Mapping and creating specific symbology in ArcPy

texts:
I am new to ArcPy mapping, I am trying to use it for plotting a raster map with only a legend that consists of 5 legend elements.
My raster image ranges from 0 to 2000 but I don't want to use the whole range strip. Attached is the plot I am trying to generate using ArcPy. I have to make several maps in the same format so I will try to do it with the help of ArcPy.
As I am a beginner with the mapping module, I have only managed to write the following code:
mxd = arcpy.mapping.MapDocument("current")
df =arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
lyrFile = arcpy.mapping.Layer(r"C:\Project\data\bws.lyr")
arcpy.mapping.AddLayer(df, lyrFile)


texts: Create Space Time Cube in ArcGIS for Desktop?

texts:
I am looking for GIS software that performs space time cube visualization.

I am studying the incidence of dengue at data points that represent a collection of ovitraps (traps to catch the mosquitoes' eggs), with an attribute representing the number of eggs caught each week at that location.

The data structure are multipoints, so when a select a specific point (an geolocated ovitrap), multiple regists are selected and these include the number of eggs caught in a specific week.

My goal is use a space time cube to see the number of eggs caught every week in different ovitraps, as shown in the image below. I want to analyze spatio-temporal patterns.

I've tried the space time cube from arcgis, but it just works with the number of points in the space, for example, the number of geolocated people infected in some region.

I have a set of points (ovitraps) that catch mosquito eggs. They are not  generated by a random process like in the example above, but were placed by people with the goal to monitor mosquito activity at a specific places through time.


texts: ArcGIS JavaScript API filter raster dataset

texts:
I have around 1000 rasters (b&w tiffs) and most of them overlay each other. At this moment, I'm holding them in mosaic dataset and I want them to be displayed in my javascript webapp. I am able to load it as Dynamic or Image service layer and it loads all the rasters at once. In screenshot below, mosaic's attribute table has field "Name" in which names of all the rasters are held (all names are unique to only one raster). In my webapp, I want to dynamically show only one raster by specifying its name.

Part of mosaic: http://i.imgur.com/RB2zl52.jpg

In arcmap I can use layer's definition query to select only particular raster (screenshot below).

Filtered by definition query: http://i.imgur.com/XDkFl8y.jpg

What would be the appropriate approach to have dataset filtered in webapp?


texts: System variable with in-line variable substitution %i% %n% not working in ArcMap?

texts:
I am teaching a class of about 30 students and working in ModelBuilder. I am running into a problem and not sure if it is a 10.5 bug or if I am doing something wrong.

I am having students run models in batch mode:

For this simple model (I have used both %n% and %i% with the same outcome)

For half of the class it works fine, for the other half of the class arc writes out the following (outputs are highlighted):

This behaviour (and the fact it works fine for 1/2 of the students) is boggling my mind. Why would it ever insert %name% if a name variable doesn't exist? Is there a setting controlling how %i% %n% works? What am I missing?


texts:
I'm having a problem with projectRaster on a raster brick in WGS84 to a  projected coordinate system in R.

I have obtained some oceanographic data in netCDF format from the Copernicus Marine Environmental Monitoring Service. An example of one of these netCDFs is here.

The CRS (coordinate reference system) of the netCDFs is the WGS84 datum (+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0) and contains 75 depth layers for a single variable (in this case, salinity) for a single month in a single year (in this case, January 1993). I have trimmed the netCDF by both geographical extent and depth (an example of trimmed netCDF here).

I have loaded the trimmed netCDF into R as a raster brick using the following.

library("ncdf4")
ncbr <- brick("../data/env/CMEMS_GLOBAL_REANALYSIS_PHY_001_025_salinity_monthly_mean_1993-01.nclonlat.ncdepthtrim.nc")
ncbr

Which gives the following output

"level" set to 1 (there are 47 levels)class       : RasterBrick
dimensions  : 97, 113, 10961, 1  (nrow, ncol, ncell, nlayers)
resolution  : 0.25, 0.25  (x, y)
extent      : -71.125, -42.875, 37.875, 62.125  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0
data source : C:\Users\xxx\xxx\xxx\xxx\data\env\CMEMS_GLOBAL_REANALYSIS_PHY_001_025_salinity_monthly_mean_1993-01.nclonlat.ncdepthtrim.nc
names       : X377316
z-value     : 377316
varname     : salinity
level       : 1

The next step is to project the raster brick into the Canada Albers Equal Area Conic projected coordinate system (+proj=aea +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs). To do this I have used the following code:

canada_eq_ar_proj <- "+proj=aea +lat_1=50 +lat_2=70 +lat_0=40 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs"
library("rgdal")
rp <- projectRaster(ncbr, crs = canada_eq_ar_proj)

Which throws me the following error:

Error in .readRowsNetCDF(x = x, row = row, nrows = nrows, col = col, ncols = ncols) : no slot of name "band" for this object of class ".MultipleRasterData"

On Google search I only found one other person who seemed to have this error, but when trying to add a raster layer to a raster brick (so a different problem to mine).


texts: Graphical Model Stalled at v.clean of shapefile

texts:
It is difficult to give more information, but my workflow model halts any activity at the v.clean step for a polygon shapefile:

It worked for other data sets, but not this one.  Unfortunately, it doesn't tell me what the issue is.


texts: How to create stacked bar/column charts in QGIS?

texts: I know that conventional bar charts (with the bars adjacent to each other) based on feature attributes can be plotted in QGIS. But can you please tell me if there's any way to plot the bars in the form of stacks, as in stacked bar/column charts, in QGIS? I tried to find an example in the QGIS manual and on the internet but wasn't able to get any information about it.


texts: Variety measure is always 0 with zonal statistics in QGIS 3.16

texts:
I am trying to calculate two zonal statistics: count and variety.
My raster is a produce of r.raster.area with 4399 groups of pixels within a matrix of no-data values (which are coded as 65535).
My vector layer holds seven hand created polygons, which I have checked for validity, both with the built-in Validity Check algorithm and visually.
As I need Variety, the only tool I can use is the QGIS Zonal statistics tool in the Processing Toolbox. When I run the analysis, I get correct values for Count, but Variety is always 0 (which is impossible, as all the polygons hold many different values).
Could this be a problem with the high number of unique values (4399)?


texts: Using pictures (JPEG) from web as symbol in MapServer 7 mapfile?

texts: Is it possible to configure the mapfile so, that it shows for every point on the map a different picture from the web recognized by an id?


texts: LRS schema error in Oracle SDO_NET when validating network

texts:
I have a problem with the Oracle Spatial Network package. I'm creating NODE, LINK and PATH based on LRS. When I try the call:

 SELECT SDO_NET.VALIDATE_NETWORK('network_tracking') FROM DUAL

then I receive the message:

LRS schema error: column:[GEOM_ID/SDO_GEOMETRY] in table:LINIE_LRS does not exist.

But in my table LINIE_LRS I have type SDO_GEOMETRY, but it is named LRS. What is the problem? How can I fix it? (I can't rename column names.)


texts: I have scanned map I know it scale and dpi. Is it possible if i know lon-lat cords of some point(X,Y) calculate lon-lat of another point (clicked) on this map? I have read some about georeferencing tools but I'm looking for programming functions to achieve such result.


texts: In QGIS 2.99 I created a 3D scene with buildings, etc. I added small spheres (with 3D rendering) with xyz coordinates to create a grid of spheres around a building. Now I am wondering if it's possible to set the color of these spheres depending on a certain value?


texts:
Is there any easy to use software for converting .ecw/.eww files to .jp2/.jpw files without loosing the georeferencing? I don't want to use proprietary file formats with QGIS.

EDIT: I've deleted the question if the performance of .jp2 files is comparable to .ecw files.


texts: I have this shapefile and I want to re-align the selected polygon (See image below) to the shapes of the other polygons. I tried using the "edit tool" but it's not producing a good result. What would be a precise alternative?


texts: Seeing only default list of KML attributes in QGIS attribute table?

texts:
I converted a shapefile to kml using ogr2ogr. Glancing at the output, it looks correct -- it has a <Schema ...> and each <ExtendedData> references the schema (I uploaded a snippet here).

However, when I open the kml in QGIS and select "View attribute table", I only see a default list of attributes (Name, description, timestamp, begin...). Is this a limitation of the KML reader, or an error in the file?


texts: QGIS Server Plugin Loading Problem: 'unexpected type 'sip.wrappertype'

texts:
I'm using  3.6 qgis on the Ubuntu 18.04 server.

I made a plugin for limiting requests on our WMS server.

I'm having troubles loading the plugin I get always error:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/qgis/utils.py", line 577, in startServerPlugin
    server_plugins[packageName] = package.serverClassFactory(serverIface)
  File "/usr/share/qgis/python/plugins/request_limiter_filter/__init__.py", line 4, in serverClassFactory
    return RequestsLimiterServer(serverIface)
  File "/usr/share/qgis/python/plugins/request_limiter_filter/filter/requests_limiter_filter.py", line 27, in __init__
    serverIface.registerFilter( RequestsLimiter, 100 )
TypeError: QgsServerInterface.registerFilter(): argument 1 has unexpected type 'sip.wrappertype'


texts: Setting NoData Value for WCS in ArcGIS Pro

texts:
ArcGIS Pro is not automatically picking no data value of a WCS raster and the option to manually override no data value is not working (input not allowed in the field).
Is there another way to do that?


texts: Changing label color when printing by each line using ArcGIS Desktop

texts:
I am using ArcGIS Desktop.
When I print the map, I want to show more than one feature of the element under its dimension, but in different colors.
For example, the first line should appear in blue and the second line in green.
I can display the numbers under each other with the code "chr (13)", but I need to change the color for each line.

How can I do that?


texts:
Part of a stream is now underground so I'm trying to use split features to break the stream into two pieces. The manual says to select the feature, then the split features icon, then draw a line across the stream where I want the break. All it does is keep drawing red lines, with vertices wherever I left click, green vertices where I right click, until I crash QGIS. (Yes I toggled edit)

What should-be-obvious thing am I missing?


texts: Selecting points on one side of the road

texts:
I am a newby in python scripting in GIS. I have 2 shapefile: first one with roads and second one with points that contains address number and street name.

I want to select these points from right or left side of the street but in the correct order according to the street start and end.

Firstly, I want to select the points from the red polygon and check them (checking is another task and I know how to do it but selecting this points in the right order..)

Secondly, the same. I want to select the points from the blue polygon an check them too.

NB: Points is a layer, roads is another layer. also buffer of the roads is another layer.

I think that would be a good idea to parse the buffer and select by location the points that is in the buffer, but i don't know how.


texts: Qfield crashes when vector elements are touched

texts:
I have a problem with Qfield. I'm using qfield 0.8.8 on OS android 5.1.1
After having installed this Qfield version it does not run.

When I touch a polygon or a line or a point it crashes; in particular I touch a polygon or a line or a point, the lateral window with information appears just for one second and then it crashes.

I don't understand why and how to solve the problem.

Can someone help me?


texts: Exporting geodatabase attribute tables to MySQL database using ArcMap?

texts:
I've already created a mysql db connection using ODBC and tested it. Now I want to export the attribute tables data from ArcMap to mysql which is on my localhost. On export there are many options like export (To CAD, To Shapefile, To Dbase ..) when I click on any of these no data is going to mysql database.

How can I export geodatabase data(no spatial data) to mysql database in ArcMap ?


texts:
I'm trying to set up GeoServer to serve map data to Kibana. So far I managed to get data from the US national weather service into Kibana so I know the concept is working.

https://www.elastic.co/blog/custom-basemaps-for-region-and-coordinate-maps-in-kibana

Next I installed GeoServer and created a layer with a shapefile as source as per the documentation. The layer shows up fine in the preview but I can't get Kibana to show it.

Now the Kibana documentation is rather lacking when it comes to WMS documentation but I found this in the link above:

  Geoserver / MapServer / ArcGIS Server

  A more advanced scenario might have you running your own instance of
  Geoserver, MapServer, or ArcGIS Server. These software packages may or
  may not come with geospatial data needed to create basemaps. You might
  check out our blog post on using a custom Geoserver basemap with
  Elasticsearch.

  To be compatible with Kibana, basemap tiles created with these
  software packages must be cached as raster tiles in the Web Mercator
  (EPSG: 3857) coordinate system. All of these software packages can
  publish WMTS services. You can review the ArcGIS Online example above
  to determine the tilemap.url parameter from WMTSCapabilities documents
  created by these software packages.

Under layer settings I found Coordinate Reference Systems clicked the find button and scrolled untilI foundEPSG:3857`. That alone did not work though.

Upon further investigation it appears shapefiles are also in vector format. (For some reason in the GUI you have to click to store, and then hit the return button to see the text value because the icon has no text overlay.)

Is there any way I can serve my layer as a raster?

My original data is in .kml format. Also if anyone has ever managed to get Kibana show GeoServer data I would love to hear what other steps might be necessary.


texts: How to use ArcMap for HydroPower Potential

texts: I am trying to determine the sites for small hydropower. I have a elevation dem, rainfall data, Curve number data (from soil and landuse shapefiles). I have already used the DEM to fill sinks, find flow direction and accumulation...up to the creation of catchment polygons and slope. I am stuck here. Is there a way to use this to generate points for potential sites?


texts: Handling German umlaut while converting ArcGIS file (*.mxd) to QGIS file (*.qgs)

texts:
The name of the sole layer in the draft ArcGIS map myfile.mxd is Mächtigkeit which contains the German umlaut ä. I face an error message when using the script mxd2qgs.py (downloaded from https://github.com/fitnr/mxd2qgs) although some workarounds are implemented. The script mxd2qgs_short.py below is, to my point, the most possible reduction of the original script, still producing the error.

It looks like the error occurs from interaction of the two sections Section mapcanvas and Section legend with each other. Turning off Section mapcanvas makes the error message disappear. I don't manage to trace the interaction of the layer name with Section mapcanvas. How should I proceed in mxd2qgs_short.py to handle this problem?

Using doc.toprettyxml() is suggested here.

Script mxd2qgs_short.py:

from xml.dom.minidom import Document
import arcpy

mxd = arcpy.mapping.MapDocument(r"myfile.mxd")
qgs = 'myfile.qgs'

df = arcpy.mapping.ListDataFrames(mxd)[0]
lyrlist = arcpy.mapping.ListLayers(df)
lyr, = lyrlist

doc = Document()
qgis = doc.createElement("qgis")
doc.appendChild(qgis)
legend = doc.createElement("legend")
qgis.appendChild(legend)
unit = doc.createTextNode(df.mapUnits)
units = doc.createElement("units")
units.appendChild(unit)

# Section mapcanvas
mapcanvas = doc.createElement("mapcanvas")
qgis.appendChild(mapcanvas)
mapcanvas.appendChild(units)

# Section legend
legendlayer = doc.createElement("legendlayer")
legendlayer.setAttribute("name",lyr.name.encode('iso-8859-1'))
legend.appendChild(legendlayer)

f = open(qgs,"w")
f.write(doc.toprettyxml())
f.close()

Error message:

Traceback (most recent call last):
  File "D:\mxd2qgs_short.py", line 31, in <module>
    f.write(doc.toprettyxml())
  File "C:\Python27\ArcGIS10.5\lib\xml\dom\minidom.py", line 61, in toprettyxml
    return writer.getvalue()
  File "C:\Python27\ArcGIS10.5\lib\StringIO.py", line 271, in getvalue
    self.buf += ''.join(self.buflist)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 1: ordinal not in range(128)


texts: How to acquire an ArcGIS access token with Windows Authentication (single sign on)

texts:
Consider the following scenario:

The end user is running an in-house build Windows desktop client that uses the ArcgGIS WPF library for rendering ArcGIS maps.
The end user is authenticated via Windows authentication.
Now I want the client to acquire an access token for the REST services without prompting the end user for his/her username/password. That is, given that the end user is already logged in via Windows AD, the client should be able to acquire an access token with NTLM/Kerberos or what ever it is Windows authentication is using.
The acquired token is then send to an in-house web service which will then access the ArcGIS REST services with the token and thus impersonating the end user without knowing either username or password (this web service is not part of the Windows domain).

Is that possible? How?

The server is "ArcGIS REST API for 10.1 SP1".

I am the client/server programmer - not the ArcGIS administrator :-)


texts: How to display elevation points from point layer as in 3 different group/classes in qgis?

texts:
I have downloaded my elevation points from website Natural earth data (at a scale 10 Million), I wanted to display my elevation points like this in 3 classes:

1) Elevation points, symbol('+') and name of elevations (with Label)

2) Elevation points, symbol('+') (without label)

3) Depression, symbol('-') (without label)

I've tried them as in rule-based in "Style" and "Label" (see please screenshot),

Properties > Style

Properties > Label

Depression (supposed to show only '-32' not with symbol'+') [is just one of an example]

but it doesn't show me on the map correctly, how to classify them into 3 different group (as I mentioned above)?


texts: Merging features (lines) in shapefile with same name using Python and QGIS?

texts: I am working with the NHD flowline dataset (USGS) and some of the line features have the same name. I want to merge the line features that have the same name. For example: There are three features that have the name "Kings River" and four features that have the name "Boulder Creek" how do I write a python script that merges these features based on the name? The question How to merge multiple overlapping lines using python? deals with a merge that is based on geometry - I need to merge the line features based on a non spatial attribute (name of flowline).


texts: Writing ArcPy code to return total footage of pipe for each material types?

texts:
I am trying to write a Python script that will return the total footage of pipe for each material type. I got as far as getting the total footage for all of the pipes, I am just not sure where to go from here.

Footage = 0

with arcpy.da.SearchCursor('Pipe_Mains',['MEASUREDLE', 'MATERIAL']) as cursor:
    for row in cursor:
        Footage += row[0]


texts: Need help in how to map ZIP codes data by year

texts:
I'd like to build a graphic showing where city employees live, based on their date of hire. I have a list showing the hire date and the ZIP code for each employee. There are about 4,000 employees.

I can't figure out how to do that, despite it being very easy to explain!


texts:
remove duplicate points

I'm using 10.2.2 Arcgis

the problem is as follows:

I have 8 layers of restaurants

I made a junction of the 7 layers in one shapefile

Now I have a layer of 3000 restaurants, the problem is that there are now restaurants duplicates

I need to have a unified Shp with its comprehensive information without duplicates

I thought:

to remove duplicates I'm trying to make a buffer

impunt = restaurant

distance = 100 yards (because usually a restaurant name "A" should not be dry for another restaurant name "A"

dissolve Type = ALL (to make me one polygon in those restantantes name "A" and so to make the search easier estaurants duplicate

now want the attribute tables I pull buffer polygon registration, as this returns me only one record for all polygons

would be very grateful if you tell me if usdes as having achieved record by exite polygon or other tool to search I am duplicate


texts: How to calculate zonal statistics of buffer zone with minimum distortion

texts:
I want to create 50km buffers around a large set of polylines that have a global extent. My objective is to calculate average raster values within each buffer zone.

The matter of confusion: I want to use an equidistant projection to minimize the buffer distortion introduced by the global extent of my data, but ultimately I wish to use an equal area projection to calculate zonal statistics of the buffer zones.

How do I reconcile these two types of distortion? I cannot find a related question that explicitly addresses distortion when calculating zonal statistics of buffer zones.


texts:
I was planning on drawing some deprivation maps this afternoon, but I can't find a site to download the Lower Super Output Area boundaries from to display the data. The only link I can find is to a word document that allows me to order some CDs but I can't beleive that is the only way to get the data.

Please someone tell me that ONS haven't regressed that badly while I was away.


texts:
After downloading Matplotlib to use the Statist Pugin An error has occured while executing Python code:

RuntimeError: module compiled against API version 9 but this version of numpy is 6

Python version:
2.7.5 (default, Mar  9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]

QGIS version:
2.2.0-Valmiera Valmiera,

Later on the message is that statist is also not able to run.
How to solve this problem?


texts: We need to split large complex polygons into smaller chunks ( Where the area <= x). The tricky bit is that they can only be split where the distance from one side of the polygon to the other is <= y which in this case is 80 metres. They can still be split if the area is not <= x, we just try and reduce the larger chunks to smaller chunks so the more that are <= x the better..