texts: Altering input files in a Python toolbox?

texts:
I'm trying to add a temporary field to one of the input feature classes in my Python toolbox.

arcpy.AddWarning("Adding field of type " + fieldType.upper() + " to FC " + varFC + " called " + tempField)
arcpy.AddField(varFC, tempField, fieldType.upper())

The first line outputs as I'd expect

  ("Adding field of type DOUBLE to FC C:\foobar\Test.gdb\inputFC called Population_temp"), but the second line raises an error:

  Failed to execute. Parameters are not valid.
  ERROR 000732: Input Table: Dataset C:\foobar\TEST.gdb\outputFC does not exist or is not supported
  Failed to execute (AddField).

outputFC is the output parameter in the Python toolbox, and NOT what's stored in varFC (which is an input parameter). I can't figure out why Arc is referencing outputFC at all, unless Python toolboxes will only allow alteration of parameters designated as output?

If anyone is wondering the specific answer to my question, you can alter input parameters. You just have to use valid arcpy commands.


texts: How do I interpolate a vertical surface in ArcScene 10.1

texts:
I have electrical resistivity data with X, Y, and Z values.  I have imported these data into ArcScene and they display as points in the subsurface in a vertical plane, each with its own resistivity value.

Is there any way that I can create a surface of resistivity values that is vertical?


texts: How to count points of a point layer (shp) for each depth class of a bathymetry vector layer

texts:
I am using QGIS 2.8.3 but also have 3.4 whatever works better for this issue.

I have a bathymetry shapefile and a point layer. One of the columns of the bathymetry vector gives the maximum depth and I display the file by the different depth classes. Now I need to know how many of my points (point layer) are in which depth class. I tried to use the 'points in polygon tool' but it did not work, maybe cause there was no way to indicate which is the relevant column (depth max) cause the attribute table contains quite many columns.


texts:
Is there any tool/plugin in QGIS that will allow me to filter a point layer to remove all points closer than a given distance?  I have a project in which I need no points to be closer than 50m from the next, keeping as many of the original points as possible.

I have QGIS versions 3.6.0 and 2.18.15.


texts: Determine whether table is registered in geodatabase with ArcObjects

texts:
In ArcCatalog we can register a table in the GeoDatabase using the tables context menu. Now i'm trying to find a way with ArcObjects, to detect whether an ITable is already registered, is this even possible?

I'm aware that registered tables are listed in the GDB_ITEMS system table, but some SDE connections do not have read access to this table, or only with a different (unknown) qualifier. So reading the system table directly is not an option in this case.


texts: Datum transformation not working properly

