texts: Posting changes from public to protected version in ArcGIS?

texts:
Me [USER1] and my colleague [USER2] , have created the following ArcGIS 10.3.1 versioning workflow :

Then each one of us started editing on his  respective public version . He then reconciled with  [GISOWNER.QAQC]  , disconnected from  [USER2.VERSION2] and reconnected to it as [GISOWNER] in order to post the changes to [GISOWNER.QAQC] but it failed due to insufficient privileges . He then later reconnected to his version as [USER2] but it also failed for same reason .

My questions are :

1) is this scenario even applicable ?

2) if so , how can we post changes?

2) if no  , what are the changes need to be made?


texts: Ignore empty tiles in gdal2tiles.py when generating tiles

texts:
I am in the process of generating a large set of tiles from a .vrt file composed of many images. The image is following a road section, being very long and small strip of images and  due the shape of the road the bounding box around it contains a ratio of 80% no data and 20% beign the actually road. This means gdal2tiles takes forever since its looping over all tiles in the boundingbox and not just the area that has data.

Is there any way to tell gdal2tiles to skip those tiles?

Alternative I have split the vtr file into lesser areas but then in the intersection of the two tiles sets that I need to combine after the two sets has tiles defined for the same area with half filled map and nodata and taking either of them causes the map to have big black stripes down in between.

Any suggestions to make this go more smooth?


texts: Adding missing locations on OpenStreetMap programmatically for Android application?

texts:
i am working on android application using osm. Many locations are not on osm that google map providing. But i need to show all missing locations on osm also.
what can i do to solve this problem?
Can i do in this way: Get all missing location's detail from google map and then put all those locations on osm?


texts: Only show title in legend entry for raster/tile layer in QGIS

texts:
When I have a legend entry for a xyz tile raster layer, such as Google satellite, in a print composer layout in QGIS, the legend includes a lot of white space underneath the title.  This would normally be where the scale is for a raster layer that's displayed as pseudo-color. Is there a way to turn this off so it doesn't affect the layout of the rest of the legend?
My current work around is to remove the legend entry and replace it with a text box, but I would prefer a solution that doesn't require the alignment and font style matching that comes with this approach.

Example layout.  In the following examples the legend includes entries for 2 vector layers and 2 raster layers.  Google Satellite is an xyz tile layer with no special styling applied.  The other raster is displayed as pseudo-color with associated styling.  Notice white space under the Google Satellite entry.

Changing the order of the legend items also leads to problems.  For example, moving the 2 vector layers up above the xyz tile entry makes the column break strange.

This can also create problems and awkward work-arounds if your legend is laid out in a single column:

Within the "Item Properties" dialog, I can maniuplate the subgroups for other raster layers or for vector layers that have graduated or classified styling, but there is nothing to manipulate for the xyz tiles layers.  In my example legend, I could remove the entries for say 0.5 and 3.5 meters by selecting the entry and clicking remove item.  There is, however nothing in the dropdown below the xyz tiles entry:


texts: How to use ogr2ogr for batch conversion?

texts: I have a thousand of arc coverage would like to covert to shapefile. How can I use the ogr2ogr to convert it in batch rather than convert it one by one? It takes a lot of time! :( Thanks for any idea!


texts: Maximum Likelihood Classification not working correctly in ArcMap

texts:
I am trying to classify the 3 bands RGB image in ArcMap 10.8. I have prepared some training samples, and performed the MLC. The result is returning 3 classes instead of all 6 classes that the training samples have.
As I completed classification on another 4 bands RGB image, and I had similar number of training samples, image was the same size, I have used the same algorithm, and everything worked well, now I have no idea why is that no longer working on the 3 bands image.
Of course I have generated new signature file for new image, and set the right input.
What could be the cause of my problem?


texts: Importing file where long and lat in one column

texts:
How to import a data file in which both longitude and latitude are combined in one column?
e.g. 52.2299571,21.0099775


texts: How do you move a raster's origin 1m east in R?

texts:
I'm new to R (and coding in general).
I'm wondering if it is possible to create a copy of a raster layer that is identical, but moved over 1m to the East.


texts: ArcSDE Java API: Find centroid of SeShape object?

texts:
I've inherited an ArcSDE 9.3 Java app that needs some fixing. The basic task is to find the centroid of a polygon retrieved from an SDE geodatabase, but lately it's been returning the 0th vertex instead. This is how the code looks:

SeShape shape = sde.findShape(aPIN);  // Get the geometry
SDEPoint sdePoint = null;

try {
    if (null != shape) sdePoint = shape.generateLabelPoint();  // Find "centroid"
}

I'm not sure why generateLabelPoint was used -- it seems like a hack which worked for a while but has since stopped. According to this post generateLabelPoint() is the correct way to find the centroid of an SeShape, but our client app is still getting a vertex. We use the same shape shape elsewhere in the code and it works fine, so I don't think it's the geometry that's bad.  If I could convert it to an SePolygon there's the centroid() method, but those appear to be two different libraries without any way of translating between the two. Does anyone have any insights on this?

The test shape I'm using is Los Angeles City Hall. In State Plane CA V Feet, the centroid (found via the Polygon.centroid method in ArcPy) is 6488062.24483722, 1841966.80439753. generateLabelPoint is returning 6488207.42375, 1842383.41312499, which is a vertex in the corner of the lot. The source of this data is an Oracle 11g database. I have a feeling that the architecture of the database is different than what the 9.3 API is expecting, but still looking into this...


texts: Why does ArcGIS cause problems with numeric columns?

texts:
When I load my database into ArcMap or ArcCatalog, columns with datatype numeric(1,0), numeric(2,0) ... until numeric(9,0) get 0 values in each row, but if I convert the datatype to numeric(10,0) , or higher, with
ALTER TABLE my_table ALTER COLUMN my_col TYPE numeric(10,0) USING my_col::numeric(10,0)
the correct values are displayed. The numbers are just single-digit numbers in the numbers(1,0) datatype columns and up to two-digit numbers in the numbers(2,0) datatype columns. So why does ArcGIS convert all these numbers to 0 when the datatype is number(1-9,0)?


texts: OpenLayers & Google Maps: TERRAIN not showing as baseMap

texts:
I have a problem with OpenLayers and Google maps: on this page:

http://46.37.22.75:8085/public/

I'm loading Google maps TERRAIN with Openlayers.js, everything worked well for about 1 year, but now the terrain map is not loading as basemap.
I mean, if I try to change layer (using the "tematismi" button on the right and then selecting for example "SAT" and then again "Rilievi"(=Terrain), the Terrain map loads correctly.

I've googled a lot, I thought it was a Google maps update problem, but I still couldn't find anything.


texts:
Does WFS protocol offer a way to know when layer/featureType data was last modified?

If not, is there another protocol that allows retrieving such information?


texts: Converting coordinates from a local coordinate reference system

texts:
I am trying to define a local CRS in R based on the information in the screenshot image below

My R code is as follows:

I define the local CRS from the screenshot image
I apply it to my dummy dataset (1 point)
I apply a conversion back to NAD83

However my output doesn't match. Am I missing information when I do step 1 - or simply doing this wrong?

R Code:

library(sf)
library(rgdal)
library(sp)

df <- data.frame(x_local = 8064.8237, y_local = 1127.1598)
projcrs <- "+proj=tmerc +a=20925604.47417 +ellps=GRS80 +datum=NAD83 +units=us-ft +x_0=32282.466 +y_0=-9739.876 +k_0=1.000115 +lat_0=35.00 +lon_0=-117.65"

sf.df <- st_as_sf(x = df,
               coords = c("x_local", "y_local"),
               crs = projcrs)

> new.sf <- st_transform(sf.df, CRS("+proj=longlat +datum=NAD83")@projargs)
> new.sf
Simple feature collection with 1 feature and 0 fields
geometry type:  POINT
dimension:      XY
bbox:           xmin: -117.977 ymin: 35.09044 xmax: -117.977 ymax: 35.09044
epsg (SRID):    4269
proj4string:    +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs
                   geometry
1 POINT (-117.977 35.09044)

Whereas the coordinates that I'm expecting are N35°01'47.37315" W117°43'51.16782" (or in decimal degrees 35.0294763 -117.7307693), which is about 25km away!


texts: How to apply Sen2cor in sen2r graphical user interface?

texts:
I have recently installed the sen2r plugin in r for extracting level 1 Sentinel-2 images from ESA's Long Term Archive and using sen2cor correction to obtain level 2 scenes.
An issue I face is that the GUI seems to not let you apply sen2cor. It says that level 2 images are required. I have tried to use the standalone sen2cor processor which comes as a part of sen2r() package in R, but not all scenes get corrected.
Does anyone have experienced something similar or can provide guidance with this?


texts: Toolbar Editor changed! Miss Editor Area in the Toolbar - ArcGIS

texts:
I have installed ArcGIS Desktop Advanced 10.5.1 but the editor toolbar changed after having a new pc and with the re-instalation of the software ArcGIS. It miss the editor in the tool.
How can I restore the tool or repair the tool?
This image shows how it looks now:

The image represents how my editor toolbar is, without the Editor part. I can't start editing from there but the worst is that I can't stop editing. There isn't another possibility.
This image shows how it should look:


texts:
I have downloaded daily precipitation data from Global Weather data website and want to create an annual precipitation map like this:

(source: worldatlas.com)

The downloaded data is in TXT and CSV format. The area I am covering has 96 weather stations, so I have 96 files. I am totally confused how to assemble and use this data for the said map.

I am using Arcgis 10.


texts:
I am trying to export a map with several shapefiles from QGIS to an OpenLayers web map. For that I tried the "Export to OpenLayers" and the "qgis2web" (Version 0.23.0) Plugin. I tried it before (one month ago) and back then both Plugins were working. Now I get a Python error which looks like that:

qgis2web produced an error:

Traceback (most recent call last):
File "C:/Users/Hannah/.qgis2/python/plugins\qgis2web\maindialog.py", line 99, in previewMap
MainDialog.previewOL3(self)
File "C:/Users/Hannah/.qgis2/python/plugins\qgis2web\maindialog.py", line 232, in previewOL3
previewFile = writeOL(self.iface, layers, groups, popup, visible, json, cluster, labels, params, utils.tempFolder())
File "C:/Users/Hannah/.qgis2/python/plugins\qgis2web\olwriter.py", line 53, in writeOL
exportLayers(layers, folder, precision, optimize, usedFields)
File "C:/Users/Hannah/.qgis2/python/plugins\qgis2web\utils.py", line 68, in exportLayers
uri = TYPE_MAP[layer.wkbType()]
KeyError: -2147483647

I tried the Export on a Linux machine and on a Windows machine with two different versions of QGIS (2.0.1 and 2.10.1). With both I get the same error. The Python Version is 2.7.6

Apparently the error depends on the shapefiles. In case I only show the districts (polygon) then I don't get an error. As soon as I upload some point shapefile the error occurs. Anyone knows what the matter with the shapefiles? Why is it a problem with some to export them and with others it isn't?

One of the shapefiles that isn't working can be seen here (hospitals).


texts: How to return geo-tagged social media posts?

texts:
I have seen quite a few ESRI web apps that utilize Geo-Tagged social media posts as a point data layer. I'm wondering how one goes about querying things like Twitter, Flickr and YouTube to return posts related to a specific location. I'm also hoping to be able to filter these results based on hash-tags. Twitter is my main interest, but I know when I get that working I'll have people clamoring for the others.

My hope is to add this to our public web viewer where citizens view pictures, videos and tweets about our public lands.

Also, are these Geo-Tagged posts limited by your own personal followers / friends?

Here is an ESRI example of what I am looking for: ESRI Australia Wildfires Map


texts: Make QgsVectorLayer().getFeatures() ignore an existing filter

texts:
When retrieving features from a layer with PyQGIS by sth. like

feat = [f for f in my_lyr.getFeatures('"road_name" = \'myroad\'')]

the resulting feat list is empty in cases where a filter is applied that does not cover 'my_road'.

Is there a way or a recommended workaroud to make getFeatures() ignore an existing filter? Perhaps creating a memory layer with all features from the original layer and do the request on this memory layer?


texts: Correcting Errors in Height Above Nearest Drainage (HAND) model

texts:
I have used this tread
Spatial Analysis - Calculate a cells elevation (height) above the nearest stream cell
to create a HAND map in ArcGIS. First I used the hydrology toolset to fill in sink in the SRTM DEM, the generated the flow direction, flow accumulation,and the drainage networks. I then computed the Zonal Statistics using the drainge network and the filled DEM as the data input. Then I used the Euclidean Allocation tool to calculates, for each cell, the zone of the closest source location in Euclidean distance. I subtracted the resulted map from the filled DEM and I obtained the the HAND (Height Above Nearest Drainage)map of the area.

the map is shown below. However, negative values appears in the legend which should no be the case. Can anyone suggest how I can rectify this?


texts: How to copy the fields of a layer without going to the attribute table

texts:
I would like to automatically copy (without going to copy in the attribute table) all the fields and their data, from layer 1 to paste them into layer 2. Do I have to go through a python program copying the data from the layer 1 to layer 2 or do you know a keyboard shortcut allowing it.
Do you have an idea?

Thank you


texts: PostGIS layer QGIS 2.18.12 autorefresh at 10 seconds

texts:
I am using a database view as a source to draw a line over a map in QGIS 2.18.12.
This view contains just one registration and it changes from time to time.
I would like to draw the line automatically when the view changes.
Is it possible to do this from a Python script?
For the moment my solution is to reload the whole project, but it is not as fine as I expected because I want to refresh just the line not all layers.

The code I use now is:

from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
from qgis.gui import *
from qgis.utils import iface
from PyQt4.QtCore import QTimer

timer = QTimer()

timer.setInterval(10000)
QObject.connect(timer,
SIGNAL("timeout()"),qgis.utils.iface.mapCanvas().refreshAllLayers)
timer.start()


texts: Generate spatial weight matrix from file in ArcGIS

texts:
I am trying to create a spatial weight matrix from an existing file in ArcGIS. I need to use another file, as opposed to generate the weights in Arc, because I define non-standard weights. The documentation on how to do so is a little scarce, so I am turning for advice as my attempts have failed so far. All the files can be found in the zipfile downloadable through this link in Fileshare.

My locations are a set of points in the shapefile "pointlocations.shp". My ascii weights table is "weight_table.csv". The inuque id field is "codice71".  I used the tool from the toolbox "generate spatial weight matrix" in the following way (I copy-pasted the python snippet here):

arcpy.GenerateSpatialWeightsMatrix_stats(Input_Feature_Class="PATH/pointlocations.shp", Unique_ID_Field="codice71", Output_Spatial_Weights_Matrix_File="PATH/spatweight4.swm", Conceptualization_of_Spatial_Relationships="CONVERT_TABLE", Distance_Method="EUCLIDEAN", Exponent="1", Threshold_Distance="", Number_of_Neighbors="", Row_Standardization="ROW_STANDARDIZATION", Input_Table="PATH/weight_table.csv", Date_Time_Field="", Date_Time_Interval_Type="", Date_Time_Interval_Value="")

When I do this, I run into the following error:

Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>   File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\stats.py", line 1423, in GenerateSpatialWeightsMatrix     raise e ExecuteError:  Traceback (most recent call last):   File "c:\program files (x86)\arcgis\desktop10.4\ArcToolbox\Scripts\Weights.py", line 848, in <module>     setupWeights()   File "c:\program files (x86)\arcgis\desktop10.4\ArcToolbox\Scripts\Weights.py", line 164, in setupWeights     rowStandard = rowStandard)   File "c:\program files (x86)\arcgis\desktop10.4\ArcToolbox\Scripts\Weights.py", line 795, in table2SWM     allMaster.remove(lastID) ValueError: list.remove(x): x not in list  Failed to execute (GenerateSpatialWeightsMatrix).

I have no clue of what is going on, and I have found little help to find a better approach using the online help in: Generate Spatial Weight and Modelling Spatial Relationships

I was trying to check whether the formatting of my table was wrong, so I tried to have one that looked closer to the one described on the page Modelling Spatial Relationships. In that attempt, instead of having the csv file "weight_table" with header codice71, nid, weight, I had the txt tab-separated file weight_table2 with just the header codice71.  Doing so, I get the error:

Runtime error  Traceback (most recent call last):   File "<string>", line 1, in <module>   File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\stats.py", line 1423, in GenerateSpatialWeightsMatrix     raise e ExecuteError:  Traceback (most recent call last):   File "c:\program files (x86)\arcgis\desktop10.4\ArcToolbox\Scripts\Weights.py", line 848, in <module>     setupWeights()   File "c:\program files (x86)\arcgis\desktop10.4\ArcToolbox\Scripts\Weights.py", line 164, in setupWeights     rowStandard = rowStandard)   File "c:\program files (x86)\arcgis\desktop10.4\ArcToolbox\Scripts\Weights.py", line 772, in table2SWM     for row in rows: RuntimeError: A column was specified that does not exist.  Failed to execute (GenerateSpatialWeightsMatrix).

Any help on what I am doing wrong? I am also open to using other software (R or Python) to do this, bearing in mind that my goal at the end is to generate a hot-spot detection map (Local Moran stats with pseudo p-values).


texts: Set default for folder parameter in QGIS processing scripts

texts:
In QGIS processing scripts we can define a folder as input parameter as follows:

[...define input/output parameters...]
##mypath=folder
[...rest of the script...]

Question: Is it possible (and if yes, how) to set a default value for mypath?

According to the approach for setting defaults for string input parameters

#'spam' is the default here
##egg=string spam

I tried various things like

##mypath=folder C:\tmp
##mypath=folder C:\\tmp
##mypath=folder 'C:\\tmp'

but none of them seems to be valid.


texts: Ignoring certain values when creating profile graph in ArcGIS for Desktop?

texts:
I have a statewide DEM I am trying to create a profile of, however the DEM has some areas of widely varying size (bodies of water) where data was not collected and these areas were all filled by my source as having values of -1.  So when I cut a profile graph it is filled with abrupt drops to zero like so:

How can I get the profile graph to skip the -1 values & simply leave those spaces empty?


texts: How can I remove missing values on QGIS?

texts: I have a data set that uses the number -9999.000 to represent missing values. I need to remove these missing values in order to make some calculations, but I am unsure how to go about this.


texts:
I'm not sure if this is the right Stack to ask in, but I've been recently trying to bundle the latest wheel of GDAL 3.0.2 x64 downloaded from
https://www.lfd.uci.edu/~gohlke/pythonlibs/#gdal
for python 3.8 (and 3.7) using Pyinstaller version 4.0.dev0+2255bba498 (version 3.5 on python 3.7)
I keep encountering the error:

PROJ: proj_as_wkt: Cannot find proj.db

This did not occur when using GDAL version 2.4.1 downloaded from the same wheel location as before. This error does not occur when running a standard python environment either in a debugger or as a command line.

I've tried including the proj.db as a hidden import and the whole folder it is contained in as a hidden import without any luck. I am not sure if I am doing something wrong, I can include my .spec file for PyInstaller if needed.


texts: Using zonal statistics, my input raster is 1*1 and input value raster is 10*10. I was hoping the output raster will be 1*1 but it is 10*10. What is the error here ?


texts: How to create a bathymetric map with a irregular boundary from point data

texts:
I have a point shapefile, want to create a bathymetric map for a natural lake. I have tried 3D analyst and spatial analyst tools. They both create the bathymetric contour and surface raster based on the coordinates of the points I provided, in spite of the lake boundary. How to include the lake boundary in to the interpolation process.

I also have seen people just clipped the raster file with the lake boundary, but I don't think it is correct.


texts:
I've added a shapefile and a raster image to ArcGIS, the raster image in geotiff format spreading over some of the features.

Now, I want to create a buffer (of radius 1 mile) around the features and clip them and convert it as a Geotiff image to use it as a raster image.


texts: Shiny leaflet click-event returns NULL when clicked again

texts:
When leafletProxy() is used, the click event of leaflet returns NULL when a polygone is clicked for the second time.

How can I prevent it from doing so?

Example code:

library(shiny)
library(leaflet)
library(sf)
library(dplyr)

# example polygone file
nc <- st_read(system.file("shape/nc.shp", package="sf")) %>%
  select(CNTY_ID) %>%
  st_transform(4326)

ui <- fluidPage(
  leafletOutput("mymap")
)

server <- function(input, output, session) {

  # define map
  output$mymap <- renderLeaflet({
    leaflet(data = nc) %>%
      addPolygons(layerId = ~CNTY_ID)
  })

  # click event
  observeEvent(input$mymap_shape_click, {
    # click event
    click <- input$mymap_shape_click$id
    print(click) # this returns NULL if a polygone is clicked for the second time

    # change clicked polygone
    selection <- nc %>% filter(CNTY_ID == click)
    leafletProxy("mymap") %>% addPolygons(data = selection, color = 'red')
  })

}

shinyApp(ui, server)


texts:
I am working on a project where I need to identify the area of a hilltop that is relatively flat within which stone structures could be built before the slope becomes too great to build without having to modify/terrace the hill.

Specifically, I am doing a project with known pre-historic settlements, all of which are located on hilltops or spurs. I am trying to get an estimate of settlement size, assuming the inhabitants only built structures following the natural topography. This isn't always the case - there is evidence of intensive terracing in some areas, but this is relatively uncommon and only exists in the largest settlements. In all others (following physical visits to 10% of the total number of settlements I am working with), the limits of the settlement follow the topography - once it starts to become too steep to build houses, a wall was built around the settlement.

I have been trying to think through how I could use GIS to identify the settlement extent for settlements that have never been formally studied following what I have seen. I have a relatively accurate DEM with 1 arc-second horizontal resolution. I am using ArcGIS 10.5.

I am thinking Topographic Position Index will be my best bet, but have had issues that I think are connected with neighborhood size and have never quite figured this out, despite trying to use various TPI tools.

Or perhaps TPI is more complex than what I need? Perhaps I could just generate slope lines and identify the line where the slope reaches a certain point and identify the point at which the slope goes over a certain value (e.g. 10%)?


texts: Cartographic line generalisation plugin error

texts:
I'm trying to use the cartographic line generalisation plugin and am getting the following error:

  "Error: Layer must be in projected coordinate reference system (CRS)!"

Can someone shed some light on what might be going on?


texts:
I have been trying to get gdal_retile working with the --optfile command. At first it did not work because in my files.txt I have '-' characters in the filename. I tried adding quotes around the files, and that seemed to work, but then gdal_retile would just freeze. So I have two questions:

Would using the --opfile command essentially be the same thing as calling gdal_retile from the command line once for every single file I have? Would I get the exact same results?
Does gdal2tiles do the same exact thing?

Thanks!
Derek


texts: Large objects of fixed size that can be used for measure control points

texts:
I am looking for some real world objects that has rather large sizes where the exact size is known such they can be used for controlling different implementation of length measurements in GIS application.

The quesstion started from here: Should we always calculate length and area in lat,lng to get accurate sizes/lenghts of real world measurements

So if anyone has a list of objects that has lenghts above 1km in the real world that has easily identifiable points in maps such the length of them can be measured easily.


texts: How to grid unevenly sampled categorical data?

texts:
I am looking for a method for gridding categorical data. I have extracted from nautical charts and field sheets a collection of points specifying the nature of the surface of the bottom of the ocean. These data are categorical rather than numerical and they are not regularly nor even randomly sampled. Nautical charts are created to aid in navigation and anchoring; they are not created to map habitat. As such, more soundings are made close to shore where relatively shallow depths can pose a hazard to navigation and where ships to tend to anchor. Further from shore, where the depths are more than adequate for navigation and anchoring is impractical, soundings are made much less frequently.

Has anyone else tried to create gridded substrate maps from nautical charts?

I looked at Thiessen (Vornoi) polygons but the concentration of soundings along shores leads to a fine 'honeycomb' along the shore, large polygons offshore and in between long pie-shaped polygons stretching way offshore. Gridding using nearest neighbour yields pretty much the same result.

I need a way to limit the influence of the shallow, near shore points -- a way to limit those long pie-shaped polygons. In deeper waters I do not expect that the nature of the bottom will be a continuation of the near shore bottom. I started thinking along two lines -- both using depth. One is weighting the choice of the 'nearest' neighbour using the difference in depth between a grid cell and neighbouring points. Another is de-selecting neighbouring points which are more than some specified tolerance different in depth. Or, perhaps rather than a pre-specified tolerance, I could bin depth ranges and then limit the choice of neighbouring points to those in the same depth range or bin.

Any thoughts on how to implement either of these two options?

Since talking with colleagues on other forums, I have been looking at a couple of other approaches.  The first involves using a barrier -- the 100m depth contour -- to limit the influence of near shore data.  The challenge with this approach is that any of the ESRI interpolation routines that can use barriers are designed to work with continuous data rather than discontinuous data.  I could use the barriers to break up the points into shallow near shore and deeper points before creating Thiessen polygons.  However, I anticipate rampant edge effects since ArcGIS createsThiessen polygons for rectangular areas not for complex areas.

The second approach -- suggested by several colleagues -- was kriging.  I had initially dismissed kriging out of hand because I have only ever considered it for continuous data.  The challenge with kriging is that it too is not designed for categorical data.  Now, I am looking at cokriging with depth and nature of surface but, any type of kriging is going to involve using integer numerical codes for nature of surface.  Afterward the resulting floating point numerical codes will have to be reduced back to the original integer coding.  Not pretty.

Can any one suggest other lines to follow? (One could, perhaps, use terrain analysis. For example, slopes steeper than the angle of repose could not be sediments. I am looking for something simpler and, at any rate, I do not have data at sufficient spatial resolution.)

Regards,


texts: SRTM Data tiles appear to be different scales

texts: I have downloaded the STRM files (.bil) for Hawaii and rendered them in QGIS. They render as grayscale heightmaps. Although all of the tiles appear to line up, none appear to be using the same scale. I looked in the other bundled files for scaling information but found none. What am I doing wrong?


texts:
I am trying to figure out how to do gradient shading on some polygon noise contours that I have around an airfield based on their dB range. I understand how to break up features by their unique values into categories and use a gradient color scale, but I am wanting each new layer to "fade" into the previous without any clear distinction in a coninuous pattern. To give you an example, here is the map I am trying to reproduce:

As you can see, the layers are on a very nice gradient scale.
There are only 9 layers that I have, one for 85, 80, 75, etc. I am not sure how to break it up this evenly and continuosly.

Here is what I have been able to do so far below: just used simple green/red gradient, took out the outlines and used transparency.


texts: Is there a standard for the coordinates of pixels in georeferenced rasters ?

texts:
We are working with different raster datasets, and the pixel coordinates are either stored at the center of the pixel or at one corner. The information is usually provided in the metadata, but sometimes we need to guess and this post illustrates that it is not always easy to find.

As we also produce some layers, I was wondering if there was a standard rule and/or best practices to assign the coordinates for a pixel, ideally with a reference or with pro/cons.


texts: ApplySymbologyFromLayer on ArcGIS Pro not working?

texts:
I created a python tool on Pro with the following code, and manage to run it without any errors or warnings. However, I do not see any changes on my layer:

workspace = "C:\whatever.gdb"
arcpy.env.workspace = workspace
ref_lyrx = r"C:\SimbologyIwant.lyrx"
aprx = arcpy.mp.ArcGISProject("CURRENT")
map = aprx.listMaps('Map')[0]
layers = map.listLayers()[0]
layers2 = map.listLayers()[1]
arcpy.ApplySymbologyFromLayer_management(layers2, layers)

I also changed the last line to this, but no results

arcpy.ApplySymbologyFromLayer_management(layers2, ref_lyrx)

Is my code expected to work?


texts: Why does Select Feature give nonsensical results?

texts:
I am a beginner with QGIS and with no previous experience or expertise in Geography or GIS. I have an ESRI shapefile of New Zealand census area units (CAUs). My goal is to obtain distances between a selected CAU within the CBD of Auckland city and centroids of surrounding CAUs. There appears to be something wrong with linkage between the displayed map and the attribute table. When I select a CAU, the highlighted one in the attribute table is clearly not the CAU in question. For example, I clicked on a CAU in downtown central Auckland city and the highlighted CAU is a rural CAU about 150 km away. I tried creating a distance matrix; while some of the computed distances were plausible others were clearly wrong.

I thought that you would want me to attach the files but don't see any such facility on this web page.

To address some points raised, firstly in the attribute table I don’t see a ‘show selected only’ option, but there is a ‘move selection to top’ option. Secondly yes I was using one of the selection tools - the ‘select features by polygon’ one. Thirdly I realise that what I have is polygons and that only distances between points of the polygons can be measured. The distance matrix was being calculated on centroids.

There are two ways to select the area I am interested in.

(i) Go to View menu > select > select features by polygon. Then go to Layer menu > save selection as vector file. Change shapefiles by using ‘remove layer’ / add layer’ functions. With selected area now loaded, go to Vector menu > Geometry tools > Polygon Centroids > create centroids file. Add new layer to the TOC. Then Vector menu > analysis tools > distance matrix.

(ii) Since I already knew which CAUs I wanted to calculate distances for, the alternative was to edit the (whole country) DBF file in a spreadsheet, deleting all but the Auckland region.

If the choice is (i), then the selected area looks right in the map, but the areas in the attribute table are wrong. If the choice is (ii), then the attribute table is correct, but the areas depicted in the map are discrete or discontinuous parts of the whole country, instead of the Auckland region.

I presume by ‘manually selecting the layer’ you mean clicking on (highlighting) the correct layer in the layer panel of the GUI (which the User Guide calls the map legend).

I removed polygon layer, retaining the centroids layer, and performed multiparts to singleparts conversion. The feature count was the same.

If you need to know, coordinate reference system is set as NZGD2000/New Zealand Transverse Mercator 2000.

So after addressing all the above points I still don't have a resolution.


texts: Find Healthcare Data by Geography and Income Level

texts:
Is anybody aware of a data source for healthcare related data (number of people covered, type, etc.) for any geography (looking for USA) that can also be broken down by income level?

I've tried ArcGIS Community Analyst but they don't seem to have any healthcare data aside from expenditures from a market potential standpoint.


texts: What is the proper way to georeference an image based on GCP using GDAL tools

texts:
I am trying to do the Georeferencing using CLI provided by the GDAL as it is doing in the QGIS.
Tools useful are

gdal_traslate
gdalwrap
gdaltransform

I have a gcps as below:
-gcp 3.5665368079674 172.382039707818 622077.13 3065767.9025 -gcp 245.303236050418 444.414309600493 622131.912491862 3065830.02579297 -gcp 634.581598372123 423.326092755138 622220.817025879 3065825.27750895 -gcp 303.968713236919 25.9583397712343 622145.74925 3065734.5255

I want the Geocoded-TIF image without GCP on it. How to achieve this with GDAL Tools without QGIS but as exact Output of QGIS-Georeferencer.
Source Image


texts: Unexpected behaviour using Filter in QGIS 3.2

texts:
I have encountered an unexpected difference in how the Filter function works in QGIS 3.2 to previous versions (2.14 for example).

I used the Filter function to select a set of features based on a variable value; in QGIS 2.14 I ended up with an attribute table with the following header:

Using exactly the same shapefile in QGIS 3.2, I found the following:

As a result, in QGIS 3.2 selecting an individual feature selected all the features in the filtered dataset (it appears to treat the filtered data as a single feature). In QGIS 2.14, I am able to select individual features from the filtered dataset.

I was able to get round this by using Select by Expression in this case, however, I use the Filter function a lot and would like to know
if this is a known issue? and has the function of the Filter function been intentionally changed?

ETA:
I have investigated this further in QGIS 3.2 and split the original shapefile into single parts (Multi-part to single parts). This affected ~150 of the 380000 features. I then re-filtered the data but observed the same behaviour as above. In the full dataset, individual features can be selected.

ETA the expression used to filter:
"AttributeName" = 'TextValue'
This expression worked using Select by Expression.


texts: Cannot ProxyPass to geoserver if source name is anything other than /geoserver

texts:
I have been using apache's ProxyPass command to proxy

 http://localhost:8080/geoserver/

as follows:

    ProxyPass /geoserver http://localhost:8082/geoserver
    ProxyPassReverse /geoserver http://localhost:8082/geoserver

This works fine until I change the source path to

    ProxyPass /geoserver1 http://localhost:8082/geoserver
    ProxyPassReverse /geoserver1 http://localhost:8082/geoserver

When changed to above, If I go to

    http://localhost/geoserver1

in a browser, it will be redirected to

 http://localhost/geoserver

automatically, without the port number. And then this gives an error of 404, address not found.

This happens if the source is anything other than /geoserver and the destination is

http://localhost:8082/geoserver

(I suspect this has something to do with the automatic redirect from

http://localhost:8082/geoserver

to

http://localhost:8082/geoserver/web

But I am not sure whether this is the case.

How do I fix it?

This is with GeoServer 2.5 in osgeo live 8


texts: Road network distance from incident to facility

texts:
I have two sets of location shapefiles; one for incident and another for facility. I also have a road/street shapefile. I want to calculate the road/driving distance from each incident to every facility.

For example:

Incidents: A, B, C, D
Facility: 1, 2, 3, 4

I want a result as follows:

Incident    Facility    Distance
A           1           1 mile
A           2           0.5 mile
A           3           2 mile
A           4           0.5 mile
B           1           3 mile
B           2           0.5 mile
B           3           4 mile
B           4           0.5 mile

Is it possible using ArcMap 10.2.2 if yes how?


texts: Converting multiple row values to field values based on similar FID using ArcGIS Desktop?

texts:
I have a polyline layer containing information that I have attempted to spatial join onto a buffer polygon.  The problem is that I now have multiple rows that have the same FID, and differing values in the field I want to extract information from.  What I need to do is take all the values contained in the target field, and preserve them in just one row using the original FID as the preserving value.  Please see my attached images for clarification.

I do not know Python, so will need to do this with standard geoprocessing tool.


texts: Converting file geodatabase feature class to KML without using Esri software?

texts:
Admin boundaries are available in https://www.humanitarianresponse.info/en/operations/federated-states-micronesia/dataset/micronesia-federated-states-admin-level-1-boundaries as a file geodatabase (*.gdb) but I currently don't have Esri software to read them.

How can I convert it to KML or SHP format?

I get the following...what projection should I use to fix this? it is currently 4326


texts: Creating sub-group under existing group for tools in Python Toolbox?

texts:
I have created a Python toolbox and a simple SimpleTool with this initialization:

class SimpleTool(object):
    def __init__(self):
        self.label = "Simple label"
        self.description = "Simple description"
        self.category = "Group1"

It is working like expected - the toolbox puts the tool into the Group1 category. Now I would like to create a sub-group under this Group1 called e.g. Sub-group1.

If you create an ordinary toolbox under MyToolboxes, you can create unlimited(?) new sub-groups in sub-groups in sub-groups in that toolbox. But I can see no way how to do it within Python Toolbox.

Is it possible to create sub-groups under a group in Python Toolbox?


texts: How can I multiply rows with a number using C#?

texts: I have a dbf with a  field named "ppa" .the type of ppa is double. users enter  number (for example 0.023) in a textbox and select the dbf in a combobox . then click Run and program multiply 0.023 with each number of ppa and save the result in another field . what objects do i need for programming  ? How can i do this ?


texts: Exporting geoprocessing results history from MXD?

texts:
I have an MXD with the results saved to it.
I want to look at the parameters that were set for some of the tools externally, so I want to export the results.

Can this be done?


texts: Align pixels for two images with same CRS in Google Earth Engine - why it doesn't work and, do I need this?

texts:
I am doing calculations in Google Earth Engine using several images from different sources, but I don't find a way to snap or pixel-align the layers before calculations.
Also, I don't seem to understand how GEE is working, because the same function lets me snap image1 to image2, but does nothing if I try to snap image2 to image1.
These are snapshots of my two images, and a third one where I have changed transparency to show that pixels do not overlap:
image1 (a soil layer)

image2 (land cover from Copernicus)

image1 and image2 (50% transparency) - notice the misalignment between pixels

This is what I get when I print .projection() for both layers (notice that some of the extent values differ)
image1

image2

Then, I want to snap/align image2 using image1 as a template. This is the code I'm using:
var image2_aligned = image2.reproject({
  crs: image1.projection().crs(),
  scale: image1.projection().nominalScale()
})

However, the result is still misaligned
image1 and image2_aligned (50% transparency)

The result is identical to my original layer
But, if I do the opposite, align image1 using image2 as a template, the same code works as I expect
var image1_aligned = image1.reproject({
  crs: image2.projection().crs(),
  scale: image2.projection().nominalScale()
})

image1_aligned and image2 (50% transparency)

Why does this happen?
How can I get a version of image2 that aligns pixels in image1?
Also, a less practical question. Because I come from QGIS and R, my old mindset kind of wants to do that step manually but, is it necessary at all? GEE would do the calculations even if pixels are not aligned, but I feel it's better to align the images myself than letting it out for GEE, as I wouldn't have control over what it's doing under the shadow (but not that there is anything particularly important to control in this case...)
Final note: I've read documentation for GEE images, .projection(), and .reproject(), but I'm too new to make sense of everything. Also, I've read answers to this other question, but I don't think it's exactly the same... or, at least, it's not helping me finding a solution.


texts: How to determine if a person is on the line or distance from it

texts:
There is a base table with the following structure:
id - AUTO_INCREMENT
name_hotel - varchar
coordinates - multilinestring

The coordinates form a line
In the database, it is written like this:

'MULTILINESTRING((37.7721763 55.7042836,37.7728844 55.704205))',0

And there are the coordinates of the person: 37.77247, 55.7042
I need to find out if a person is on this line or what is his distance from this line in meters.
I do not understand how to do this in the case of multilinestring
My version MySQL 5.5.68


texts: Calculating area of different classes in Google Earth Engine

texts:
I am trying to classify the India into forest, agriculture and urban areas using Google Earth Engine, but after classification I am trying to calculate areas of classes like this:

var im=l8.filterDate('2018-01-01','2018-12-31');
var cloudless =im.map(function(image) {
  var cloudy = ee.Algorithms.Landsat.simpleCloudScore(image).select('cloud');
  var mask = cloudy.lte(20)
  return image.updateMask(mask);
});
var cld=cloudless.median();
var cloud=cld.clipToCollection(ind);

do the classification:

var classNames=urban.merge(forest).merge(agriculture).merge(water);
var bands = ['B2', 'B3', 'B4', 'B5', 'B6', 'B7'];
var training = cloud.select(bands).sampleRegions({
 collection: classNames
properties: ['landcover'],
scale: 30
});
var classifier = ee.Classifier.randomForest().train({
 features: training,
 classProperty: 'landcover',
 inputProperties: bands
});
var classified = cloud.select(bands).classify(classifier);
Map.addLayer(classified,{min: 0, max: 3, palette: ['red', 'green', 'yellow','blue']},'classification');

Calculate the area of different classes

var names = ['urb','for','agri','watr']
var count = classified.eq([0,1,2,3]).rename(names);
var total = count.multiply(ee.Image.pixelArea());
var area = total.reduceRegion({
 reducer:ee.Reducer.sum(),
  geometry:ind,
  scale:30,
 maxPixels: 1e9,
 bestEffort:true
});
var area_pxa = ee.Number(area).divide(1e6)
print ('Area in (km²):', area_pxa)

When I am running this, it is taking a lot of time and showing error:

  computation timed out.

How to overcome this error?

Here is the link to my code:https://code.earthengine.google.com/08783af235d2672177f2af9f1d81e714


texts: Topology Error (Must Not Have Gaps) encompasses extent of all existing features?

texts:
I have run into this before and simply marked it as an exception and moved on, but it puzzles and bothers me a bit so if someone can provide a reasonable explanation, that would help me. Surprisingly, I couldn't find a post related to it here or in Esri's online documentation.

When I create a topology and add the rule "Must Not Have Gaps", even with this 2-feature polygon feature class, there seems to always be one error that encompasses the entire feature class.

Can this error be effectively fixed?

When I have it create a feature (a common fix for topology issues), it creates a single polygon that includes the area of both features but not the boundary between them and the error does not appear to include any part of the boundary between the features as you can see in the screenshot.

I remember in the days of "Coverages" and ArcInfo Workstation that there was this concept of a "World Polygon" that represented the universe outside of your extent (and you were NOT to delete it). The only "reason" (for lack of a better word) for what I am seeing is that this is a manifestation or result of that same concept. Maybe it should be marked as an exception and I should just move on as I've done in the past. Comments suggesting things to try (especially if this isn't exactly the "non-error" that I've described), are welcome. I'm using ArcMap 10.6 for this.


texts: How to update SQL query for a virtual layer?

texts:
I created a virtual layer which contains all the geometries and attributes from a shapefile using the following code:

vlayer = QgsVectorLayer( "?layer=ogr:path/to/shapefile", "layerName", "virtual" )
QgsMapLayerRegistry.instance().addMapLayer(vlayer)

But now I want to update the SQL query for this virtual layer. Is this possible using PyQGIS?

Example:

How could I update the virtual layer with the following simple query:

SELECT * FROM anotherLayer WHERE ID < 10


texts: Union of Polygons with slightly shifted coordinates

texts:
I am trying to join some polygons using ST_Union but I am facing some problems due to slightly shifted coordinates of the polygons.

Here's an small example of two polygons I would like to merge:

The problem is that the lower point does not have the same longitude in the two polygons, in the first polygon it's 8.54190284185528, in the second one it's 8.54190284185522.

Due to this marginal difference St_Union returns a MultiPolygon instead of a Polygon.

Any ideas on how to fix that?

Something like the st_exteriorring (which doesn't work with MultiPolygons)?

St_ConcaveHull does not work due to some quite complicated polygons.


texts: Finding union of many geodataframes using GeoPandas

texts:
I have a series of many GeoPandas Polygon objects, each with an associated exposure time. My goal is to find the union of all the Polygons in order to create an exposure time map.
For each Polygon in the final exposure map, I want to have the total exposure time, which is defined as the sum of the exposure times of each overlapping Polygon.
I think I have it working for the case of 2 geodataframes:
import geopandas as gpd
import numpy as np
from rtree import index
from shapely.geometry import Polygon
from shapely.ops import unary_union

coordinates1a = [(1,1), (1, 2), (2, 2), (2, 1)]
coordinates1b = [(2.1,2.1), (2.1, 3.1), (3.1, 3.1), (3.1, 2.1)]
coordinates2a = [(0.5,0.5), (0.5, 1.5), (1.5, 1.5), (1.5, 0.5)]
coordinates2b = [(1.6,1.6), (1.6, 2.6), (2.6, 2.6), (2.6, 1.6)]

# Create a Shapely polygon from the coordinate-tuple lists
poly1a = Polygon(coordinates1a)
poly1b = Polygon(coordinates1b)
poly2a = Polygon(coordinates2a)
poly2b = Polygon(coordinates2b)

polys1 = gpd.GeoSeries([poly1a, poly1b])
polys2 = gpd.GeoSeries([poly2a, poly2b])

# Create geodataframes
df1 = gpd.GeoDataFrame({'geometry': polys1, 'df1':[1,2], 'exposure_time': 10.7})
df2 = gpd.GeoDataFrame({'geometry': polys2, 'df2':[1,2], 'exposure_time': 9.7})

res_union = gpd.overlay(df1, df2, how='union')

# Find the list of all exposure time column names
exp_cols = [c for c in res_union.columns if 'exposure_time' in c]

# Sum the contributing exposure times in each polygon of the union
for i in range(len(res_union)):
    exptime = np.sum(res_union.loc[i, exp_cols])
    all_exptimes.append(exptime)
    res_union.loc[i, 'total_exposure_time'] = exptime
    res_union.loc[i, 'area'] = res_union.loc[i, 'geometry'].area

How do I do the same for the case of N geodataframes, where N might be tens or hundreds?
I tried using an rtree index and unary_union(), but couldn't quite get it to work, plus that only seemed to work on the Polygons themselves rather than the geodataframes, meaning that the exposure time information was lost. I am a complete novice with GeoPandas, so maybe I'm missing something obvious, but after a lot of searching and reading documentation yesterday, I'm stumped.
# Try using rtree
df_array = [df1, df2]
polygon_array = [poly1a, poly1b, poly2a, poly2b]

# Need to populate the index with Polygons, rather than geodataframes,
# so how do we keep track of the exposure time information?
intersections = []
idx = index.Index()
pos = 0
for polygons in df_array:
    for index in range(len(polygons)):
        idx.insert(pos, polygons.loc[index, 'geometry'].bounds)
        pos += 1

# This seems like the more natural way to do it, but exposure time
# info is not present
for polygon in polygon_array:
    merged_polygons = unary_union([polygon_array[pos] for pos in idx.intersection(polygon.bounds) if polygon_array[pos] != polygon])
    intersections.append(polygon.intersection(merged_polygons))

intersection = unary_union(intersections)

Here's an image of a case closer to what I eventually want to have. My goal is to have a total exposure time associated with each polygon. In this image, I'm showing the union of three geodataframes, where each geodataframe contains 4 non-overlapping squares. The squares' locations relative to one another are fixed across all geodataframes, but all 4 squares can shift as a unit, from geodataframe to geodataframe.


texts: Uncaught TypeError: a.addEventListener is not a function When using React OpenLayers Wrapper

texts:
I am trying to create a web app using a Django back end with React for the front end.  I am using a React OpenLayers wrapper on the OpenLayers site and keep getting the Type Error.  Can someone please help?  I am new to React.

Wrapper: https://github.com/allenhwkim/react-openlayers/tree/master/app/controls

Index.jsx
var React = require('react')
var ReactDOM = require('react-dom')
var Hello = require('./app')
var Search = require('./testing')
import Calendar from './date-range-picker'
import Map2 from './map2'

import {
  interaction, layer, custom, control, //name spaces
  Interactions, Overlays, Controls,     //group
  Map, Layers, Overlay, Util    //objects
} from "react-openlayers"

var marker = new custom.style.MarkerStyle(
  'https://openlayers.org/en/v4.0.1/examples/data/icon.png'
);

let selectedMarkerStyle = Util.cloneObject(marker.style);
selectedMarkerStyle.getImage().setOpacity(1);

$(document).ready(function () {
ReactDOM.render(<Hello />, document.getElementById('react-app'))
ReactDOM.render(<Search />, document.getElementById('testing'))
ReactDOM.render(<Calendar />, document.getElementById('Calendar'))

ReactDOM.render(

    <Map view={{center: [0, 0], zoom: 2}}>
  <Layers>
    <layer.Tile/>
    <layer.Vector source={marker} style={marker.style} zIndex="1" />
  </Layers>
  <Overlays>
    <Overlay
      ref={comp => this.overlayComp = comp}
      element="#popup" />
  </Overlays>
  <Controls attribution={false} zoom={true}>
    <control.Rotate />
    <control.ScaleLine />
    <control.FullScreen />
    <control.OverviewMap />
    <control.ZoomSlider />
    <control.ZoomToExtent />
    <control.Zoom />
  </Controls>
  <Interactions>
    <interaction.Select style={selectedMarkerStyle} />
    <interaction.Draw source={marker} type='Point' />
    <interaction.Modify features={marker.features} />
  </Interactions>
</Map>

, document.getElementById('map2'))

});

./map2.jsx

import * as React from 'react';

export class App extends React.Component<any, any> {
constructor(props) {
   super

(props)
  }

  render() {
    return (

React OpenLayers

<Link to="/layers">Layers</Link>

<Link to="/controls">Controls</Link>

<Link to="/overlays">Overlays</Link>

<Link to="/interactions">Interactions</Link>

<Link to="/custom">Custom Examples</Link>

        {this.props.children}

    );
  }
}


texts: How to solve the Qgis error when try to import a plugin created in lower version than 2.0?

texts:
Traceback (most recent call last):
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 219, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/Users/Drisya/.qgis2/python/plugins\iWrm\__init__.py", line 36, in classFactory
    from iWrm import iWrmPlugin
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 478, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/Users/Drisya/.qgis2/python/plugins\iWrm\iWrm.py", line 40, in
    import doSoilErosion, doWaterDemandDom, doWaterDemandAgri, doWaterDemandInd, doWaterDemandLstock, doWaterDemandTotal, \
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 478, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\Drisya\.qgis2\python\plugins\iWrm\tools\doSoilErosion.py", line 12, in
    import GdalToolsUtils as Utils
  File "C:/OSGEO4~1/apps/qgis/./python\qgis\utils.py", line 478, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:\Users\Drisya\.qgis2\python\plugins\iWrm\tools\GdalToolsUtils.py", line 207, in
    class FileDialog:
  File "C:\Users\Drisya\.qgis2\python\plugins\iWrm\tools\GdalToolsUtils.py", line 209, in FileDialog
    def getDialog(self, parent = None, caption = QString(), acceptMode = QFileDialog.AcceptOpen, fileMode = QFileDialog.ExistingFile, filter = QString(), selectedFilter = None, useEncoding = False):
NameError: name 'QString' is not defined


texts: Toblers's Hiking Equation and Slope Dilemma

texts:
I'm trying to use Toblers's Hiking equation to determine economical backgrounds of some hillforts. The equation is anisotropic which means that the speed of movement that it calculates differs whether you are moving up or down the same slope. For exampe, moving downwards on 5° slope is faster than moving upwards the same slope or even moving on the flat terrain. And here is my dilemma: ArcMap's Slope only calculates positive values for the inclination so as I understand using Slope in the equation is useless.

I also tried the Path Distance Tool, without using any cost raster, only DEM as Surface Raster and Vertical Raster in the Vertical Factor Parameters, as Vertical Factor I used table downloaded here. This table apparently defines the vertical-factor graph but I really don't know (and would really like to know) how is the table used in this method. Is it possible that this method actually calculates also negative slopes as the tool requires starting point(s) for the calculation and therefore knows the direction of the slopes in relation to the starting point(s)? Or the tool calculates the "ordinary" Slope and then reclassifies it according to the table?

I hope someone knows the answer or can at least direct me to correct section of this forum.

Here is the image of how the result should look like:


texts: Raster data, basics: where is the information?

texts:
A long time ago I worked a bit with ArcGIS and shapefiles but never with raster data. Now, I have a raster dataset that I use in QGIS. Ok, no biggy I thought. Just convert it to shape/ vector and all we be well. But it's not. The data is supposed to show 26 time steps, yet all I get after conversion is a single number per cell. According to the description, the "data are provided in NetCDF-4 format, where the third dimension represents the time step". What is this third dimension?

This is the dataset I am talking about: https://datadryad.org/stash/dataset/doi:10.5061/dryad.dk1j0

I am trying to access the GDP pc 5 arc minutes dataset. How can I transform this into a shapefile in such a way that I get access to the 26 time steps?


texts: Problem with Intersect_Analysis : too long path?

texts:
I made a python code for Arcgis 9.3. to intersect 2 features.

The problem is that code works when the files are on my desktop (for example)
but not when they are in a long path on another disc.

Here is the example with a long path :

import sys, string, os, arcgisscripting, glob

# Create the Geoprocessor object
gp = arcgisscripting.create()

ShapeVitesse ="X:/D1111134_PPRI_ARQUES/01_Technique/1.1_Hydrologie/111_Données-de-pluies/1114_Données Radar/TEST/Hauteurs.shp"
ShapeHauteur ="X:/D1111134_PPRI_ARQUES/01_Technique/1.1_Hydrologie/111_Données-de-pluies/1114_Données Radar/TEST/Vitesses.shp"
FichierSortie ="X:/D1111134_PPRI_ARQUES/01_Technique/1.1_Hydrologie/111_Données-de-pluies/1114_Données Radar/TEST/ALEA.shp"

Input_Features = ShapeVitesse +" #;"+ShapeHauteur
# Process: Intersect...
gp.Intersect_analysis(Input_Features, FichierSortie, "ALL", "", "INPUT")

Is there a solution or is it impossible to make it with too long path ?

But the tool intersect in ArctoolBox works with these path ???!!!


texts:
How to print a layout in OpenJump?
I would like to print vector layers of an area toghether with map legend and a graphic scale indicator, to a pdf .
I tried the Jump Printer Plugin v1.87, but the results are very bad:

low res
useless configuration: size of cartographic elements do not adapt to the zoomed area. When you save a Cfg with a legend, the next time, if you are not at the same zoom level as the time you saved the Cfg, the legend will be too big or too small (and even far away from the map you are trying to print)
source code unknown

I would accept even a Python solution


texts: I want to open my version 8 Microstation DGN file with QGIS without any loss of information. Please, do you know an extension supported by QGIS to do this job?


texts: Getting data from World Bank in topics like economics, human rights or environment into QGIS?

texts:
The World Bank has a lot of data on their website that is shown on maps.

Is there is a way to download this data and use it in Qgis, preferably via shapefiles?


texts: mousemove event is fired with IE and firefox but it is not fired with chrome

texts:
I am using mousemove event to do some code when the mouse get over features, the code below is working well with IE and firefox but It is not working with chrome

$(this.map.getViewport()).on('mousemove', function(evt) {
    var feature = map.forEachFeatureAtPixel(map.getEventPixel(evt),
        function(feature, layer) {
            return feature;
        });
    if (feature) {
        //do my code
    } else {
        don't do anything
    }
});

any suggestion?


texts: How to make polygon volume in TIN surface?

texts:
I want to measure surface volume of an area in different elevation layer.

For measuring the surface volume I have to make a Polygon Volume as well. I have problem with making this polygon over the TIN layer and define the different elevation for it ? Like the link below:

http://resources.arcgis.com/en/help/main/10.1/index.html#//00q900000037000000

for example I have a TIN surface which min contour is 25 m and max contour is 140 , then I want to measure all the surface above 25 m , 35 m and ... ! I just wonder how to make this polygon on top?


texts: Separate different zones from one attribute in QGIS?

texts:
I am new with QGIS and I use QGIS 2.12.3 Lyon.

I downloaded from an official web side the protected water areas. Those areas are separated in different zones (for example zone I, zone II and zone III).

On the web side I can see those different zones, unfortunately in my QGIS all those zones are in the same color, although I can see the border in between them.

Is it possible to separate the zones and put it into different colors (so that I can see on QGIS too the different zones)?

I thought I can do it with the attribute table, but I couldn’t figure it out.


texts: How to find points present in one layer but not in a second layer, using ArcGIS?

texts:
I have two layers, A and B, with B consisting of a proper subset of the points in A.  How can I produce a third layer, C, consisting of just those points found in A but not in B.

In R, I would just use C = rgeos::gDifference(A, B) (function documentation here), a wrapper for the GEOS library function geos::geom::Geometry::difference().

What's the equivalent in ArcGIS?


texts: how to convert the easting and northing to a point and saved in a feature class in ArcMap?

texts:
I write a program to decode the message from the GPS device to get the easting and northing , but I don't know how to convert the easting and northing to a point and saved in a feature class in ArcMap.

Do anyone have similar experience ?

Regards
Gary Sham


texts: Converting .fdshape to .shp or other QGIS readable format

texts: I have been searching for a solution to being able to read .fdshape extension files in QGIS with no luck. It seems that the data had to be converted from .shp to .fdshape in the first place so I was wondering if there is an easy way of getting this information converted back?


texts: Editing polylines in QGIS (extend, trim, fillet etc)

texts:
I was wondering, if its possible to edit lines and polylines in qgis, in similiar way as autocad commands "extend", "trim" and "fillet"?

About how the commands for in Autocad, very shortly: The EXTEND command allows you to extend an entity to touch another entity in a drawing. The TRIM command allows you to shorten an entity to an intersection or remove a section of an entity between two intersections. Fillet: Constructs an arc of specified radius between two lines, arcs, circles, or will create arcs of the specified radius at the vertices of a polyline. Radius of the arc to be constructed may be set to 0, which will make a sharp corner.

I am updating certain trailpath map and the accuracy isnt really issue - so i could just use snap and digitize/split & delete, but I began to wonder if there is for example plugin to do this in more efficient way?


texts: How to find features from edge_id in PostGIS topology?

texts:
I have created topology for a set of tables with PostGIS topology extension.
Now, I want to get all linear features (which could be in different tables) connected to a particular line using a non-spatial query.
why non-spatial? because it is much faster than spatial queries and I am using topology extension because I want to avoid spatial queries and functions like ST_DWithin , ST_Intersects or even ST_Touches.
So far,I know how to find the edge_id of the lines that are connected to my PARTICULAR_LINE with the following statement:
 SELECT e2.edge_id,e2.start_node,e2.end_node
 FROM elec_topo.edge_data as e1
 INNER JOIN elec_topo.edge_data as e2
     ON (e1.start_node = e2.end_node or  e1.end_node = e2.start_node or
         e1.start_node = e2.start_node or  e1.end_node = e2.end_node)
         and e1.edge_id = (select unnest(GetTopoGeomElementArray(topo_geom))
                                 from PARTICULAR_LINE_TABLE
                                     where id=40);

The question is : How to find the respective features of these edge_ids?
There is however one silly way that I can think of to find features out of there edge_ids and that is to find topogeo_id and layer_id of each edge_id (by querying the relation table), and then using layer_id to find the name of each feature table by querying the Layer table and finally querying those feature tables (with topogeo_id).But this will take ages, is this really the only non-spatial way to do it?
As far as I have understood, there is no non-spatial way to do so, I really hope that I am wrong about this.


texts: QGIS returns "invalid layer" when adding a WMS layer

texts:
I want to add a WMS layer in my map. I select the server and obtain the list of layers that are published there. I select one of them (the problem is the same with all layers), but QGIS does not load it, instead returning a message saying invalid layer - Impossible to calculate extension.

I think it could be a problem of projection, because it is not declared by the server, and I know it is lat/lon WGS84 (not projected).

Any help ?


texts: 00230: Service layer has a different projection than the 's projection

texts:
Im trying to connect my map to arcgis online and I'm getting this error when I try to Share as a web map.
The help website provided by esri just says this

Solution
Remove the service layer from the map or scene.
If you are not sharing a global scene, change the projection of your map or scene to match the projection of your service layer. For more information on setting the projection of your map or scene, see Specify a coordinate system.

I still dont understand what I am supposed to do to fix this.
Has anyone experienced this?
If I export my layers as shapefiles and use that to make the arconline maps they work.
But i'd like it to update online when I change data on my desktop map. Is that possible? I'm working on a neighborhood map that is intended to be updated over time.
The Layers are NAD 1983 UTM Zone 16n
The Basemap is WGS 1984 Web Mercator Auxiliary Sphere.
This project is the first time I've used GIS software and map projections have been the most confusing part.
I am using ArcGIS Pro btw


texts: Select by Attributes iteration in ArcGIS ModelBuilder?

texts:
Trying to

select all points by location  that fall within a polygon
select by attribute from the selected by location using an expression. so far it works fine  ..
I have a list of values -  I need to change the expression  every time the model run  and write the results to Excel or Text File  as table  as follows.

call_type    -   Count

I know that can be accomplished using the iteration  but I couldn't figure it out.


texts:
1) How can I clip raster with checked "Use Input Features for Clipping Geometry?

I don't want to specify X, Y Min/Max for the Output Extent.  I want to run a simple Clip Raster script that includes 3 inputs (tobeclipped.tif, outputextent.shp, and outputraster.tif)

import arcpy
arcpy.Clip_management(
    "C:\tobeclipped.tif","1679872.292545 329909.492583 563751.298733 1399220.865851",
    "C:\output.tif", "#", "#", "NONE", "NO_MAINTAIN_EXTENT")


texts: ogr2ogr encoding on Windows using os4geo shell with Census data

texts:
I'm trying to load Census county level TIGER/line spatial layers into PostGIS using ogr2ogr in Windows.

Is there anyway to configure the encoding to LATIN1?

example:

ogr2ogr -f "PostgreSQL" PG:"user=postgres dbname=universe" . -lco PRECISION=NO -lco SCHEMA=census -nlt PROMOTE_TO_MULTI -lco ENCODING=LATIN1

error received:

ERROR 1: ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x76 0x61 0x6e

ERROR 1: INSERT command for new feature failed.
ERROR:  invalid byte sequence for encoding "UTF8": 0xf3 0x76 0x61 0x6e


texts: Drawing circles on map using OpenLayers 3?

texts:
I want to draw circles of certain radius on a map using openlayers . But the latitude,longitude & radius values are given in a excel sheet.

How do I do this work in OpenLayers?

I heard that OpenLayers doesn't take data from excel sheet so to which format I have to change my excel file?

And how to draw circles on the map?


texts: How can I display GeoTIFF image in VC++?

texts:
I need to represent a GeoTIFF file in a VC++ separate window where I can see the TIFF image and when the mouse is moved it display the geographic latitude and longitude. If I display a TIFF, before converting to GeoTIFF file, with the sentence "img.display()" I can see the pixel image's value and the pixel number (row, column).

Is it possible? I'm noob and I have no experience. Also I'm using libgeotiff in my program.

Can anyone help me with this?


texts: Performing equivalent of ArcGIS Identity_analysis (line with poly) using PostGIS?

texts:
I've got a section of arcpy code that I need to port PostGIS: Identity_analysis with the in_features being a line featureclass and the identity_features being a polygon featureclass.

I'm primarily looking for FID/LeftFID/RightFID result.

For reference, here is a screenshot of Identity_analysis result in ArcMap10.1:

PG version info:
PostgreSQL 9.3.5, compiled by Visual C++ build 1600, 64-bit  ,  PostGIS:2.1 USE_GEOS=1 USE_PROJ=1 USE_STATS=1


texts: Max Pixel Value Error in Google Earth Engine

texts:
I've written below code in Google Earth Engine for carbon monthly product from sentinel-5 but when I click on the run button for save in Google drive, it shows error. How can I solve this problem?

Invalid value at 'max_pixels.value' (TYPE_INT64), "10000000000000000000"

code link: https://code.earthengine.google.com/fdfa4d5b14c4b64d84da667eba7c2631

Map.centerObject(table);
Map.addLayer(table);

var carbon = ee.ImageCollection('COPERNICUS/S5P/NRTI/L3_CO')
.filterBounds(table)
.filterDate('2018-11-22','2019-12-28')
.select('CO_column_number_density')
.map(function(img){

  var thr = img.lt(10)
  var mask = img.updateMask(thr);

  return mask.clip(table)
  .copyProperties(img,['system:time_start','system:time_end']);
});

var monthly_map = function(collection, start, count, interval, units){

  var sequence = ee.List.sequence(0,ee.Number(count).subtract(1));
  var original_date = ee.Date(start);
  return ee.ImageCollection(sequence.map(function(i){

    var start_date = original_date.advance(ee.Number(interval).multiply(i),units);
    var end_date = original_date.advance(ee.Number(interval).multiply(ee.Number(i).add(1)),units);

    return collection.filterDate(start_date,end_date).median()
    .set('system:time_start',start_date.millis())
    .set('system:time_end',end_date.millis());}))}

var carbon_product = monthly_map(carbon,'2018-11-22',12,1,'month');

print(carbon_product)

var carbon_stack = carbon_product.toBands();

print(carbon_stack);

Export.image.toDrive({
  image: carbon_stack,
  description: 'carbon',
  scale: 1000,
  region: table,
  crs: 'EPSG:4326',
  maxPixels: 1e19
});


texts: Looking for Android, offline, mobile app for field campaign?

texts:
In the frame of an international project in agriculture monitoring, I have to propose a mobile app that will be used as a reference for field working. The minimum requirements of such an application are:

visualize the real time geo-location on a background map or satellite image (manually uploaded)
possibility to pinpoint and label the crop type (i.e. add a vector layer with attribute via forms)
possibility to work offline (i.e. loading the background image in memory)
multi-platform (phone/tablet, Android(priority)/iOS...)
free

Several apps have already been identified (Geowiki pictures, GIS cloud, Poimapper, Wolf-GIS, GeoODK collect, Opendatakit, Geopaparazzi, GeoNode, ESRI ArcGIS) but none of them (at least at this point of the analysis) completly fulfilled the requirements. Do you have other suggestions ?


texts: ArcGIS 10.5 ImportError: cannot import name multiarray with numpy

texts:
I've installed ArcGIS 10.5, and with it the numpy 1.9.3 library. However, I get the following error when I try to run any scripts with numpy:
Traceback (most recent call last):

File "U:\vickerss\TestNumpy.py", line 1, in <module>
    import numpy

File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\__init__.py", line 170, in <module>
    from . import add_newdocs

File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
    from numpy.lib import add_newdoc

File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
    from .type_check import *

File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
    import numpy.core.numeric as _nx

File "C:\Python27\ArcGIS10.5\lib\site-packages\numpy\core\__init__.py", line 6, in <module>
    from . import multiarray

ImportError: cannot import name multiarray


texts: Can multiple MapBox vector tile mbtiles be merged just using SQLite?

texts:
Is it possible to combine two vector mbtiles files using just SQLite?

I noticed this question Joining several raster .mbtiles?
 but it does not seem to work with vector files.

I also came across this script Patch mbtiles which seems to support the idea that it should be possible.

In my use case, I want to be able to merge mbtiles on the client side (in a Cordova app with sqlite) without having to involve any operations on the server.

For testing I have two .mbtiles, one covering Maryland and another covering Pennsylvania. Both contain the same layers and zoom levels.

If I merge the map and images tables as shown in the patch file above and view the resulting map in mapbox gl js, there is over a hundred mile gap between the top of Maryland and where the map features start rendering again. If I attempt to merge in Virgina it doesn't display at all.

What am I missing?


texts: Finding polygons which are within/intersect other polygons using FME?

texts:
Version: FME Desktop 2014 SP3
I have two shapes with polygons. Now i want to locate those polygons of shape A (polygon.shp) which intersects polygons of Shape B (POLYGONS) (or are within them).
I am using the AreaOnAreaOverlayer and the tester. But 8 features go into the AreaOnAreaOverlay and 22 features come out. The correct number of passes would be 6.
It seems, that the AreaOnAreaOverlayer duplicates some objects from the polygon.shp
Anyway, i did the same workflow to locate points/lines in the polygons with the PointOn/LineOnAreaOverlay Transformer. And it works perfectly.
Anyone any ideas or improvement suggestions for the workbench?
workbench:

The properties of the Tester_3:


texts:
So I am trying to calculate the distance of several points to a coastline, using hub distance (mmqgis plugin) in Qgis Dufour 2.01.
I am using the default coordinate system (WGS84) and I, already, transform the land in nodes in order to not get the centroid distance.

Problem is, I am not allowed to select the units.
Please I need help with this. Normally I use ArcGIS but I realy want start to use freeware.
(see the print-screens)


texts: How to display both scalebar in kilometers and grid in lat/long degrees in Quantum GIS 1.8 Composer?

texts:
How to display both scalebar in kilometres and lat/long degrees and northings/eastings in QGIS 1.8 Composer?

Layer is projected to UTM.


texts: Problem defining the tiling starting point

texts:
We are tiling a image datasets. However, we want to specifically define custom windows. To do this, we are using -te option during warping. The warped output is then tiled. The problem though is that after tiling and checking the BBOX of the first tile, we have noticed that the starting coordinate is shifted as illustrated below:

The blue grid represent the original dataset with cell size (a).
The black grid represent the new dataset with cell size (b).
The cell size of both datasets can be the same or not [(a) .eq. (b) or (a) .ne. (b)].
The red polygon represent the BBOX which fit to the new cell size and tile size.

We would like to start tiling exactly at the upper left corner of the red polygon. How we can force GDAL to clip the raster exactly according to our well defined BBOX?

In some cases, GDAL picks the right BBOX start point, in other cases it doesn't. Is this some how related to the difference in the input and output data resolution (cell size)?

We can't figure out why it is ignoring our definitions. Could someone help shade some light to what is happening here?


texts: Need to make a buffer around a part of a feature, keeping other features attached

texts:
Basic problem:
I have two layers, a layer containing river basin outlines and a layer of wetland outlines and types.

I need to make a buffer around one river basin, and then create 100 random points within a single type of wetlnad within the river basin + buffer.

I guess the first problem is how to create a buffer around just one river basin when the layer contains many (they do not overlap). The second problem is that I need to isolate just one wetland type within the total area contained by the buffer (so that river basin + the buffer around it), so that I can make random points inside that wetland type.

I've been fighting with trying to make a buffer around just that one river basin for days, I'm sure it's possible but I've never used buffers before. How do I do this?

Thanks in advance for any help!

Blue


texts: How is the CONTENT_TYPE attribute populated in attachment tables in ArcGIS?

texts:
When you enable attachments on a table or feature class, there are a number of fields that get created in the attachment table.
ATTACHMETNID, REL_GLOBALID, CONTENT_TYPE, ATT_NAME, DATA_SIZE, DATA, GLOBALID.
In the table I'm looking at, the CONTENT_TYPE field has values such as:
image/jpg
image/tiff
image/png
image/xls
application/zip
application/msword
video/quicktime

It looks like for images, ArcGIS automatically just puts the word image and the extension. Also, if it doesn't know what it is, it just calls it an image (xls in the example above).
What I would like to know, is if there is a list of all possible values that can be stored in the CONTENT_TYPE field. I'm building an integration and will need to map these values to other values.


texts: Zonal Statistics only producing one line of statistics

texts:
I am by no means an expert in ArcGis, but I will try and explain my problem as clearly as possible.

I am analysing forest cover data from the Hansen land-cover dataset ( data https://earthenginepartners.appspot.com/science-2013-global-forest/download_v1.2.html) to estimate the proportion of forest cover around multiple lake surface samples taken from the same lake.

To treat this dataset I needed to mask the water component. This is because the water and the not forest (signified by the black in the map below, with the forest white)were both given the value of 1. Therefore, when originally extracting my data, a not forest value of 20% could have signified that 10% of the data in an individual buffer was represented by water, rather than the targeted not-forest.Image of my map below with the buffers for one data point

I created a series of buffers, using the multiple buffer tool, around each one of my lake surface samples ( 0.1, 0.5, 1-10 km).

To determine the stats for the forest/not forest in each one of these buffers I used the zonal statistics as table tool. This produced a table for my data but only with the statistics from one of the buffer zones.

For using the zonal statistics, I used the multiple buffer shapefile output and the masked landcover map as my raster.

Since I have 15 lake surface samples, I could do each one of the buffer zones independently and extract the data using the statistics tool but this is extremely time-consuming. I notice that when I am selecting the Zone field option, I select the FID option because it is the only option to select that has different values for each individual buffer (Latitude/Longitude and Site name are equal). See below for the options selected

As mentioned, I gave this a test run before I went about to mask the water data and it produced the zonal statistics in the way in which I wanted them. i.e in one table, I would have the zonal statistics for each of my buffers rather than the current situation where I am only getting one statistic for all the buffers.


texts: when make a cross-platform c++ GIS core, how to make the 2d-drawing platform independent?

texts:
i try to develop a c++ no-GUI GIS core(i want the core have no GUI related things, do not use any GUI library)  and  I can figure out how to do other things except the drawing part.  when cope with 2D drawing, it must assign the drawing context, so it could not be platform-independent? For example , in windows, i need get the handle of  DC. So i think always the 2D-drawing is related to platform.

how could i make the drawing things platform- independent? any one have some advises?


texts: ArcPy getPartCount always returns 1 on multipart polygons?

texts:
in this post Why does the method partCount in ArcGIS always give back a value of 1? a problem occured that could easily be reproduced. partCount is always 1! Is it a wrong usage of partCount or did anybody find a workaround for this? How can i access all parts?
i used the following code for testing:

import arcpy
featureclass = r"test_mp"
shapeName = arcpy.Describe(featureclass).shapeFieldName
cursor = arcpy.SearchCursor(featureclass)

for row in cursor:
    shape = row.getValue(shapeName)
    print shape.partCount

Test_mp is a shapefile loaded in arcmap and looks like this:

I also used feature classes from a file gdb with the same result.


texts:
I have a polygon from a select feature event. I can see the polygon using firebug but I'm getting an error saying Type Error: getCentroid is not a function. Can anyone help please?

var poly = event.feature;
polyCentroid = poly.getCentroid();


texts: Collecting multiple entries for single GPS-location with QField

texts:
My goal is to collect data on trees where the same trees are visited multiple times, using QField. While each tree will have a unique ID, we have to use the GPS-coordinates of the trees plotted on a map to locate them. The spatial point layer we have now are basically the locations of those trees.
We have to revisit all of these trees over a period of time, and collect data. In Arc Collector, there is the function 'collect here', but that adds another point with the exact same coordinates. We just want to add another row of data, so that multiple rows correspond to a single location. In other words, we do not want to keep adding points, because the locations do not change, and do not want to overwrite previously recorded data. After a bit of searching, I know this is called one to many relationships, but I have not found out how to create this relationship with an existing spatial layer with QField. I have not been able to find any sources or tutorials on how to do that with an existing point layer.
So in short, we want to use QField so what we can locate our trees. This should be straightforward as we can just load a map of all the tree locations on our devices. Next, we also want to relate the collected data to the specific individual trees without adding another spatial point to our dataset.
Hope I described my problem well, and would be grateful for any feedback.


texts: Using various script forms in Linux QGIS 3.12

texts:
In the last few weeks, I have noticed that various script forms in QGIS (3.12, Linux Mint 19.3) have strange cursor behaviour. Spaces in scripts are unevenly represented on the screen. This is hard to explain but when trying to find where the cursor should be, moving the cursor with mouse or keyboard does not always bring it where I want it to be.
In the first example, the gap between the {1}' and .format is not deliberate. It was placed there by QGIS itself. Trying to edit this expression means the cursor appears in one place on the screen but the edits take place at another point.
In the second example, the gap between the words 'Cloughjordan' and AND is not deliberate.
I hope the attachments can help explain this:


texts: Evenly assigning attributes to layer of points using ArcGIS Desktop?

texts:
I have a layer of point features at fixed locations. One of the fields in my attribute table has two possible values (lets say they are "a" and "b"). How can I modify this attribute as needed in order to have a relatively even geographic distribution of "a" points and "b" points (i.e. neighbors should have alternating values as much as possible)? Picture example is below (picture is misleading, points should be in the same location).

With a small number of points this would be easy to do visually/manually, but I am looking at a layer with up to 4000 points and would like to find a way for ArcMap to do this for me. I have looked through the various Spatial Analyst tools, and the rest of the toolbox, but I can't seem to find the right tool for the job. I'm a novice so GUI-based tools are preferred.


texts: How to use ArcGIS to reverse geocode and get road segment number?

texts: I am now in a project which need to make reverse geocoding , namely ,given the latitude and longitude(assumed that the location is in a street), I want to get the road segment it is located in. What I want is not the road name ,but a road segment Id wich　is a unique identifier of the road segment. As we all know , a road will always consist of several road segments .What I want is the road segment Id, not the road ID, road Id is too coarse for me .So , anybody can give me some suggestions?I am now have the road grid data,including a mxd file and the data files.And I have already installed a arcGIS client and import my data to in(illustrated in the screenshot).Because my project is a java application project, it will be very good if these exists a java api for me to call directly.


texts: Output shortest route shapefile using pgRouting and JSON data

texts:
I'm interested in finding the shortest route between two sets of bike share stations (22/21 stations each) in the city of Glasgow. Note, I need to overlay the final shapefile onto an OSM basemap in QGIS I've decided to use pgRouting to achieve this goal.

So far I have a functional pgAdmin with installed pgRouting and GAUL extensions. As tested by these instructions.

I have also the two datasets in JSON file - example below.

However, I'm having trouble developing a short script that would produce the final shapefile that we're looking for. Any advice on where to start tackling this issue?

My JSON data looks as follows;

{
"type": "FeatureCollection",
  "features": [

{
  "type": "Feature",
  "properties": {
    "id": 8448,
    "title": "Queens Park West",
    "nearest-address": "1 Queen Square",
    "racks": null,
    "ward": "Strathbungo",
    "permanent": true
  },
  "geometry": {
    "type": "Point",
    "coordinates": [
      -4.27246,
      55.83506
    ]
  }
},
{
  "type": "Feature",
  "properties": {
    "id": 8401,
    "title": "Glasgow Central Station",
    "nearest-address": "107 Hope Street",
    "racks": 10,
    "ward": "Anderston / City",
    "permanent": true
  },
  "geometry": {
    "type": "Point",
    "coordinates": [
      -4.2588,
      55.860733
    ]
  }
},
]

}


texts: Rendering 3D map in pgAdmin 4 to view Data?

texts:
I found this error 3D geometrics not rendered in view data (pgAdmin 4).
In GeoDjango I've updated my PointField model with dim=3. After successful migration, I cannot see my data in map.

My Django Model is:

from django.db import models
from django.contrib.gis.db import models as gis_models
from django.db.models import Manager as GeoManager

class Location(models.Model):
    lat_long = gis_models.PointField( srid=4326, null=True, spatial_index=True, geography=True, dim=3)

    class Meta:
        db_table = 'location'


texts: WinBUGs giving 'Illegal memory write error' running under wine

texts:
Ok some I am trying to use Winbugs to do spatial smoothing. I am running r code in R study and using R2WinBUGS to call Wine 1.4 under Mac OSx Mountain Lion. It works ok for some models but for the CAR model I have set up Winbugs seems to run just fine until the very end when I am getting a Quartz X11 Blackbox error -I took a screen grab of the error box

I cannot figure out what is causing this or how to fix it. Anyone come across this before ?


texts:
I'm getting the data, but the formatting is not correct. I'm selecting points, at the same point there may be more than one data. With the foreach the information goes out of the mode:
0102JohnBryan2019-03-122019-04-26image_car1.jpgimage_car2.jpg

It should have a format like this at the same point:
01 John 2019-03-12 image_car1.jpg

02 Bryan 2019-04-26 image_car2.jpg

I tried to put a for loop, but I'm very afraid that I mustn't have applied it well because it hasn't worked for me.
This is the code with the foreach loop:
map.on('click', function (evt) {
    //var feature = map.getFeaturesAtPixel(evt.pixel);
    var feature = map.getFeaturesAtPixel(evt.pixel,
    function(feature, layers) {
        return feature;
    });
    if (feature.length > 0) {
        var one = document.getElementById('code');
        one.innerHTML = '';
        var two = document.getElementById('autorOb');
        two.innerHTML = '';
        var three = document.getElementById('dateOb');
        three.innerHTML = '';
        var four = document.getElementById('ImgOb');
        four.innerHTML = '';
        feature.forEach(function(feature){
            one.innerHTML += feature.get('id_code');
            two.innerHTML += feature.get('autor');
            three.innerHTML += feature.get('obs_date');
            four.innerHTML += feature.get('image');
        })
    }
});

I tried:
for (i=0; i<feature.length; i++){
    one.innerHTML += feature.get('id_code');
    two.innerHTML += feature.get('autor');
    three.innerHTML += feature.get('obs_date');
    four.innerHTML += feature.get('image');
}

But feature is not a function
How can I do it?


texts: Calculating distance between two points with esri.geometry in ArcGIS API for JavaScript?

texts:
The function getLength(point1, point2) should calculate distances between two points.

When I am trying to calculate distance between points having 100 meters between them

p1=new esri.geometry.Point(3997030.6690969253, 7444299.320646087, new esri.SpatialReference({ wkid: 102113 }));
Object
p2=new esri.geometry.Point(3996951.455397143, 7444142.154020177, new esri.SpatialReference({ wkid: 102113 }));
Object
esri.geometry.getLength(p1, p2)
176.00045037719127

I am getting 176 which is wrong. Projection is Web Mercator (WKID 102113).

@Krystian found that getLength uses just Pythagoras theorem to calculate length. So it gives length in projection meters. How to obtain distance in real meters?


texts:
I created a QGIS map, which I was able to edit (right click on layer and select toggle edit, or use button in tool bar).  Having returned to work on the plan, most layers now have this button greyed out.  How can I work through to find what has caused this?

The affected layers are shapefiles - points and lines, based on KML files imported from Google Earth.  I can still edit shapefiles created directly from within QGIS.

After importing I could edit then (e.g move points), and have subsequently added further layers (rasters and shape files) and grouped layers.

I do not know at what point I stopped being able to edit. I have tried editing them within and outwith groups.

The only solution is to save as, new file name, then add the new layer - but I loose properties such as line width.  This is fine for now, but to prevent it happening again, I wonder what went wrong or a better way to fix?

I have used latest GIS (2.0.1-Dufour) from start of the project. Files are stored locally.


texts:
This

CREATE INDEX geography_gdx ON schema.table USING GIST (geog);

works, but

CREATE INDEX geography_gdx ON schema.table USING SPGIST (geog);

gives me

[42704] ERROR: data type geography has no default operator class for access method "spgist" Hint: You must specify an operator class for the index or define a default operator class for the data type.

geog is of type geography. The docs mention an example for geometry but do not explicitly exclude geography.

Questions: Is there a way to use a SPGiST index on geography? Or is that not feasible due to the spherical nature of the data?

Note: PostGIS version

POSTGIS="2.5.0 r16836" [EXTENSION] PGSQL="110" GEOS="3.6.2-CAPI-1.10.2 4d2925d6" PROJ="Rel. 4.9.2, 08 September 2015" GDAL="GDAL 2.2.0, released 2017/04/28" LIBXML="2.9.4" LIBJSON="0.12.1" RASTER


texts:
I am new to QGIS but have some familiarity with other GIS software (namely ArcGIS). I want to merge a number of LiDAR digital elevation model (DEM) tiles (specifically, 30 individual tiles) to create one large mosaic DEM. All the DEMs are .img files downloaded from this site.

From the QGIS home workspace, I go to Raster > Misc. > Merge. I am careful to type appropriate input and output directories, file names, and file extensions. QGIS completes the merging process, but the mosaic is pitch black and it's min/max values are both a very negative value (both the min and max are -3.40282e+35). Obviously, this mosaic isn't quite right. I am uncertain where I go wrong in my procedure.

I have experimented with writing the output file extension as .img and .tif. I have also experimented with the "No data value" option (leaving this option unselected and trying this option selected with a value of 0). These changes do nothing to the change/improve the final output file issue. I have also attempted to use the mosaic feature on just a 2-by-2 chunk of the individual DEM tiles, but this yields in the same erroneous result.

I am using QGIS 2.4-Chugiak on a Mac running OS X 10.9.4.


texts: Change symbology in the legend- QGIS 2.14

texts:
I work with a point layer. When i create a buffer for the point layer, i get this result:

My problem is that instead of circle buffer in the legend, i get a rectangle.
I red this in order, maybe, to find an answer, but i didn't found:

Is it possible to change legend symbols in the QGIS print composer legend?

I can resolve it by:

PrintScreen the layer panel and paste it the map composer as a jpg image.
create a fictive layer that contains a circle, and represent it in the legend. The original layer will be removed from legend but will remain in the map extent.

How can i resolve this symbology problem with an elegant and automatic solution?


texts:
I need to add different boolean rasters of the distribution of some species, since we need to obtain a single file that shows the locations where there are more than one species occurring.

To do that, I rasterized all of the shapefiles showing the distribution and then reclassified them to obtain the boolean rasters.

The problem is, now that I'm trying to add them all together using rastercalc, there are files with different extends even though I clipped them with the same shapefile (the final single file -the one that I obtain by adding all of the booleans, is all cut and incomplete with null values)...

How can I change them to the same extent in order to obtain the complete map?

the first picture is the shapefile I used to clip the other shapefiles (this is the polygon of the state I live in).

The second picture shows an example of one boolean images with the raster of the shape I clipped them (the state's shape)

The third one shows the last raster with all of the boolean rasters together... If you compare images 2 and 3, you will see there is lots of missing data


texts: CSV projection not aligned with QGIS OSMap

texts:
I have a CSV file with lat and long coordinates of several points. The coordinates are expressed in the following format: LAT -35,019470 LON -58,427770 (which is the format used in google maps to obtain the correct position of the points).

I import the CSV as delimited text layer, use the EPSG:4326 coordinate system for both the layer and the OS Map layer, use the comma as decimal separator and semicolon as field separator (the sample data looks fine), use LON for X and LAT for Y.

But when I add the layer, all the points are rendered in a very small cluster near Africa (I assume near to the 0,0 of the coordinate system). The shape of the points look ok, but not the scale nor the position.

I go to where one of my known points should be, and see that OS Map has a different coordinate format:

I have tried everything but cannot resolve this (clearly I have very little experience in GIS).


texts: I'd like to override the default style of Leaflet 1.0.0 tooltips, especially the bubble/frame. I don't see any options or methods for this. How do I hook into the CSS? I want to change layers individually, so I need to select each layer's tooltips individually with CSS.