texts:
I want to create a map with 20 coordinates (UTM), that I have loaded as a CSV-file into QGIS 3.12. The area is located in UTM zone 32 U (northwest of Munich).
As a background I want to use an 80 cm orthophoto of Bavaria via WMS which is available for free (for more information: https://geodatenonline.bayern.de/geodatenonline/seiten/wms_dop80cm). The orthofoto supports UTM by EPSG:25832.
However, when I put the orthophoto and my data into QGIS all displayed in EPSG:25832 and use EPSG:25832 as Project Coordinate System, my data lies about 300 km east of where it actually should be. The coordinates are correct as I found out. I already tried using UTM 33 N (which is the wrong zone), but that doesn't make any difference. I also tried to use the WMS in Gauss Kruger coordinate system and use a transformation, but then my coordinates are not displayed at all.
Does anybody know where I made a mistake?


texts:
I'm a beginner in programming but i have to work with GRASS at work, and do it quickly.

I'm completely lost with all the variety of tutorials that are existing and to me, don't look the same...and nothing of them answer my basic questions (how to make very simple loops on multiple raster).

So I want to clarify where to start and what to use. I'm using GRASS with the 6.4.2 command line, under Windows 7 OS.

I don't know if I have to use Unix syntax or other, and I don't know if I have to directly use the Python shell more than the basic grass shell.

Anybody can help me to get started with very simple tutorials for using shell (loops, work with data from mapsets, using variables, import, export...) ?


texts: How to configure and install psycogpg2 - beginner?

texts:
I need to install psycogpg2 for working with 'django'.

I read the instructions but I don't understand whether to run the commands in command prompt or in Python command line. I am not used to the GUI installation.

So can you please anyone tell me how to configure settings and installation of psycogpg3 - where to keep the folders and changing directory etc. etc..


texts: ArcGIS 10.2 Model Builder, getting results to 'add to display' when running as a model tool?

texts: I have a finished model that has been saved as a model tool in a custom toolbox. I add the toolbox to ArcToolbox, double click, set the parameters, and run just like any other tool. I have the model setup to add certain results to the map display. However, when running as a model tool and not in edit mode, the results will not add to the display. Is this a workspace environment issue?


texts: Pre-generated tiles don't works after Geoserver upgrading

texts:
I have upgraded Geoserver to the newest version (2.12.2), deployed old "data_dir" and set plugins respective to the version. After start Geoserver I tried to get pre-generated tiles via GeoWebcache but GWC don't see my cache and it starts seed new tiles.

This is my general GWC settings:

I just want to get my pre-generated map.

Did there anybody faced with such problem?


texts: my search engine is not responding in arcgis

texts: I am unable to use the search engine in ArcMap. I am trying to create a TIN but when I type TIN (Triangulated irregular networking) into the search space ArcMap doesn't respond.


texts: Seeking ArcPy equivalents for SPLINE and SETWINDOW commands from ArcInfo Workstation?

texts:
I know of a list of conversions between AML and ArcPy.

I was wondering if anyone knew of another resource to go between the two? In particular I am looking for a SETWINDOW (AML) function  in ArcPy, and I am trying to understand what the SPLINE function does in AML, and trying to figure out if its the same as the Spline tool in ArcGIS.


texts: Adding only subset of fields during ArcGIS Spatial Join?

texts:
I am using ArcGis 10.2.

Is there any python script or tool in order to add to my point shapefile only two specific columns I want from my polygon shapefile based on location?

Spatial Join adds all columns from both shapefiles to a new shapefile and Near tool adds the corresponding FID and DISTANCE but not the columns I want.


texts: Adding number for each linear feature group by type using PostGIS

texts:
I have a linear layer with line type A,B,C (red,green,blue). For each linear feature I added MANUALLY sequence numbers (for line with name A: 1,2,3,4,5; for line with name B: 1,2,3; for line with name C: 1,2,3,4).

How can I add sequence numbers automatically with saving sequence in line direction (from start to end line)?

I tried the next SQL query:

DROP TABLE IF EXISTS route_lines_test;
CREATE TABLE route_lines_test AS
SELECT
t.geom,
t."name",
t."order",
row_number() OVER (PARTITION BY t."name" ORDER BY ST_X(ST_Centroid(t.geom))) AS order_sql
FROM
(
SELECT
geom,
gid,
"name",
"order"
FROM
line_layer
ORDER BY "name", ST_X(ST_Centroid(geom))
) t

where I added line ordering by line centroid 'X' coordinate, but received incorrect result for line 'B' (green)


texts: Generalization with GRASS explodes number of polygons that are exported to GeoJSON

texts:
I have a shape file containing polygons with 10 geographical districts that together form a city, which I want to generalize without "sliver" artifacts and export to GeoJSON.

When running this vector layer through the built in "Simply" option in QGIS and exporting the simplified result to GeoJSON, I see one GeoJSON feature per district with polygon coordinates that represent each district. This is the output format I expect and know how to work with. However, the build in "Simplify" command is not topological aware and there are visual artifacts or "slivers" that are unwanted.

Example of acceptable output format from built-in "Simplify" command after export to GeoJSON (this will containing 10 features as expected):

{
  "type": "FeatureCollection",
  "features": [
    { "type": "Feature", "properties": { "name": "District 1" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 38.724405, 8.998544 ], // ...
    { "type": "Feature", "properties": { "name": "District 2" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 38.772469, 8.951595 ],  // ...
    // ...
  ]
}

For this reason I've turned to GRASS v.generalize that in QGIS generates a visually acceptable result without artifacts, but when exporting the generalization to geojson the number of polygons have exploded with multiple polygons being associated with the same district. I notice that the resulting geojson also contains properties "fid" and "cat" that is not present in the output from the simple generalization.

Example of output from GRASS v.generalize command after export to geojson (this will contain 677 features!):

{
  "type": "FeatureCollection",
  "features": [
    { "type": "Feature", "properties": { "fid": 1, "cat": 4, "name": "District 1" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 38.689519, 8.955512 ], // ...
    { "type": "Feature", "properties": { "fid": 2, "cat": 1, "name": "District 2" } "geometry": { "type": "Polygon", "coordinates": [ [ [ 38.682155, 8.951824 ], // ...
    { "type": "Feature", "properties": { "fid": 3, "cat": 4, "name": "District 1" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 38.682155, 8.951824 ] // ...
    { "type": "Feature", "properties": { "fid": 4, "cat": 1, "name": "District 2"}, "geometry": { "type": "Polygon", "coordinates": [ [ [ 38.689519, 8.955512 ], // ...
    // ...

So, how do you make a topology aware generalization in QGIS (assumingly with GRASS v.generalize) that when exporting to GeoJSON does not create a lot of extra polygons polluting the end result, and keeping the number of polygons down to match what is actually seen on the screen?

Or alternatively how do you clean / merge the result to get the desired number of polygons (10 in this case)?


texts: I cannot continue with sorted files in ModelBuilder in ArcGIS

texts:
When I use the tool "Sort" within modelbuilder I  can not access the resulting file from other tools within modelbuilder in order to continue with the model. If I, for example, sort the file PR into PR_sort and then try to add a field I get this message:
"ERROR 000229: Cannot open C:\LN_Slump\PR_sort. Failed to execute (Add Field)."

Or if I try to rerun the sorting I get
"ERROR 000210: Cannot create output C:\LN_Slump\P_sort. Failed to execute (Sort)."

Doing the same things outside modelbuilder by using one tool at time is absolutely no problem (but very unpractical).

Does anyone have a suggestion to what might be wrong and how to solve the problem?

I am using ArcGIS 10.2.2


texts:
I have a feature service that is solely cloud-hosted.
I need to load data into the service.
I have many features to add, so I don't want to do this manually.
Is there a way to load the features from the data directly to the feature service?
I cannot do this after export, because then the data would be disconnected and multiple people are editing the service at once.
I cannot use Server, and I must leverage AGOL.
Is there a re-existing tool? Something designed for AGOL?


texts:
I'm trying to convert a global irradiance map - generated by r.sun - into tiles to be layered onto OpenLayers using gdal2tiles.  However, every single one of my outputs is turning into white noise and I can't seem to find the issue.

The output images all look something along the lines of this, no matter the resolution:

The command QGIS is running is

gdal2tiles.bat -p raster -w openlayers "D:\\Google Drive\\Tucson_Sol\\14S14E07_3ft\\global\\monthly\\total_sun_apr_sum.tif" "D:\\Google Drive\\Tucson Solar Map\\OpenStreetMap Tiles\\14S14E07_3ft\\January\\dem"

and the output has no issues:

Algorithm gdal2tiles starting...
GDAL command:
cmd.exe /C gdal2tiles.bat -p raster -w openlayers "D:\\Google Drive\\Tucson_Sol\\14S14E07_3ft\\global\\monthly\\total_sun_apr_sum.tif" "D:\\Google Drive\\Tucson Solar Map\\OpenStreetMap Tiles\\14S14E07_3ft\\January\\dem"
GDAL command output:
0...10...20...30...40...50...60...70...80...90...100 - done.
0...10...20...30...40...50...60...70...80...90..Generating Base Tiles:
Generating Overview Tiles:
.100 - done.
Converting outputs
Loading resulting layers
Algorithm gdal2tiles finished

Has anyone run into an issue like this?


texts: How to bring all "tourism:attraction" from points table and polygon table together?

texts:
Im using OSM data as osm2pgsql-import (from extract.bbbike.org). And I want to draw all attractions ("tourism" = 'attraction').

The most of the attractions I found in the planet_osm_point table. But some are missing. I found them in the planet_osm_polygon table.

For example: A very important church and attraction is a building-shape in the polygon-table and is missing in the points table.

But I will draw ALL attractions as a point in a point-layer in my qgis. I’m sure that there is a elegant solution with postgis - but I’m very new to postgis and have no idea where to start.

To draw the points layer AND the polygon-centroids together is no solution for me.


texts: How to select by polygon in PostGIS with misaligned layers?

texts:
I have two polygon layers, one which defines subregions of the other. However, the layers do not line up exactly, so there are minor discrepancies along the edges. I would like to select all minor polygons which lie within the major polygon layer. What is the best way to do this in PostGIS?

Sample of map below. You can see the blue subregions on top of the larger yellow region, with seemingly exact "jigsaw" edging. I have tried using ST_Within to select polygons, with the result being the purple polygons. These are clearly a subset of what I am looking for.

Zooming in, you can see that the edges do not align properly.

What is the best way to select under these circumstances?


texts: How can I convert geomagnetic coordinates to geographic coordinates without doing the math myself?

texts:
I have some data which are in geomagnetic coordinates; that is, they are latitude and longitude, but in reference to the magnetic north pole in Canada rather than the geographic north pole. As you might guess, I'd like to match them to other data which are in other coordinate systems.

(The data originated as a computation of the auroral oval; i.e., they originated as geomagnetic and there is no geographic source I could consult, even in principle.)

The data will be stored in PostGIS.

The easy way to do this is to find an EPSG code for the geomagnetic coordinate system, tag the data with that code, and then everything is magically reprojected to whatever I need at the time. However, I can't find any EPSG codes on spatialreference.org containing either geomagnetic or magnetic. Various Google searches also turn up nothing.

For the level of precision I need, any latitude/longitude coordinate system (e.g., WGS84) modified to have a different north pole is good enough. So if there's an easy way to define such a coordinate system and load it into PostGIS, that would be OK too.

Clarification

For example, suppose that instead of converting from geomagnetic coordinates to geographic, I simply wanted to convert from UTM 15N to WGS84. I could save the UTM object into PostGIS unmodified, and tag it with the EPSG code 26915. Then, when I later made a query, I could say to PostGIS, "please return results in EPSG code 4326", and PostGIS would convert to WGS84 automatically.

Similarly, I would like to tag the geomagnetic data with some coordinate system and let PostGIS do the reprojection behind the scenes, without me having to call a reproject() function manually.


texts: Shapfile attribute data processing using ArcPy in IDLE

texts:
I am working on  shapefile data using ArcPy in IDLE environment. How can I access/read two attributes of a shapefile and create a scatter plot using ArcPy?
This is what I am getting:

This is what I need:

import arcpy
from arcpy import env
from arcpy.sa import *
import matplotlib.pyplot as plt
import numpy as np
env.workspace = "C:/Users/zohaib pc/Documents/MS_second_semester/PYTHON_GIS/PYTHON_GIS/python final"
readd= "pm25.shp"
nparr = arcpy.da.FeatureClassToNumPyArray(readd,['AQI_yearly', 'PM25_yearl'])
plt.plot([nparr['PM25_yearl'],nparr['AQI_yearly']])
plt.show()


texts:
I'm writing a plugin for QGIS and inside the method def run(self), after the OK button of the plugin is clicked, i.e., inside

# Run the dialog event loop
result = self.dlg.exec_()
# See if OK was pressed
if result == 1:
    .
    .

I have a test about some variables. If the test fails, I write a message using

QMessageBox.about(None,"Warning","Some text")

Then I would like to run again the plugin. I tried to execute the code

self.run()

after the QMessageBox, but the behavior is quite strange, because sometimes the same QMessageBox appears again and again.

How could I run again the plugin?


texts: Highlighting feature clicked as row in table using OpenLayers 2 + jQuery?

texts:
In my project I am trying to display research data on Google Maps. I am using OpenLayers java library in my project.

I would like to connect a table to the map in a way that the user can click on the table and display the corresponding layer on the map. I have tried with jQuery to assign an ID value which works in a way so that when the user clicks on the map it will highlights a row on the table. However, I am not able to do it the other way as I mentioned above.

Can any one help me with my problem?

The jqery script I have used is:

// I have created table like below

Layer	Layer Description

5000_fKr	Layer details

4000_fKr	3500_fKr

// I have created map object like below


texts: How to display GeoWebCache local tiles with OpenLayers 3?

texts:
I've created local tiles using GeoWebCache and they are inside local folder names :

Layer  - EPSG_4326_9-
                     - 19_10 -
                             - 0608_0339.png
                             - 0608_0340.png
        - EPSG_4326_10 -
                       -19_10 -
                              -1217_0679.png
                              -1217_0680.png
        - EPSG_4326_11 -
                       -38_21
                             -2435_1358.png
                             -2435_1359.png

How can I show them using OL ?
I thought using XYZ layer , something like :

var test =  new ol.layer.Tile({
title: 'test',
type: 'base',
visible: true,
source: new ol.source.XYZ({
    tileUrlFunction: function (coordinate) {
        if (coordinate == null) {
            return "";
        }
        var z = coordinate[0];
        var x = coordinate[1];
        var y = coordinate[2];
        //var y = (1 << z) - coordinate[2] - 1;

        return 'tiles/layer/EPSG_4236_' + z + '/' + x + '/' + y + '.png';
    }
})

});

but the Z X Y numbers don't match ....


texts: Need an explanation on a network simplification algorithm

texts:
I try to implement the algorithm described in this paper (page 8), but there's a place that I can't understand, and the authors do not provide a more detailed explanation or pseudocode.

They show how to contract this graph:

Vertices A, G & F are external and must remain. Now, they analyze the connections:

  For 1,8,9, the connections are {1}A,8,9, {8}G,9,1, and {9}F,8,1. Any vertices connected solely within the subgraph are removed from the list. In this particular instance none of the vertices is internal to the subgraph. Next, any repeated items are removed from these lists. What remains are 1,8,9, A,G,F. The centroid, X, is now calculated as the mean of the vertices in the subgraph (1,8,9).

What are these repeated items? What is the criteria that 1, 8 & 9 can be reduced?

Are there better papers & algorithms for graph simplification? What I want to do is simplify a road graph, removing junctions and cities if needed.


texts:
I haven't used CAD in years and am quite rusty about its features. But a client who uses CAD has been experiencing difficulty lining up *dwg files exported from ArcGIS in their CAD workspace. How can I export tha data in GIS so that it is referenced to fit their workspace? Or how can they make adjustments to fit the data themselves?

Sorry I got caught up working on other projects. Thank you for the response guys. The client is not using Map 3D so projections are not important as I understand it from my CAD days.

The problem is when the shapefile is exported in ArcGIS to *.dwg the client is asking for a reference point. According to Brad's instructionsI have another question. Does that mean we should agree on a point in the shapefile as a reference point that they have as well in their CAD data, and I then send them the coordinates for it to use to make adjustments in CAD? Does CAD even use geodetic coordinates?


texts:
I know that qustiosn was was asked before.
I have tried to find an OSM key on the web, but without success.
I know that I need to enter the API key by going in this order: web- OpenLayers Plugin-OSM/Thunderforest-Set API KEY

How and where can I find the API Key that need to be paste in this window?

I opened an account at Thunderforest Console, paste the API key, but it did not solve the problem


texts: Earth Engine create user defined function with default parameters

texts:
I am creating a user based function that I will save in my repository for re-use later.  But I'm facing a problem with putting default values in my parameters.

var myFunction = function(number, power = 2){

return(ee.Number(a).pow(power);
}

print(myFunction(2);

print(myFunction(2,3);

The whole point is that most of the time I will want to square a number, but some time I may want to do another power.  When you run the above example, you get an unexpected token error.  Which is surely due to the "=" in the function definition.

How can I set default parameters?


texts:
I am new to handling spatial dataset in R. I have been following a tutorial and wanted to create a grid over the raster layer. After running Step 2, I get the following error:

Error in UseMethod("st_geometry") :
  no applicable method for 'st_geometry' applied to an object of class "c('RasterLayer', 'Raster', 'BasicRaster')"

Below is the libraries I installed and the code I ran. The raster layer displays properly.

library(landscapemetrics)     # landscape metrics calculation
library(sf)                   # spatial vector data reading and handling
library(raster)               # spatial raster data reading and handling
library(dplyr)                # data manipulation

## 1 - READING THE DATA

data("augusta_nlcd")
my_raster = augusta_nlcd

plot(my_raster)

## 2 - CREATING A GRID

my_grid_geom = st_make_grid(my_raster, cellsize = 1500, square = TRUE)


texts: Converting data collected at political units (eg. census tract) to new ecologically-defined units (eg. watershed)?

texts:
I have socioeconomic status (SES) data of every health authority (HA) in the province. I overlay a watershed boundary polygon on top of multiple HAs and would like to know: What is the SES of the population residing within the watershed?

I am using ArcGIS desktop 10.5. So far I have tried converting HAs to points and then rasterizing it so that I can use the zonal statistics tool to summarize all cells within the watershed. However, this does not account for the fact that people are not homogeneously distributed in space and there is no way of knowing how accurate the conversion was (this is where I am stuck).


texts: PyQGIS: Multiply fields and populate new field

texts:
I am trying to populate field "L_M" with the default value of "Length" or with the result of multiplication between "Length" and 0.3048 if "LengthUnit" = 2, which stands for Feets.

from qgis.core import *
from qgis.gui import *
from qgis.utils import iface
from qgis.PyQt.QtCore import QVariant

# create layer
layer = iface.mapCanvas().currentLayer()
it = layer.getFeatures(QgsFeatureRequest())

layer.startEditing()

# add field

new_Field1 = "L_M"
idq = layer.fieldNameIndex(new_Field1)

if idq == -1:
    layer.addAttribute(QgsField(new_Field1, QVariant.Double, 'double', 20, 4))

layer.updateFields() # tell the vector layer to fetch changes from the provider

idl = layer.fieldNameIndex('Length')
e = QgsExpression ("idl * 0.3048")
e.prepare(layer.pendingFields())

for feat in it:
    if feat['LengthUnit'] == 2:
        layer.changeAttributeValue(feat.id(), layer.fieldNameIndex('L_M'), e.evaluate(feat))
    else:
        layer.changeAttributeValue(feat.id(), layer.fieldNameIndex('L_M'), idl)

layer.updateFields() # tell the vector layer to fetch changes from the provider

The result I get is 'L_M' field populated with '10.000' value, and NULL value for entries with 'LengthUnit' = 2.

What is the best approach to get the multiplication between fields in a new field?

P.S. As I see it, my script doesn't even read proper values from the 'Length' field, which I don't know why. It's a Double type field also.


texts:
How can i display the current zoom level using mapbox ?
Like this: https://www.nps.gov/npmap/tools/npmap.js/examples/zoomdisplay-control/
I thought it could be easy, like adding navigation control, but seems not.
First I just added the line

map.addControl(new mapboxgl.Navigation());   Add the nav controls
map.getZoom ();                              thought this would add the zoom box...

As i saw there https://stackoverflow.com/questions/35614957/how-can-i-read-current-zoom-level-of-mapbox , I should first create a var ? i tried var zoom = map.getZoom();
But then i should create a div reffering to some css to display it ?
So i tried inspiring by this leaflet plugin https://github.com/azavea/Leaflet.zoomdisplay . I i created a style class.leaflet-control-zoom-display {

Then tried to put my var into a container like this :

var zoom = map.getZoom (
container: '.leaflet-control-zoom-display');

My patchwork isn't working.. i guess there is more code for this ?
As i am using mapbox gl js and not leaflet, i can't realy use the plugin found on github, but is it possible to fit it to mapbox ? If doiing that, i may change some of code, like that :

L.Control.ZoomDisplay = L.Control.extend({
options: {
position: 'topleft' },

will it be Control.ZoomDisplay = Control.extend({
    options: {
    position: 'topleft' },
just removing the L referring to leaflet is enough ?
In the top of my html page, should i add a link to the native leaflet also even if i already have one to mapbox ?<script type="text/javascript" src="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>


texts: r- Compress/ Speed up large Spatialpolygonsdatafram

texts:
I am brand new to R and GIS and I ultimately am not doing anything to complicated (for now) but have been struggling with even the most basic task! I'm simply trying to plot a map of the US states. I was following along with a tutorial and decided to do it with my own data. I import (using readOGR) the shapefile and it shows up as a "Large SpatialPolygonsDataFrame (56 elements, 6.6MB). Then I tried graphing it: plot(state) and it took about 45 minutes to produce a graph that didn't even look quite right.

I figured it was a ram issue on my computer but then I tried it with the shapefile specified in the tutorial. It came in as a formal class spatialpolygonsdataframe and plotting it took around a second.

Therefore I figure it's something with the shapefile.

Is there way to compress it/ change it so it's not a "large" dataframe or just speed up operations in general?


texts: How to show which layers are currently visible

texts:
I want to show which layers are visible from a dynamic layer. I see all the objects being returned in the console with a 'visible' property. For some reason, I can't access that property.

My code:

var baseData = new ArcGISDynamicMapServiceLayer("http://arcserver/arcgis/rest/services/Base_Data/Resources_All/MapServer", {
    opacity : 0.8
});

function buildLayerList() {
    var visible = [];
    var items = array.map(baseData.layerInfos, function(info, index) {
                console.dir(info);
        if (info.visible === true) {
          visible.push("<li>" + info.name + "</li>");
        }
      });
      var ll = dom.byId("selectedBaselayers");
      ll.innerHTML = visible.join(' ');
    }

I want to access this property:


texts: GeoServer - restrict access to layer by IP mask

texts: Can you restrict access to an individual map layer in GeoServer by an IP mask (eg. 192.17.204.0/32)?  This is as opposed to firewalling the whole service, or by role authentication.


texts:
I've written the following arcpy script to loop through a directory and intersect all the shapefiles in it with a certain other shapefile:

import arcpy, os
from arcpy import env
from arcpy.sa import *

#To overwrite output
arcpy.env.overwriteOutput = True

#Set environment settings
env.workspace = "F:/Tiled_Shapes/"

outws="F:/Clipped_Shapes/"

#checkout ArcGIS spatial analyst extension license
arcpy.CheckOutExtension("Spatial")
inshape = arcpy.ListDatasets("*","All")

clipfile = "F:/Clip_subset.shp"

for i in inshape:
  filename=os.path.splitext(i)[0]
  outPolygons= outws + str(filename) + '.shp'
  inFeatures = [i,clipfile]
  arcpy.Intersect_analysis(in_features=inFeatures,join_attributes = ALL, out_feature_class=outPolygons)

Whats unnerving, is that rather than getting an error, nothing happens. What am I doing wrong here? When I use the intersect feature on the same data in ArcMap, it works fine. Now when I try to do it to a whole directory its failing.


texts: Help with "Calculate Values" Python expression (ModelBuilder)

texts:
I have a model and need to compute a new value from two other values upstream, and then feed the new value to the Kernel Density tool.

Here is the formula I am trying to reproduce in the "Calculate Values" tool:

Excel

Here is what the formula looks like in Excel: =((2/(3*n))^(1/4))*(σ)

For example, if n = 9 and  σ = 42840 it results in the correct answer of 22350

Python

Here is the formula as I currently have it in "Calculate Values Tool": ((2/(3*%Row Count%))**(1/4))*(%SD%)

It does not return the correct value. Am I missing a parenthesis somewhere?


texts: I am wondering if something like this: http://esri.github.io/gis-tools-for-hadoop/ exists but for QGIS. Or if these tools be adapted for QGIS.


texts: QGIS 3.16 and newer not commiting merge when string exceeds 255

texts:
I have been developing a QGIS plugin with PyQt5 in QGIS 3.10 for a while now. The plugin gets layers from an api, displaying features of POINT, LINESTRING or POLYGON (wtk) in layers. When the wtk-strings are over 255 in length I get a warning message, but it still stores the data and displays the features. But when I want to merge layers together the strings that are over 255 in length will not get saved. So when merging I lose all features that exceeds the string length. This is not a problem in 3.10 but in 3.16 and 3.18. In 3.10 all features get saved after merge.
I use qgis:mergevectorlayers when merging.
Example of error message when trying to merge layers:
Could not commit changes to layer Bærelag
Errors: ERROR: 50 feature(s) not added.
Provider errors:
Could not store attribute "Geometri, hjelpelinje": String of length 3786
exceeds maximum field length (255) "
"

Is there an easy workaround?
Edit:
The layers are temporary scratch layers and when using qgis:mergevectorlayers they become GeoPackages


texts:
I'm developing an interactive web-based navigation application which user can search locations and navigate from point A to point B by an online map. The routing algorithm (find shortest trajectory between point A and B) is ready and generate geoJson based data. Also, the shapefile of desired area (map) is available. The main features would be:

The application is based on php5.5, html5/css3 and jquery/ajax.
The application would work with .shp (shapefile) data.
The application must have the following features:

zoom in and zoom out
set point A and B (start and end of navigation) with right-click by user
draw trajectory from point A to point B (as soon as both of them were known) on map on the user's browser
get geographic information (like coordinate and nearby places) wherever the user right-clicked.

I've got a lot of search in this field and most of what I found was about jquery libraries like Leaflet. The disadvantage of these libraries was that they used online maps like google map or openstreetmap.

How can I develop an interactive web-based application which uses my own map and shapefiles?

Is there a jquery or php library that I missed.


texts:
I can create a connection to the database in QGIS and the test connection is successful. However when I actually connect to the database to export shapefiles I get the following error:

the connection is failed, check the configuration.


texts: Where is ESRI.ArcGIS.Client.Tasks.Utils.JSON documentation?

texts:
I'm using the WPF assemblies from the freely downloadable ESRI WPF/Silverlight 2.0 SDK.

As I type in a "using" statement in visual studio, I can use intellisense to expand out into:

using ESRI.ArcGIS.Client.Tasks.Utils.JSON;

However, I don't see any documentation for it, nor does anything show up in the object browser.

Does anyone know where I can find more out about this?


texts:
I have installed the newest QGIS and downloaded python-docx from this link python-docx . I haven't installed separately a different version of python. Is it possible to integrate this package of python-docx to work with QGIS (Windows version) ?

I looked at this site Installing Third-party Python Modules in QGIS (Windows)
After changing this section call(['easy_install', 'lxml']) to call(['easy_install', 'python-docx']) and run code in QGIS Python console I've got an error
:


texts: QGIS Graphic modeler: Printing a number in a QGIS Print Layout on a specific label Item

texts:
So far I am trying to create script to add some "supplement" numbers to a lot of lay-outs. This because we want the editing of the lay-outs to be a less as possible.
The Layout name is different each time, the structure and therefore the Item ID's are the same. With around 60 plans editing one by one is kind of hassle even though
It is actually one specific called the Item called "Bijlage NR" which is a label. .
So to circumvent this I was trying to see if I can build a script/model in the QGIS model builder to just choose the lay-out type choose a number from 1-100 and the it will print that number in that item on my layout.
The thing is while I can see an option "print" a layout item of a layout in the model builder and there is a option to put a number in, I do not see an option to kind off express that number in that Item ID.
So how do I do this?

Also Bonus:
Currently I can theoretically make this a batch process to edit multiple layers at the same time the annoying thing is, I will also need to select the layout item id "Bijlage NR" each time. As you can guess this is kind of annoying if you have over more than 30 Layouts. If someone can tell me how to refine this QGIS graphic modeler to not have me to select that Item Id in each row of the batch and no I do not mean by expression or anything like that. Just a way to to eliminate that parameter al together.


texts: gdalwarp reprojection causes missing data

texts:
I have tried to reproject and resample an SRTM DEM file from WGS84 to a cylindrical equal area projection. The problem is there is missing data as seen in the image below. The command I use is:

gdalwarp -s_srs WGS84 -t_srs ogcwkt.prj -r near -multi -ts 43200 0 topo30.ers topo30_equal_area.tif

with the ogcwkt.prj file content:

PROJCS["World_Cylindrical_Equal_Area",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Cylindrical_Equal_Area"],PARAMETER["false_easting",0.0],PARAMETER["false_northing",0.0],PARAMETER["central_meridian",0.0],PARAMETER["standard_parallel_1",0.0],UNIT["Meter",1.0]]

I have tried several variations but none work. gdalinfo of the file gives me:
Note the strange coordinate in Lower Left and Lower Right corners.

Driver: GTiff/GeoTIFF
Files: topo30_equal_area.tif
       topo30_equal_area.tif.aux.xml
Size is 43200, 13717
Coordinate System is:
PROJCS["World_Cylindrical_Equal_Area",
    GEOGCS["GCS_WGS_1984",
        DATUM["D_WGS_1984",
            SPHEROID["WGS_1984",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433]],
    PROJECTION["Cylindrical_Equal_Area"],
    PARAMETER["standard_parallel_1",0],
    PARAMETER["central_meridian",0],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (-20037506.530948571860790,6360746.183380804955959)
Pixel Size = (927.657908734666648,-927.657908734666648)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (-20037506.531, 6360746.183) (179d59'59.94"W, 88d12'30.00"N)
Lower Left  (-20037506.531,-6363937.351) (179d59'59.94"W,-2147483648d-2147483648'  nan"N)
Upper Right (20037315.126, 6360746.183) (179d59'53.75"E, 88d12'30.00"N)
Lower Right (20037315.126,-6363937.351) (179d59'53.75"E,-2147483648d-2147483648'  nan"N)
Center      (     -95.702,   -1595.584) (  0d 0' 3.09"W,  0d 0'51.95"S)
Band 1 Block=43200x1 Type=Int16, ColorInterp=Gray
  Description = Topography
  Min=-10500.000 Max=7729.000
  Minimum=-10500.000, Maximum=7729.000, Mean=-1911.637, StdDev=2643.966
  Unit Type: meters
  Metadata:
    STATISTICS_MAXIMUM=7729
    STATISTICS_MEAN=-1911.6374294607
    STATISTICS_MINIMUM=-10500
    STATISTICS_STDDEV=2643.9655969462


texts: Creating raster cell squares around SpatialPoints (until a certain value range of the raster cells is achieved)

texts:
I have a DEM raster and a list of SpatialPointsDataFrames (data available here https://drive.google.com/open?id=1ERFdsqDGLH1a_FbxwawE_gPm0Au0Q9vT).

EDIT: (with regard to @Spacedman's comment)

I want to calculate the smallest N for each data point such that the raster values in an NxN square around each SpatialPoint's square have an elevation range (max-min) >= 15metres. It should look something like the picture below, where the brown raster cell is the one with a SpatialPoint inside and the blue line represents the extent of the NxN square.

I've looked at the help for the raster:focal function as proposed by @JeffreyEvans, but I don't see any possibilities to input my SPDF as source for the focal points.


texts: How to convert WGS84 to UTM when the study area covers 4 UTM Zones: 43- 46?

texts:
I'm working in ARCGIS 10.2, my area of interest falls in 4 UTM zones 43,44,45,46 equally distributed so i can't use the option of majority of area's UTM zone.
Since i need to carryout varies analysis which involving distance and area i need it to be converted also I need to apply same on my SRTM DEM of the study.


texts: How do Arc Grids and file geodatabase rasters differ?

texts: I know that they are stored differently, but I'm interested in comparisons such as storage capabilities, access speed and data types.  I've searched the web but haven't found any such technical comparisons...


texts: Showing data in form view (instead of grid view) using ArcGIS API for JavaScript?

texts:
Can anyone suggest how to bind data with the help of query in a Form view of the ArcGIS API for JavaScript?

I have done it in Grid view but as the requirement of a client is that I have to bind it to a Form view.


texts: Is there a "Tabulate Area" function in QGIS?

texts:
I have a raster file about land usage in northern italy (crops / urban areas ecc..)

I have defined some buffer zones around some given points of a vector layer and I'd like to calculate the % of those areas occupied by each value of the raster file in order to make an estimate on the average usages of the selected areas (like 70% crops, 30% urban, etc..).

I know that in ArcGIS there is a Spatial Analyst function to do so called "Tabulate Area", but I can't find such feature in QGIS.

If anyone can help me I'd be so grateful.


texts: Getting only points when importing from OpenStreetMap to PostgreSQL?

texts:
This is my first time working with OpenStreetMap data.

I am trying to import some data from OpenStreetMap into PostgreSQL.
I have been downloading the data using the following query :

wget 'http://overpass-api.de/api/interpreter?data=node(52.06,5.04,52.08,5.06);out;' -O utrecht2.osm

Then, I have imported the resulting file into PostgreSQL using osm2pqsql:

osm2pgsql -c -d utrecht -C 1000 --flat-nodes /home/me/Documents/01_perso/28_routing --hstore -S default.style utrecht2.osm

Everything seem to run without any error (that I can see at least).

I am using the default.style file that can be found here for the import.

Finally, I am looking at the data that has been imported into my Postgresql table.
What annoys me is that only the planet_osm_point table contains information.
All other tables are empty.

When looking at the area using the OSM website, it is clear to me that there should be way more information available, in terms of polygons, roads, etc

I have tried to reduce my search area several times, wondering if I hadn't reached the overpass API limits but without success so far.

Could someone point me towards the reason why I don't get any road, polygon, line information into my database?


texts: Building PostGIS address_standardizer extension formerly known as PAGC address normalizer on Mac?

texts:
I have come a long way towards completing the TIGER Geocoder. However, I cannot perform an installation of postgres and postgis that reveals the new PostGIS 2.2.1 address_standardizer extension or any address normalizer extension.

It is clear that I will need to build this from source found in the postgis extras. Since I have rarely succeeded at config-make-install efforts, I know that this critical step will require preparing an accurate and complete list of other libraries that I will also need to config, make and install.

How can I find the correct and complete list of dependencies i need to install on my mac in order to succeed?


texts: Finding the Map-Tiles(z,x,y,tile_data) in a given Bounding box and zoom level

texts:
I have this information:For Ogun State Nigeria from http://www.maphill.com/nigeria/ogun/

South
 6° 18' 6" N
North
 7° 59' 23" N
West
 2° 40' 6" E
East
 4° 34' 47" E

I have map tiles @ different zoom levels 10,11,12,13,14,etc for the whole of Nigeria stored as z,x,y,tile_data

Please how can I identify just the tiles within the given bounds at each zoom level


texts:
I want to import simple blocks (rectangles with a "Value", that is a text string) from a DXF to QGIS. I want to keep that value so it shows up as an attribute in the corresponding layer in QGIS. I have tried Importing from the File-menu, and importing as a single vector layer.

I have tried importing from DWG, different versions, and DXF, different versions. The closest I come is that QGIS create a point that origins from a blocks text components insertion (text placement) point. But I want this text to be an attribute in the imported block object (a point in QGIS) instead.


texts: Creating contour lines from DTM in PostGIS

texts:
Is there any possibility to compute contour lines from a raster DTM directly in PostGIS on a PostgreSQL database?

I have only found this solution based on points "Fast contour lines using plain PostGIS", but none based on rasters.

Might it be possible to call gdal_contours from a SQl-function?


texts:
in QGIS 2.18 I had this script

##formula_1=boolean
##formula_2=boolean
##formula_3=boolean
##result=output string

if formula_1 == True:
    result= 1
elif formula_2 == True:
    result= 2
elif formula_3 == True:
    result= 3
else:
    result= 4

So I can fill a string based on the selected Check Box.
Now, in QGIS 3.4, How can I create a script to do the same?


texts:
I want to locate shops with open street map. For that I send a query to nominatim, a webservice which geocodes coordinates from addresses.
I draw a marker at the returned coordinates, and it´s inaccurate about 100 m.
(~300 ft). To double check, I search the coordinates on google maps, and it is also the same (wrong) position, so the error seems to be at nominatim.

Now I type the address I gave to nominatim and search with osm and google maps, where as osm returns the same inaccurate position, google maps returns the correct.

Is it possible that OSM and Nominatim back on the same data in the background (like TIGER?). I'm located in a small town in Germany, is it possible that these areas are still too inaccurate?

Can somebody tell me whats wrong there, or if I can solve this?


texts: Can you correct calculate the coordinates of a position given time and distance

texts:
lets say i have a point on the map

New York, NY, USA
Latitude: 40.712784 | Longitude: -74.005941

If i move 10 metres north in 20 seconds ,can i use the coordinates i have to calculate the new coordinates?.


texts: Changing workspace path of query layer using ArcPy?

texts:
I'm trying to change the workspace path of a query layer using the code below and it always breaks. The layer is connected to a view in an Oracle Spatial 10g database. The database is SDE enabled although since it is a query layer SDE knows nothing of it.

The tables which python is changing the workspace path of are actually views which is why they are query layers. The problem I'm experiencing is that the layers are broken after the code is run on them. It seems the workspace path is changed correctly but the "Table Type" is (null) and it has lost its Object-ID Field mapping. Does anyone know why it corrupts the layer like this when I run the code below?

import arcpy, os

# Globals
process_folder = r"C:\Users\tfronal\mxds"
dev_workspacePath = r"C:\Users\tfronal\connections\ORACLEDEV_SDVIEWER.sde"
change_flag = False

for filename in os.listdir(process_folder):
    fullpath = os.path.join(process_folder, filename)
    if os.path.isfile(fullpath):
        basename, extension = os.path.splitext(fullpath)
        if extension.lower() == ".mxd":
            change_flag =False
            print "--------------------------------------------------"
            print "Opening MXD:" + fullpath
            mxd = arcpy.mapping.MapDocument(fullpath)
            for tbl in arcpy.mapping.ListTableViews(mxd):
                if "oraclestage" in tbl.workspacePath.lower():
                    tbl.findAndReplaceWorkspacePath(tbl.workspacePath, dev_workspacePath, False)
                    print "New workspace path: " + tbl.workspacePath
                    change_flag = True

    if change_flag == True:
        mxd.save()
        print "mxd saved."

    del mxd

print "Finished"

EDIT: Adding some additional information as per comments request. This code is meant to be used to migrate mxd/s between staging and development environments and so on. The change of workspace(.SDE file used) will change the database, username and password. The MXD is saved from ArcMap 10.2.2.


texts: Algorithm to detect entity (aircraft, ship, etc) intrusion into geographic area

texts:
I have been tasked with coming up with an algorithm to determine whether or not an entity (aircraft, ship, etc) is inside or outside of a geographic area defined as a set of geodetic (lat/long) vertices.  I receive a live stream of periodic position updates for each entity and must make the inside-outside determination upon each received update.

No graphics or imagery is involved on my end, simply data processing. I have a set of vertices that defines an area and a set of points for which I need to determine whether each is inside or outside the area.

What I do with each entity update is determined by the outcome of the inside/outside determination.  I'm a novice in this area so am not even sure where to begin looking.

The development environment is a complicating factor. We're developing in Visual Studio C++ 2003 (yes 2003!) on a Windows XP box. We'll be modernizing, but that is opening a whole can of worms we can't open right now. We need to add the functionality first. I know that will rule out some solutions. I might even have to get creative and perhaps have a dedicated machine (running a more modern OS and using Visual Studio 2013) to offload the inside/outside determination for each entity position update.

I can't say too much about the project domain (military), but you can imagine there would be many military applications where users define geographic areas (in this case irregular polygons) and want to know which platform entities (vehicles of various types) are inside or outside of each area. This is undoubtedly a common problem solved by many before me.

So my question is what algorithms are available to solve this problem?  What off-the-shelf third party tools?


texts:
For some graph work, I need the value of X,y tolerance. I found ISpatialReferenceTolerance.XYTolerance Property. But I couldn't find any option that how can I get ISpatialReferenceTolerance interface from the map? Can anybody give me some pointer?

Thanks.


texts: QGIS Server on Windows7 Step-by-step / Test wms by adding in QGIS?

texts:
I am trying to Test a WMS by adding in QGIS as per http://anitagraser.com/2012/04/06/qgis-server-on-windows7-step-by-step/

If I follow the steps, QGIS cannot find the server.

When I take a look at the printscreen above, I see that there is QGIS.exe in the c://OSGeo4w/apps/qgis/bin –map.

Is this necessary? When does this get done?


texts: Change detection between two classifications in QGIS?

texts:
I have two raster classifications. They have the same number of classes which use the same ID (each class has a unique ID). I would like to get information on the changes between classes i.e., class 2 has changed to class 4 for polygon X. I would also like to calculate area for these changes (to be able to see which class has experienced the most change).

How would you do it in QGIS?

(The equivalent in ENVI is the 'Thematic change' tool)


texts: How to edit shapefile name written to attribute table in QGIS?

texts:
I have adapted some QGIS pythonscript code from a previous question to assign the filename of a shapefile to that shapefiles attribute table as a prelude to joining multiple shapefiles together (the SAGA plugin isn't working for me).  It looks like this:

##Add Filename to Table=name
##Input_Folder=Folder
##nomodeler

import os
import glob
from os.path import expanduser
home = expanduser("~")

# Input Folder
#path_dir = home + "/Documents/GIS Data/TEMP/" +  Folder_Name
path_dir = Input_Folder #This takes the input from the parameter

#Check that the folder "results" exists and if not create it
if not os.path.exists(path_dir + "/Results"):
    os.makedirs(path_dir + "/Results")
    progress.setInfo("Setting save location")
# Set the save location to the folder "results"
    path_res = path_dir + "/Results"

progress.setInfo("Starting file processing")

def run():

#   Set working directory and search for all shapefiles then run algorithm
    os.chdir(path_dir )
    for fname in glob.glob("*.shp"):

        formula = "'" + fname + "'"
        processing.runalg("qgis:fieldcalculator", fname, 'Filename', 2, 50, 0, True, formula , path_res  + "/"+ fname)

#   Paths of the shapefiles in the Result folder with list comprehension
    output = [shp for shp in glob.glob(path_res + "*.shp")]

run()

progress.setInfo("Finished")

Currently it adds the whole filename to the attribute table.  How would I alter the formula to trim the filename, for example to extract the OS tile code of a shapefile called "HP_SomeText.shp"?


texts: Remove 'zoom to' tool in pop up feature information ArcGIS API for JS, or define the number of clicks i.e. defined scale

texts:
How can I remove at all 'zoom to' tool in the pop up attribute information? Or how can I define the scale (number of clicks) in case if the 'zoom to' can not be removed.

I have particular layers which are defined to be visible till 1:3200, after this scale the features are not visible (with scrolling). The problem is as follow:

-The layer  has attribute information, but the 'zoom to' button it makes me problem, because it zooms to the location of the feature (eventhough the feature it dissappears), it zooms till 1:500.

In short how I can remove the 'zoom to' button at all, or define the scale when clicking the button?


texts: How to do kriging on a country map from a linear model

texts:
I would like to use ordinary kriging to interpolate model predictions on a grid. In my code underneath, GPS is a 'SpatialPointsDataFrame' and EU is a 'SpatialPolygonDataFrame'. All covariates for estimating the model are contained in 'All_data'.

# Merge points with data
GPS = merge(GPS, All_data, by.x = "nuts", by.y = "geo")
GPS <- GPS[!is.na(GPS@data$Value),]
proj4string(GPS) = CRS("+init=epsg:28992")

# Merge polygons with data
EU = merge(EU, All_data, by.x = "nuts", by.y = "geo")
EU = subset(EU, EU@data$nuts %in% GPS@data$nuts)
proj4string(EU) = proj4string(GPS)

# Create a grid
ext <- extent(EU)
r <- raster(ext, res=0.1)
r <- rasterize(EU, r, field=1)
EU_grid = as(r, 'SpatialPixels')

# Estimate linear model
OLS_model = lm(Value ~ pop + unemp, data = GPS_coords)

EU_grid$lm_pred <- predict(OLS_model, newdata = EU_grid)

However, I keep getting the error

Error in eval(predvars, data, env) : object 'pop' not found

Does anyone know how to do ordinary kriging from a lm-object?


texts: Getting unexpected results when clipping raster with polygon using gdalwarp

texts:
I am trying to clip a raster .tif file with a polygon shapefile using gdalwarp.  For the majority of the extent, the results are as expected.  But there are several gaps where portions of the raster that appear to clearly overlap the polygon are omitted from the clip. In these areas, raster cells that appear to fall entirely within the polygon boundary are still omitted.  Both input files are in the same projected coordinate system.

The top image shows the gdalwarp clip results in black over the input raster in orange and clipping polygon layer in blue.

The bottom image shows the same layers with an additional layer in pink. The additional layer was produced using the Extract by Mask tool in ArcMap, which produces the results that I would have expected from gdalwarp.  I am looking for an open source solution though.

I have tried both of the following commands:

First:

gdalwarp -of GTiff -tr 30.0 -30.0 -tap -cutline "C:\\Users...buff2.shp" "C:\\Users...tiled_p.tif" "C:\\Users...4i.tif"

Second:

gdalwarp -of GTiff -cutline "C:\\Users...buff2.shp" -crop_to_cutline "C:\\Users...tiled_p.tif" "C:\\Users...4i.tif"

I am on a Windows 10 computer. Unfortunately I cannot reproduce the datasets to share.

Are there ideas for why this might be happening and how I might fix this using gdal or other open-source tools?


texts: QGIS 3.4 Not Exporting Map to JPEG, JPG, PNG, PDF

texts:
I'm using 3.4 version, and unable to export my map as different image types. It immediately says my export was successfully saved, but when I navigate to the folder it says I saved it in, nothing is there at all. This happens when I save as a JPEG, JPG, PNG, PDF.

Thoughts?


texts: ArcGIS export map to PDF with layers symbology error

texts:
I am trying to make a PDF with layers. If one of my shapefiles symbology is set to categories, unique values, as in a states shapefile, it wont let me turn off each state; it groups it.

Is the only way to alleviate this to make individual shapefiles?

Its not just for the states, I have a bunch that are set to more than one unique values.


texts: Adding filled circular rings (digitized) in vector layer

texts:
I digitize different habitats in one nature reserve. There was 40 ponds - I use "add circular string" option to give them a nice rounded shape. When I finish this 40 ponds I was instructed also to do as a separate part of that layer - area surrounding these 40 ponds as "Early successful grassland".
How can I "clip inside" of this polygon "Early successful grassland" these rounded 40 ponds? I found that option "add circular string" is not supported when I try to use this option together with options "Add Ring" or "Fill Ring". How I can add to the polygon a nice rounded and filled rings?
Currently I use QGIS 2.18, but I check also new version of QGIS 3.0 and there was also missed connection between those features. I try use also Freehand Editing Plugin in QGIS 2.18, but there was also missed connection between features "Add Ring" and "Fill Ring". Is it there some kind of solution for this problem?
I add picture to show how it looks like.


texts:
I am using the Attribute Assistant extension in ArcMap 10.5 to validate road name data against a Master Street Names table using the method 'VALIDATE_ATTRIBUTE_LOOKUP'. My issue is that I am 100% certain that at least 1 record is wrong, but when I run the Assistant I get no errors.

I have one file geodatabase with three standalone tables located inside, these are the only files in the geodatabase. The first table is 'all_addresses_2013' which has a field called 'Street2'. The next table is 'MasterStreetName' with a field called 'FULLNAME'. The final table is the 'DynamicValue' table, which uses the method: 'VALIDATE_ATTRIBUTE_LOOKUP' and 'Manual Only' is the only value set to True. Picture attached below.

For the most part the 'Street2' field and 'FULLNAME' field have the same values. My initial test did not return any errors, which I thought strange so I edited one record in 'Street2' to be be complete gibberish as to check the Assistant, but I still didn't get any error message. I then changed one record in the 'FULLNAME' field in the 'MasterStreetName' table to different gibberish word and ran the Assistant again, again no error message. Finally, I changed the 'Field Name' in the 'DynamicValue' table to 'xxxx' (which is not a field in either the 'MasterStreetName' or 'all_addresses-2013' tables) and still nothing.

Between each of these steps I turned the Assistant off then back on, I have tried all of this with the entire 'all_addresses_2013' table selected, just the gibberish record selected, and also some trials with a handful of 10 or 11 records selected.

I am certain I am using the Table/Field name (as opposed to the Alias) this is the only record in my 'DynamicValue' table with the 'Manual Only' field set to True. The page from which I downloaded the extension is listed as being compatible with this version of ArcMap and it was only downlaoded about dour days ago. (http://solutions.arcgis.com/shared/help/attribute-assistant/) I have been able to use the Assistant before on this computer, but now I am getting no results.

Any ideas?


texts: Efficient way to identify the many points at which a large set of shapely LineStrings intersect?

texts:
I have 10,000 shapely LineStrings in a geopandas GeoDataFrame. What is an efficient Python plus shapely (and/or optionally geopandas) way to produce a list of all the points at which these lines intersect one another?

import numpy as np, geopandas as gpd
from shapely.geometry import LineString
n = 10000
x1s = np.random.random(n)
x2s = np.random.random(n)
x3s = np.random.random(n)
y1s = np.random.random(n)
y2s = np.random.random(n)
y3s = np.random.random(n)
lines = [LineString(((x1, y1), (x2, y2), (x3, y3))) for x1, y1, x2, y2, x3, y3 in zip(x1s, y1s, x2s, y2s, x3s, y3s)]
gdf = gpd.GeoDataFrame(geometry=lines)
# now produce a list of points representing the many intersections of the LineStrings in gdf

Some similar questions on StackOverflow suggest ways to identify where LineStrings intersect Polygons or inefficient ways to split LineStrings, but none seem to answer this question.


texts:
I have three tables I need to intersect but not sure how to get the third
Heres what I have so far:

SELECT nyc_neighborhoods.name, SUM(nyc_census_blocks.popn_total) AS POP
FROM nyc_neighborhoods
JOIN nyc_census_blocks
ON ST_Intersects(nyc_neighborhoods.the_geom, nyc_census_blocks.the_geom)
WHERE nyc_neighborhoods.boroname = 'Manhattan'
Group By nyc_neighborhoods.name

I need to incorprate subway stations with in Manhattan from our ny_subway_stations table

How do you insterect/join 3 tables?

Thanks,
Adam


texts: Seeking municipal-level administrative boundary data for Poland?

texts: I am looking for municipal-level administrative boundary data (NUTS 5) for Poland. Since it is public information, I thought the data would be readily available, but I can't seem to find it anywhere. I have checked the usual sources. GADM has data down to the county (powiat) level, and Natural Earth seems to only have data down to the provincial level. I have looked at many of the Polish government's sites, but while I can find plenty of GIS data viewers, I can't find a way to download the administrative boundary data I am interested in. To make matters more complicated, I would really like historic data, but I would settle for current NUTS 5 level data.


texts: Unable to make POST request to add layer to GeoServer

texts:
My issue is related to post request and there is no any issue about get request

export const GEOSERVER_URL:string = 'http://localhost:8080/geoserver/rest/workspaces/risk/datastores/scan.tekudb.local/featuretypes'
export const USERNAME:string = 'admin'
export const PASSWORD:string = 'geoserver'
export const AUTH = {
    username: USERNAME,
    password: PASSWORD
  }

 useEffect(() => {
    const fetchData = async () => {
      const result = await axios.post(
        GEOSERVER_URL,  {
            auth: AUTH,
        },

      ).then((response) => {
        console.log(response.data)
      }, (error) => {
        console.log(error);
      });

      console.log(result)
    };
    fetchData();
  }, []);

Error

Request URL: http://localhost:8080/geoserver/rest/workspaces/risk/datastores/scan.tekudb.local/featuretypes
    Request Method: POST
    Status Code: 401 Unauthorized
    Remote Address: [::1]:8080
    Referrer Policy: no-referrer-when-downgrade

How can I solve that? in get request, everything is okay but for others, it gives 401 Unauthorized error


texts: Tilecache positions my gdal_translated map 20km south of where I want it

texts:
I have created a geotiff file through gdal_translate:

gdal_translate -a_ullr 547812.2384341886 6834734.336439242 547967.5011478929 6834622.35081697 -a_srs EPSG:900913 pdz3.jpg pdz.tif

When I load this tif file in qgis, I see my map on the right location. Also, when I ask the gdalinfo from this file I get the following information:

Driver: GTiff/GeoTIFF
Files: pdz.tif
Size is 1024, 724
Coordinate System is:
PROJCS["Google Maps Global Mercator",
    GEOGCS["WGS 84",
        DATUM["WGS_1984",
            SPHEROID["WGS 84",6378137,298.257223563,
                AUTHORITY["EPSG","7030"]],
            AUTHORITY["EPSG","6326"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4326"]],
    PROJECTION["Mercator_1SP"],
    PARAMETER["central_meridian",0],
    PARAMETER["scale_factor",1],
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (547812.238434188649990,6834734.336439241655171)
Pixel Size = (0.151623743851815,-0.154676273856209)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (  547812.238, 6834734.336) (  4d55'15.89"E, 52d22'37.58"N)
Lower Left  (  547812.238, 6834622.351) (  4d55'15.89"E, 52d22'35.36"N)
Upper Right (  547967.501, 6834734.336) (  4d55'20.91"E, 52d22'37.58"N)
Lower Right (  547967.501, 6834622.351) (  4d55'20.91"E, 52d22'35.36"N)
Center      (  547889.870, 6834678.344) (  4d55'18.40"E, 52d22'36.47"N)
Band 1 Block=1024x2 Type=Byte, ColorInterp=Red
Band 2 Block=1024x2 Type=Byte, ColorInterp=Green
Band 3 Block=1024x2 Type=Byte, ColorInterp=Blue

I tested the 4d55'15.89"E, 52d22'37.58"N values in google map, and they also point to the proper location.

However, when I want this geotiff tiled - through tilecache - the map is placed about 20km south of the point I want it to appear (and appears in qgis). When I georeference the map in qgis self, and send it to tilecache I get the map on the right location. Calling gdalinfo on the qgis referenced tif I get roughly the same information (a couple of meters difference, due to mismatch clicks ;-))

The tilecache configuration file of the map is

[cache]
type=GoogleDisk
base=/home/gworx/data/tilecache

[jvv-chan-5-pdz]
type=GDAL
file=/home/gworx/data/layer-files/1320850804986-pdz.tif
bbox=547812.238434,6834734.33644,547967.501148,6834622.35082
spherical_mercator=true
srs=EPSG:900913
metaTile=true
extension=jpeg
mime_type=image/jpeg
tms_type=google

The bbox values are in line with the values I've set when calling gdal_translate. I am pretty much clueless at this moment on how to get this to work. If anyone can point me in the right direction on what I could be doing wrong, I would greatly appreciate it!


texts: Manually creating the "Pages" in Data Driven Pages?

texts:
I was wondering if it was possible to manually create data driven pages to then put together into a data driven page model?

I have a couple thousand address points sorted into about 20 area categories in my municipality in a points master layer.

In the data driven page setup I used the "area category" field in the attribute table as the "sort, name, pages" field. This has netted me a page per address point. Is there a way to either make a page per category, manually or otherwise?

Forgot to add that I have a basic personal use License.


texts: Adding index to FME MapInfo FeatureWriter

texts: I need to add an index to a FeatureWriter transformer in FME so it can speed searches up.  I cannot find this option in the FeatureWriter settings.  I found doing this in a standard FME writer very easy.  But just need some help setting this field in the FeatureWriter.  If you have a look at the image, you can see what I mean.  When I run the workflow no indexes come through even though some are set in the initial data too.  I must be missing something because it can't be this difficult to set an index field.


texts: Easiest way to find spatial differences between Polyline shapefiles

texts:
I run into this problem a lot. I have two polyline's and I need to test for Spatial differences in them. Usually I use Erase and I have my answer, but on this PC I now only have access to ArcGIS Basic license.

I have found ways to do this by creating a temporary copy of the files and doing some editing, but there has to be a better way!


texts: Can QGIS create a table with a grid reference to a feature

texts:
I am creating a road map and have added a grid to it using the the process in https://kartoza.com/en/blog/create-a-custom-reference-grid-in-qgis-composer/

Is there some tool or a process that's used in QGIS 3 to then assign the id's of the grid squares a feature occurs in, in to a dynamic table?

I can create a workflow as below but I'd rather not if there's already a solution that I haven't been able to find.

Create and Export Grid as polygon file (using MMQGIS -- Create - Grid)
In field calc create a concatenator filter to get all the grids the feature intersects into a field.
Add this table to the layout.

The issue with this is that it won't be dynamic when the view changes and will need to be rebuilt for different scales as the grid will change.

I found https://www.fscbiodiversity.uk/qgisplugin/gr2layerstool that seems to be able to do what's needed but is limited to british grids -is there anything similar that will work based on the current grid?

So what I need is in a map like

I want

Norman St | B2
Massey Dr | A2, B2
Yappar St | A1, A2, B2, B3, C3
Carmo St  | B5


texts: Zonal Statistics does not calculate mean for all Features in the shapefile

texts:
This is a follow up question from: Python Script Zonal Stats as Table Loop Question

I was able to get the script working successfully, but I'm running into a problem where zonal statistics is not calculating mean value for all the features in the shapefile. I've checked to see if data is present within these features by running the tool individually and it is able to successfully calculate the results. I should also mention the features do not overlap.

Script:

import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "F:/lu_crop_rast"
arcpy.env.overwriteoutput = 1

watershedFeat = "F:/watersheds.shp"
outDir = "F:/lu_crop_rast/tables/"

for raster in arcpy.ListRasters():
    raster_name = os.path.basename(raster).rstrip(os.path.splitext(raster)[1])
    outTable = outDir + raster_name + "_TBL.dbf"
    arcpy.sa.ZonalStatisticsAsTable(watershedFeat,"Name",raster,outTable,"NODATA","MEAN")


texts: Is it possible to save PostGIS connection string in OGR add-in to QGIS?

texts: In QGIS I've saved a couple of PostGIS connections for adding data. This works fine. I've been unable to save the connections in the OGR layer converter add-in though. Has anyone found a way to do this so I don't have to type it every time?


texts: Blurring raster using ArcGIS for Desktop?

texts:
I work with this JPG areal photograph and i need to blur this signed blue rectangle only:

I tried to decline the display quality in the display layer properties:

but it not enough for me, because i need the raster to be very pixeled, for example like this pixeled raster:


texts: How to convert ESRI SHP to KML with correct coordinate system?

texts:
I am working on this SHP file, containing geographical district of Hong Kong. I would like to export this to KML and export it to Google Map for overlay.

After I converted it to KML in QGIS (just save as kml format) and opened it in Google Map, it seems the coordinate is out of the entire map world region. Is there any conversion I need to do from ESRI SHP coordinate system to Google Map compatible coordinate system?

Thank you for any pointer!


texts: Field Calculating using Python Parser with Standard SQL Query Layers & Views in ArcGIS Pro

texts:
I have been given the task to extract PASER scores from a comprehensive table of of PASER_byYear. I would like to take the time to create a view and query layers using SQL, but do to time constraints, I simply used the the SQL clause GUI in ArcGIS Pro to output this:
last_edited_date >= timestamp '2020-01-01 00:00:00' And last_edited_date < timestamp '2020-12-29
00:00:00' OR last_edited_date >= timestamp '2016-01-01' AND last_edited_date < timestamp '2016-12-29'

The goal from here is to use Python subtract 2016 PASER scores from 2020 PASER scores for for identical road segments (Road_Segment_ID) and if the out put is -n multiply by -1 and if the output is +n multiply by -1.
Thus a simple analysis of road condition over time can be related an overlayed feature for scheduled paving in 2020.
I posted a question last week as ArcGIS Pro Python Field Calculating, and the admins and commenters helped immensely. Although I have been able to pick up on some things, I have a lot of learning about the languages/syntax necessary to make my job easier / be a better GIS professional.
The tricky thing with the current task is calling out only the year, then writing an expression that subtracts integers from the PASER_Score field based on the Last_Edited_Date field.
Expression:
PASER_2016(PASER_Score, last_edited_date)

Code Block:
def PASER_2016(PASER_Score, last_edited_date, x):
result = x
if !last_edited_date!.rsplit("/")[0] == '2016':
    result = !PASER_SCORE!
    return result

PASER_2016(PASER_Score, last_edited_date)

def PASER_2016(PASER_Score, last_edited_date):
result = PASER_Score
if last_edited_date.year == 2016:
    return result

The expression checks out, but I am prompted an error message of "NameError": name 'PASER_Score' is not defined.

Expression:
PASER_2016(!PASER_Score!, !last_edited_date!)

Code Block:
def PASER_2016(PASER_Score, last_edited_date):
result = PASER_Score
if last_edited_date.year == 2016:
    return result


texts: Distance matrix in QGIS shows distance zero to all points

texts:
I'm using QGIS version 3.4.2-Madeira. I have a point layer with 96 points in Germany and I want to calculate the 3 nearest neighbors of every point. I know this can be done with the Distance matrix function using the same layer as input and target, but I always get a distance of zero between all points which is definitely not correct. I tried the same with the QGIS Tutorial datasets to calculate the distance between two different point layers, that worked well.

Does anybody has an idea where the problem is?


texts: Changing the scale of an extent for a layout using PyQGIS

texts:
I have a script that creates a print layout and contains all of my vector/raster layers. I have changed my extent to 'mem_layer', which is my buffer layer I am using for this project. However, when I view the print layout, the extent is so far zoomed in on the buffer layer, that it is impossible to view the location around it. If I go into the layout manually and change the scale to 8500000, then my map works perfectly. Using PyQGIS, is there any way I can incorporate to add/change the scale of the extent to 8500000, so that I can view my map more clearer. My script is as follows:
project = QgsProject.instance()             #gets a reference to the project instance
manager = project.layoutManager()           #gets a reference to the layout manager
layout = QgsPrintLayout(project)            #makes a new print layout object, takes a QgsProject as argument
layoutName = "PrintLayout"

layouts_list = manager.printLayouts()
for layout in layouts_list:
    if layout.name() == layoutName:
        manager.removeLayout(layout)

layout = QgsPrintLayout(project)
layout.initializeDefaults()                 #create default map canvas
layout.setName(layoutName)
manager.addLayout(layout)

#This adds a map item to the Print Layout
map = QgsLayoutItemMap(layout)
map.setRect(20, 20, 20, 20)
#Set Extent
#rectangle = QgsRectangle(1355502, -46398, 1734534, 137094)         #an example of how to set map extent with coordinates
#map.setExtent(rectangle)
canvas = iface.mapCanvas()
map.setExtent(mem_layer.extent())
layout.addLayoutItem(map)
#Move & Resize
map.attemptMove(QgsLayoutPoint(5, 27, QgsUnitTypes.LayoutMillimeters))
map.attemptResize(QgsLayoutSize(239, 178, QgsUnitTypes.LayoutMillimeters))

What the map on the layout currently shows:

What I would like the map to show when I change the scale is 8500000 using PyQGIS:


texts: Spatial queries to find co-occurrences of POIs

texts:
Given a POI database containing different types of points, e.g. hospital and pharmacy, how can I select the locations where a hospital and a pharmacy are closer than a certain threshold (e.g. 1000m)?
The query in natural language would be expressed as:

select points where at least a hospital occurs within 1000m from at least a pharmacy

I know that I can select all hospitals and pharmacies, and compute the distance matrix between them, but I was wondering if there is a specific spatial query/operator for this kind of queries.
Ideally, I would like to express such queries in ArcGIS.


texts: Building Docker image including IPython Notebook and EE?

texts:
I'm starting to play with EE, already tried a bit of Javascript API. Now trying the Python one. So I found https://github.com/tylere/docker-tmpnb-ee and git cloned it, then from the terminal I did

docker build -t ee .

and got stuck at

Step 22 : RUN conda install --yes ipython-notebook terminado && conda clean -yt
 ---> Running in 12e9f87e8799
Fetching package metadata: ....
Solving package specifications: ..............

What may I do to keep going?

Not sure if that Docker image is still relevant since last commit is from 2015.


texts: How to Open Google Earth in a Remote Desktop Session?

texts:
I have a Windows 7 PC with Google Earth installed.

Sometimes I need to connect with Microsoft Remote Desktop from my MacBook Pro to the Windows 7 PC.

If I've Google Earth (Pro or not) already opened on the Windows 7 PC, I can perfectly use the software without any issues.

If I start Google Earth (Pro or not) from remote, I get a message about graphic card not supported and after another that suggest me to try using directX. I can reply to use directX or not, but Googe Earth starts without showing me the satellite map in a sort of "compatibility mode", also very slow.

Is there a way to tell Google Earth to use the Windows 7 graphic card driver and not the virtual one, when starting it from a remote Desktop Session?


texts:
I have the following code for my startup.py script when starting QGIS3, that I want to check if a userprofile exists, and if not then to create and load it:
from qgis.core import *
from PyQt5 import *
import os
import getpass
import qgis
#Udarbejdelse af sti til profilmappe
defaultsti = QgsApplication.qgisSettingsDirPath()
os.chdir(defaultsti)
os.chdir(os.path.dirname(os.getcwd()))
r = os.getcwd()
a = QgsUserProfileManager(r).allProfiles()
g = getpass.getuser()

if QgsUserProfileManager(r).profileExists(g):
    import qgis
    qgis.core.QgsUserProfileManager(r).loadUserProfile(g)

else:
    import qgis
    import getpass
    g = getpass.getuser()
    qgis.core.QgsUserProfileManager(r).createUserProfile(g)
    QgsUserProfileManager(r).loadUserProfile(g)

The script executes when running QGIS as expected, but then the QGIS Application starts to create and reload the new user profile over and over again without break instead of only once (as desired), and crashes when its gone too much.
Is there a way to solve this issue?


texts: I'm researching the contribution of Bing Maps' aerial imagery for contribution to OpenStreetMap for tracing imagery. I understand that Bing allowed OpenStreetMap only the right to trace the imagery. But if a certain Bing image (e.g. downtown Los Angeles on January 31, 2017) was obtained from DigitalGlobe WorldView 3, does this imply that DigitalGlobe also allowed the tracing to OpenStreetMap as well? Does anyone know how this works?


texts: Accessing graph in ArcMap document using ArcPy?

texts: I am trying to access an existing graph in an ArcMap document with arcpy.  I know how to create a new graph with arcpy, but I cannot seem to figure out how to access an existing graph in an ArcMap document with a standalone ar


texts: How can I render a single raster from a pre-tiled map?

texts:
I have a pre-tiled Slippy map data source.

How can I render a non-tiled raster image for a given bounding box, without having to add each PNG file and its extents manually in something like Mapnik or GDAL?


texts:
I found an RuntimeError: ERROR 999998: Unexpected Error when lunching Arcpy in my ArcGis 10.1 such as this:

Runtime error
Traceback (most recent call last):
  File "", line 50, in
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 3840, in Minus
    in_raster_or_constant2)
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Utils.py", line 47, in swapper
    result = wrapper(*args, **kwargs)
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\sa\Functions.py", line 3837, in wrapper
    return _wrapLocalFunctionRaster(u"Minus_sa", ["Minus", in_raster_or_constant1, in_raster_or_constant2])
RuntimeError: ERROR 999998: Unexpected Error.

I've extensively gone through forums and found similar problems, but nothing proposed has resolved this problem. I haven't tried to reinstall ArcGIS, though.

My code is:

Also, when I execute the code, it gives OK until the Print "Ok1", which means that  transmissionCapacity = Minus(tc1, losses) is not executed. Error 999998 worries me a lot.


texts: Using raster calculator in QGIS gives solid black block when adding rasters together?

texts:
I'm attempting to add a few raster layers together, but the result is a solid black rectangle. To simplify things I tried adding a '1' to one raster only.  Eg. for a raster layer callled prec9_23 I have the following formula:

"prec9_23@1" + 1

Even that gives a solid block, all with the same value.  What might I be doing wrong?


texts: Selecting more than one document in Dynamic Hyperlink?

texts:
I am redoing the Dynamic Hyperlinks in a Geodatabase as suggested in Reconnecting hyperlink in Dynamic Hyperlink mxd in ArcMap?

Can you select more than one document when you select the Add New button?

It seems you can add one document at a time. I would like to select more than documents when the Add Hyperlink menu link to a Document.

I would think there would be way of adding more than document instead of closing and reopening the Add New button.


texts: Connecting to an AWS EC2 micro database in Docker using QGIS

texts:
I have seen few post here in the forum but nothing very specific. I have an AWS EC2 micro instance with Ubuntu. I have a docker-compose.yml with kartoza/Postgis and dpage/Pgadmin4. Everything works as it should. In other words, I can see pgadmin from my EC2 public ip, I can connect to PostGIS and upload geospatial data into it.
However, the only thing I am still unable to do is connecting the database to QGIS. It simply time-out and I am guessing I am doing something wrong. FYI, I have opened SSH port 22, PostgreSQL port 5432 and HTTPS port 80.
Anyone can help?
Thanks


texts: Refresh map after removing marker from array

texts:
I have a map an arrays of markers.  This code:

function RemoveRedMarker(siteID) {

            for (var x in arrRedMarkers) {

            if (arrRedMarkers[x].SiteID == siteID) {
                    markers.removeMarker(arrRedMarkers[x]);
                    arrRedMarkers.splice(x, 1);
                    return;
                }
            }
        }

will remove the required marker from the array, I can check this in Firebug, however the map doesn't refresh to reflect the removed marker.  How do I update the map?

Thanks


texts:
I'm georeferencing a Landsat 8 oli no QGIS trip. I include the control points and the system calculates the residuals for each point. At the end it indicates the polynominal mean error of the transformation.

How does the system do this calculation?


texts:
Main question: how can I improve the accuracy of my reprojection?

I am combining my dataset to a previous one, and I have chosen a different CRS: the previous one is in WGS 84 (EPSG:4326) and mine is in WGS 84 / UTM zone 36S (EPSG:32736). This allows me to get more accuracy in measurements, and is also easier as I'm using meters (from what I've understood and experienced using functions in QGIS).
Both rawdata were obtained in WGS 84 EPSG:4326, but I reproject mine before doing any work on it. I would prefer keeping on using a mercator as the map unit is in meters and zone 36S is the relevant one for my study area.

My project aims at counting points inside the squares, calculate area of intersecting polygons, calculate dispersion.

previous dataset in EPSG:4326: calculation has been done.
my dataset in EPSG:32736 / UTM zone 36S: the study area is the same + an additional area. Not analysed yet.

To be able to combine the datasets I performed a reprojection with the older datasets using the option "reproject layer" from the toolbox (QGIS 2.18), but the result is slightly off. This can be seen looking at these 2 grids:

these grids are made of 1x1 km cells. pink grid reprojected from WGS 84 / EPSG:4326 to UTM zone 36S EPSG:32736, white grid created under WGS 84 / UTM zone 36S EPSG:32736.

I have read a couple of questions dealing with similar topics, but it gets a bit too difficult for me who is fairly new to GIS and have never coded before. What I have come up with as solutions so far:

using a different reprojection of the zone 36S, though I'd rather avoid to, and I'm not sure that would make a difference in the accuracy
it might simply be that the result cannot be improved as it is a fine scale. In that case I'm wondering whether it is a problem or not that the reprojection is slightly off.
I could also just use the EPSG:4326 since my data were primarily in this format, and deal with the conversion from degree to meters but it is not easy and less accurate from what I have notcied so far.
I could enable the OTF but from what I have understood, measurements would be wrong since the CRS don't have the same map units.

I hope my explanation is clear enough, I might get this whole problem wrong since i have never worked with projections, so I will be very thankful to any contribution or clarification!


texts: SQLServer Shapefile Export won't load in MongoDB due to self intersection

texts:
I am having an issue loading a handful of GeoJSON files that were created from a shapefile export from SQLServer into MongoDB. This polygon will not load in MongoDB because of two duplicate vertices in the perimeter of the polygon. I noticed in our original data (before it was ever imported into SQLServer) the data had two rings; part 0 and part 1. Once the data is in SQLServer, it only has part 0, which is why I think MongoDB can't use this polygon. We are using ogr2ogr to convert the shapefiles to GeoJSON. Anyone happen to have a solution to this issue?
MongoDB Documentation:
Polygons with Multiple Rings
For Polygons with multiple rings:
The first described ring must be the exterior ring.
The exterior ring cannot self-intersect.
Any interior ring must be entirely contained by the outer ring.
Interior rings cannot intersect or overlap each other. Interior rings cannot share an edge

The first image shows the two stacked vertices exported from SQLServer.
The next two images show the vertex in part 0 and the second vertex in part 1 of the original shapefile (before it went into SQLServer)


texts: Conditional Statement for attribute data

texts:
I'm trying to write a conditional statement that references another field within the same shapefile layer. I want it to only do so if the one field is " Null " and leave is alone if there is already a number there. I would think there is a simple way to do this, but I'm having trouble.

Did anyone have a similar problem they figured out?


texts: Creating polygon from page size using ArcMap

texts:
Is there an easy way to create a polygon that matches the data frame in my page layout?

I'm trying to set up data driven pages and want to have it key off of polygons that frame the boundaries for each page. I would like to see them as polygons so that I can re-position as necessary and quickly visualize what will appear on each page.


texts: Storage hardware options for large datasets

texts:
We are about to organize our data in a centralized spatial data system. The system would provide various services (mainly supporting ftp access, geodatabase editing, and several web mapping applications).

The data we already have is sized around 15TB, is expected to constantly increase, and consisted of spatial databases, aerial imagery, lidar data, and some non-spatial data.
Furthermore, I understand that only a small portion of data would be actively accessed, and the storage is a sort of central repository (traffics and transfer rates are not that big deal in that manner).

I don't have any experience in managing such a big storage tier. I am under the impression that I have to purchase some NAS. However, I am not quite sure how should I plan the architecture of the storage tier (distributed or a single device), and what hardware specifications should I look for if the aim is 20TB capacity right now?

Suggestions are appreciated.


texts:
I am working with the OpenLayers plugin. I need to project the satellite data with respect to vector data shapefile I have.  For that Andre Joost suggested to create vector grid with vector data reference system. The new problem is when I change the coordinate system to degree minutes seconds the coordinate system does not changes and it shows only the coordinates in meters itself.

What is the mistake I have made?


texts: I have a spatialite database that uses a CSV file to map the geometries, however there is a csv file that keeps changing as the user add more data, how can I make it so that the user simply drag and drop the document and the server update itself in the database?


texts: Why is select by drawing a rectangle not working in ArcMap?

texts:
I am using ArcMap.
I click on the select features tool on the toolbar and when I make a rectangle around the points I want to select it doesn't select them.
Does anyone know what I may be doing wrong or how I may select points by making a shape around them?


texts:
I have points that are not equal but the distance between them is so small that it can't be seen even at scale 200k:1. I calculated the distance between these points and add it as attribute. Now I want to find out where the points are so I select them in attribute table but can't see selection as the point is overlapped by another point.

Is there a way to fix this?

I know that i can set filter query on layer using the feature id. But I have way too many points to change the filter all the time. I am looking for different solution. Setting transparent style also does not help.


texts: QGIS version 2.18: Is there a processing tool in version 2.18 that is similar to "Sample raster values" in newer QGIS versions?

texts: I am using a server (Compute Canada) and they have version 2.18 of QGIS loaded. I need to extract values of a raster to points (long/lat) - equivalent to "Sample raster values"- and be able to implement in Python. I have used the point sampling plugin but do not know how to use it in Python. What is the best way to extract values of a raster to points in version 2.18 and to be able to implement it in Python?


texts:
I'm trying to get the polygon of the water in a area.
The first step it was ok: mask the water using the fmask method.
But I don't know how to export this mask to a polygon, I'll probably have to use the function reduceToVectors, but I couldn't use it the right way. Can someone help me?

var polygon = ee.Geometry.Polygon([[
  [-119.33364769821117, 46.05123532178373],
  [-119.3233620672313, 45.869732769408905],
  [-119.04111088542663, 45.873079023065166],
  [-119.0396574679861, 46.045448840018565]]]);

var landsat8 = ee.ImageCollection("LANDSAT/LC8_L1T_TOA_FMASK");

var FMASK_WATER = 1;

var mosaic = landsat8
.filterBounds(polygon)
.filterDate('2016-08-01', '2016-08-30')
.mosaic();

var fmask = mosaic.select('fmask');
var waterMask = fmask.eq(FMASK_WATER);
var maskedMosaic = mosaic.updateMask(waterMask);

Map.addLayer(maskedMosaic, {}, 'mask');


texts: Basin numbering according to Pfafstetter Method?

texts:
I would like to divide my basin into subbasins and numbers according to the Pfafstetter method.

Is there an easy way to implement this in Python using ArcPy?

Or are there some freely available Python packages or tools that could be used for preparing an ArcGIS toolbox to do this?


texts:
Is there a way to add TauDEM to the latest QGIS 3.0?

I can't see it in the providers tab as it was in my previous 2.18.14 version so I am unable to activate it. I use it pretty regularly so I would really like to get it added to this latest release as soon as possible to test out its new features.


texts: Add default month/day to known year in new date field?

texts:
I have a text field featuring a 4 digit year. How would I assign a default month and day to the year in a new date field?

ex. 2010 needs to be converted to 1/1/2010

I attempted this in the field calculator:

def dt(year):
    dt_str = year
    dt_obj = datetime.datetime.strptime(dt_str, '%Y')
    return dt_obj

install date =

dt(!year!)


texts: Understanding Extract Multi Values to Points performance in ArcPy?

texts:
I am trying to extract points from multiple raster files into a points shapefile. I have about 320,000 unique XY coordinates which need to extracted values from 37 raster files. I tried running the following code and it has been three days since it has started.

import arcpy
import os
from arcpy.sa import *

if arcpy.CheckExtension("spatial") == "Unavailable":
    sys.exit("No ArcGIS Spatial Analyst licence available - exiting")
else:
     arcpy.CheckOutExtension("spatial")
#     arcpy.CheckInExtension("spatial")

arcpy.env.workspace = r"H:\GIS Project\in_rasters"
arcpy.env.overwriteOutput = True
arcpy.env.parallelProcessingFactor = "50"
point_feature_class = r"H:\GIS Project\XY_Points.shp"
rasters = arcpy.ListRasters("*","TIF")

for raster in rasters:
    ExtractMultiValuesToPoints(point_feature_class, raster, 'NONE')

My computer has enough ram (16 gigs) and I am running it in parallel. I would think this function would take a couple of hours maximum based off this post Getting raster values for large number of point features?. Albeit, this post is not exactly the same, it still shows some anecdotal evidence for processing time with large data.

My raster files are all projected the same (WGS 84) however they do not have the same resolution.

Is it normal for this function to take a long time to finish?


texts: I have some very high resolution imagery that I want to display through Geoserver but it keeps shutting off the image if I zoom in too far.  I have tried all the settings in the Tile Caching tab with regard to zoom levels on a gridset but I have not been able to solve the problem.  I don't want any restrictions on zoom/display but can't seem to get there!


texts: How to make Mapnik render Erdas images in RGB instead of grayscale?

texts:
I have some orthophoto files (Erdas Imagine format) enclosed in a vrt file. When I view it in any desktop GIS it has proper RGB colors, but when I use the vrt in Mapnik to render some tiles, I get grayscale images as a result. Why?

Update: If I convert the Erdas Imagine files into png-s (I need transparency where there is no data) Mapnik render works ok, so I guess it's something to do with how Mapnik interprets Erdas files and its bands.


texts: Is it possible to setup fiddler to capture requests from QGIS

texts:
I want to know if it is possible setup fiddler to capture WMS/WFS requests from QGIS and how to do it.

Fiddler is capturing the requests from MapInfo and I don't remember making any setup in fiddler to accomplish that.

So can I make fiddler capture requests from QGIS and how do I do it?

Version info: Fiddler 2.3.9.5, QGIS 1.7.0


texts: GDAL and ArcObjects in The Same Project - A Recipe For Disaster?

texts:
I am working on a project where I am attempting to use GDAL and ArcObjects together in the same project.  Although the project itself is nothing more than a toolbar in ArcMap, I would like to use some GDAL based raster libraries developed for other non-ArcMap projects that offer a SIGNIFICANT performance boost over the equivalent ArcObject based methods.

I've been getting all types of crazy errors when mixing the two.  However, when I execute the same chunks of code in localized (either GDAL alone or ArcObjects alone) projects, everything works as expected.

Can ArcObjects and GDAL co-exist in the same project?  Any tips to avoid complications?

FYI - I am using the C# GDAL bindings distributed with FWTools 2.4.7.


texts: Get the fill stipple of a predefined PictureFillSymbol in ArcMap

texts:
In ArcMap in symbol-dialog you can choose a predefined symbol for your polygon-features, i.e. agricultural area. This is a 1 bit picture with foreground- and background color. I grab this symbol as IPictureFillSymbol. It has a member picture, which is a stdole.IPictureDisp. Has anyone an idea how to access the fill pattern perhaps as hexcode or sth. else? In ArcView it was called stipple.

I'm in the dark.


texts: Why won't GeoServer render my SVG symbols?

texts:
I'm trying to use GeoServer to render a point layer with custom symbols.  This worked perfectly well when my symbols were PNGs, but we haven't decided exactly what size our symbols should be, so I tried to switch to SVGs instead, to take advantage of their cleaner resizing.

Now GeoServer won't render anything at all.  The relevant bits from the log seem to be:

2013-03-18 23:00:51,655 INFO [geoserver.wms] -
Request: getServiceInfo
2013-03-18 23:00:51,814 WARN [geotools.rendering] - Assuming rendering buffer = 0, but estimation is not accurate, you may want to set a buffer manually
2013-03-18 23:00:51,822 ERROR [lite.StyledShapePainter] - ShapePainter has been asked to paint a null style!!
2013-03-18 23:00:51,826 ERROR [lite.StyledShapePainter] - ShapePainter has been asked to paint a null style!!
2013-03-18 23:00:51,830 ERROR [lite.StyledShapePainter] - ShapePainter has been asked to paint a null style!!
2013-03-18 23:00:51,835 ERROR [lite.StyledShapePainter] - ShapePainter has been asked to paint a null style!!

And so on (I believe once for each feature, but I haven't counted).  My SLD is as follows, but it's a near-perfect match for some of the official examples, so I doubt the problem lies there:

<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
  <NamedLayer>
    <Name>Hydrant</Name>
    <UserStyle>
      <Title>Hydrant</Title>
      <FeatureTypeStyle>
        <Rule>
          <Title>Red Square</Title>
          <PointSymbolizer>
            <Graphic>
              <ExternalGraphic>
                <OnlineResource xlink:type="simple" xlink:href="http://www.shastacsd.org/mapport/img/map-symbols/hydrant.svg" />
                <Format>image/svg+xml</Format>
              </ExternalGraphic>
              <Size>12</Size>
            </Graphic>
          </PointSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

Can anyone think what I'm doing wrong?  Thanks in advance if you can!


texts:
At some point ArcMap creates a BigTIFF rather than a normal TIFF.  BigTiFFs don't work in many programs - in my case AutoCAD.

What is the filesize where ArcMap creates a BigTIFF rather than normal TIFF.  Is there anyway to turn this off?