texts: Geoserver: Adding a WFS Service access rule prevents all users from performing WFS requests

texts:
I need to restrict access to WFS services on admins only, so in the Services Access Rules list I add the following rule

wfs.*=ADMIN

Then I logged in as an ADMIN, and try to excute one of the WFS requests from the demos, but the request return asking me for login credentials.
I tried login with the root user, the same problem happens !!

Here are my security configurations:

config.xml:

<security>
  <roleServiceName>default</roleServiceName>
  <authProviderNames>
    <string>default</string>
  </authProviderNames>
  <configPasswordEncrypterName>pbePasswordEncoder</configPasswordEncrypterName>
  <encryptingUrlParams>false</encryptingUrlParams>
  <filterChain>
    <filters name="web" class="org.geoserver.security.HtmlLoginFilterChain" interceptorName="interceptor" exceptionTranslationName="exception" path="/web/**,/gwc/rest/web/**,/,/wcs*,/wfs*" disabled="false" allowSessionCreation="true" ssl="false" matchHTTPMethod="false">
      <filter>rememberme</filter>
      <filter>form</filter>
      <filter>anonymous</filter>
    </filters>
    <filters name="webLogin" class="org.geoserver.security.ConstantFilterChain" path="/j_spring_security_check,/j_spring_security_check/" disabled="false" allowSessionCreation="true" ssl="false" matchHTTPMethod="false">
      <filter>form</filter>
    </filters>
    <filters name="webLogout" class="org.geoserver.security.LogoutFilterChain" path="/j_spring_security_logout,/j_spring_security_logout/" disabled="false" allowSessionCreation="false" ssl="false" matchHTTPMethod="false">
      <filter>formLogout</filter>
    </filters>
    <filters name="rest" class="org.geoserver.security.ServiceLoginFilterChain" interceptorName="restInterceptor" exceptionTranslationName="exception" path="/rest/**" disabled="false" allowSessionCreation="false" ssl="false" matchHTTPMethod="false">
      <filter>basic</filter>
    </filters>
    <filters name="gwc" class="org.geoserver.security.ServiceLoginFilterChain" interceptorName="restInterceptor" exceptionTranslationName="exception" path="/gwc/rest/**" disabled="false" allowSessionCreation="false" ssl="false" matchHTTPMethod="false">
      <filter>basic</filter>
    </filters>
    <filters name="default" class="org.geoserver.security.ServiceLoginFilterChain" interceptorName="interceptor" exceptionTranslationName="exception" path="/**" disabled="false" allowSessionCreation="false" ssl="false" matchHTTPMethod="false">
      <filter>basic</filter>
    </filters>
  </filterChain>
  <rememberMeService>
    <className>org.geoserver.security.rememberme.GeoServerTokenBasedRememberMeServices</className>
    <key>geoserver</key>
  </rememberMeService>
  <bruteForcePrevention>
    <enabled>false</enabled>
    <minDelaySeconds>1</minDelaySeconds>
    <maxDelaySeconds>5</maxDelaySeconds>
    <maxBlockedThreads>100</maxBlockedThreads>
    <whitelistedMasks>
      <string>127.0.0.1</string>
    </whitelistedMasks>
  </bruteForcePrevention>
</security>

layers.properties:

*.*.a=ADMIN
mode=HIDE

services.properties:

*.*=*
wfs.*=ADMIN


texts: Identify multiple polylines in one polygon (ArcGIS)

texts:
I have coastal city polygons, and one polyline with a numeric attribute (X) that I am interested in, which ranges from 1-9. One city can have diverse values of X. My final goal is to have one table, with the cities in one column, and all their respective X values (1-9), in another column, or in multiple columns.
An example image of the diverse occurrence of X in one city


texts: In QGIS 3, is the vector -> openstreet map conversion missing?

texts:
I'm trying to convert osm to shapefile but I can't find the
Vector > OpenStreetMap > Import Topology from XML


texts: Gdalwarp fails to properly reproject to custom projection


texts: Seeking QGIS plugin with functions like ArcScan?

texts:
Is there a QGIS plugin which does raster scanning, like ArcScan.

Typical QGIS Vectorization returns very bad outputs that have thousands of 'islands'.

I require a clean and efficient vectorization process.


texts: QGIS processing scripts - restrict vector input to geometry type

texts:
In QGIS processing scripts we define input vector layers by

##inputlayer=vector

wich in the gui generates a drop down list from what the user can select one of all available layers.

Normaly, processing is defined for only one distinct geometry type, let's say Point. If the project contains of a great bunch of, let's say Line Layers, we have all these Line layers in a dropdown, where only the Point layer should be selectable.

So the question is:

In QGIS processing scripts, is there a way to restrict vector input to certain geometry type (sth. like ##input=vector point)?


texts: Joining lines in MapInfo that won't be split by disaggregate?

texts:
I have just run a disaggregation a .tab containing just lines and found I have a few with duplicate IDs. However when I zoom in these lines appear to be connected. Is there any way to join these together so they won't be split up next time it is disaggregated?

Thanks,
Alan


texts: Output file from Point Sampling Tool plugin returns data but no sample ID using QGIS

texts:
I have sampling points in QGIS which all have a unique ID, and I'm trying to collect various geographic and climate data for those points from a variety of sources. Although the source raster data varies depending on what I'm measuring, I'm always using the Point Sampling Tool plugin to collect the data. The data are correct, but there is never an ID column in the output.

Does anyone know how to fix this?


texts: QGIS and GDB issue with state published data?

texts:
QGIS version 2.0.1-Dufour

I am new to QGIS.

I'm working on a pet project and thus far I have been working with Shapefiles (which QGIS handles just fine).
Yet, one of the states I'm pulling data from is utilizing directory GDB zipfile and it seems as if QGIS is confused on the data.

Now, I new to GDB and it's workings so this could be just me.
Data source : https://www.nevadadot.com/About_NDOT/NDOT_Divisions/Engineering/Location/Documents/NV_ROADS_gdb.aspx

when looking at this data through QGIS, and filtering and selecting a known value as in SURFACE_TYPE, it is not resolving it correctly.

SURFACE_TYPE should have the following values:

1 - UNIMPROVED
2 - IMPROVED
3 - PAVED

I do not know if this is due to QGIS and it's tools or how the data is structured.

I have talked with the data owner and they are a state agency that is low on man power.
I'd like to see if we can't help them make this data compatible or find out why QGIS is not reading the data correctly.

if Shapefiles are going to be a thing of the past and GDB is replacing it, I know the open source community has it's work cut out.


texts:
I want to change the date format with different date formats in the attribute table to the one format which is fitting for the Time manager. Does it work with the Field Calculator?
For example 12.August 2020 and I want to have 2020-08-12. Does anyone know how this works?


texts: Calculate field based on most frequently occuring text/value in other fields in attribute table (ArcGIS)

texts:
I was wondering if anyone knows if it is possible to calculate a field based on the most frequently occurring value in other fields.

What I have is 5 fields with crop information over 5 consecutive years. What I want is to create a new field with the most frequently occurring crop over that 5 year period.

So for example if there were fields for Crop 2008, Crop 2009, Crop 2010, Crop 2011 and Crop 2012 with respective crop types for the first polygon as Winter Wheat, Spring Barley, Winter Barley, Winter Wheat and Grass the function would return Winter Wheat because it appears twice.

I am aware there is a function called Counter in the Collections package that can do this for a list but I'm unsure how this would work within the arcpy field calculation tool?

Likewise there also needs to be a consideration for values that tie i.e. appear the same amount of times across the 5 fields.

I can't seem to find anything else from my searching about.

I'm using ArcGIS 10 and hoping to calculate fields in the python window.

Apologies for not providing any attempts at coding this so far, I really am stumped on this one!


texts: How can I avoid displacements in exported JPEGS from QGIS 2.2?

texts:
I observed a small but annoying problem for a long time now. I have to design maps/plans of survey areas for work including maps where a satellite image is printed under a vector-layer showing the outlines of the single survey fields. For the satellite images I use the build in Google Satellite layer from the OpenLayers plugin.

In QGIS everything looks OK, but when I export a JPEG or PDF-File from QGIS there is often a significant displacement of the Satellite Layer.

I tried to solve this by setting different Spatial reference systems or using Bing Satellite instead of Google, but it seems to have nothing to do with that. I found out, that it sometimes helps to set the plan to another scale before exporting. But this is often to big or doesn't help.

Anyone ever had this problem and/or know how to get rid of it?


texts:
I am using windows 7, QGIS version 2.18.19. I tried the following standalone python script.

##Testing=name

drawingdxf=file

cleanf=output vector

outputs_GRASS7V_IN_DXF_1=processing.runalg('grass7:v.in.dxf',drawingdxf,'1',True,False,True,False,False,True,['200000.000000,700000.000000,200000.000000,700000.000000'],0,None)
outputs_GRASS7V_CLEAN_1=processing.runalg('grass7:v.clean', outputs_GRASS7V_IN_DXF_1['output'],1,0.1,['200000.000000,700000.000000,200000.000000,700000.000000'],-1.0,0.0001,cleanf,None)

When I am running the program, following error was shown.

""NoneType' object has no attribute 'getitem See log for more detail"."

Can anyone help me solve this problem?


texts:
I'm very new to mapping.

I have a bunch of ecw files and also xml files with their mapping information.

I'm trying to load them in mapwindow but am having no success.

Can this be done?


texts:
I am trying to interpolate a Vector Layer in order to have as many waypoints as possible. I am doing it with the Interpolation Plugin, but I don't know what to do with the Raster Layer generated (I was expecting as output an other Vector Layer with more waypoints than the original one).

In the figure below you can see what am I trying to iterpolate:

So, the layer "test2" has two attributes (one for each route of the map). I don't know if it is relevant, but when I am in the Interpolation Window I am not able to select any "Interpolation Attribute":

What output format should I choose if I want to obtain a "copy" of test2 but with interpolated waypoints.


texts:
I am trying to view customised metadata in ArcGIS.

I found ArcGIS Metadata Toolkit 10.5 in ARCGIS Online and  created custom metadata page. That thing I am able to see in item description edit tab (ArcGIS CLIENT Metadata) shown in fig.

After editing customised things and saved but the information is not populated in item Description.

How can I get this information in description?


texts: Closest Point Pairs to determine grid resolution

texts:
I'm reading Hengl's (2006) Finding the Right Pixel Size.
In it, among many different suggested approaches, he suggests using a grid resolution where > 95% of the closest point pairs do no fall into the same pixel:

  We can be even more strict and look for a grid resolution where >95%
  of closest point pairs do not fall into the same pixel. This can be
  done using some well known point pattern analysis algorithms such as
  the one described in Boots and Getis (1988) and Rowlingson and Diggle
  (1993). We first need to derive the probability of finding the first
  point pair at different distances and for a given data set. We can
  then select the 5% probability smallest distance.

I am confused about the definition of closest point pairs (plural). In all the definitions I have read, the closest point pair is the ONE pair of points that have the smallest distance between them in a dataset. How could a dataset have multiple closest point pairs (unless they had the exact same distance between them)? Or is something else meant by closest point pairs? Would it be the distance between each point and the point closest to it?


texts: Splitting string column into 2 columns in Python?

texts:
I have a csv file and this is the structure of that file. It has only one column with number of strings. I want to split this one column into 2 columns at the character \.

How do I do this in Python?

CSV File structured as follows:

EMI_EMF\Recorded_measurement_sites_20120305
Cultural_Resources\Cultural_Survey_20110214
Cultural_Resources\ARS_archaeological_boundaries
Cultural_Resources\ARS_archaeological_sites
Cultural_Resources\Arch_Sites_int_20130608
Cultural_Resources\Records_Search_Oct2012_poly_onAlignment_20120410
Cultural_Resources\ARS_archaeological_boundaries_int_20120410
Cultural_Resources\MB_Cultural_APE_20120410
Cultural_Resources\BP_ENV_Align_20120410_DISS
Cultural_Resources\BP_JR_9


texts: Upgrading qgis in debian jessie (linux)?

texts:
I want to upgrade qgis 2.6 to qgis 2.8 in linux (debian jessie). I did:

sudo apt-get update
sudo aptitude full-upgrade

And I get this error:

Até aqui tudo bem...

Processing triggers for hicolor-icon-theme (0.13-1) ...
Setting up qgis-providers (1:2.9.0+git20150224+4629205+13jessie) ...
/usr/lib/qgis/crssync: error while loading shared libraries: libqgis_core.so.2.9.0: cannot open shared object file: No such file or directory
dpkg: error processing package qgis-providers (--configure):
 subprocess installed post-installation script returned error exit status 127
Setting up qgis-common (1:2.9.0+git20150224+4629205+13jessie) ...
dpkg: dependency problems prevent configuration of qgis:
 qgis depends on qgis-providers (= 1:2.9.0+git20150224+4629205+13jessie); however:
  Package qgis-providers is not configured yet.

dpkg: error processing package qgis (--configure):
 dependency problems - leaving unconfigured
Setting up osgearth-data (2.5.0+dfsg-2) ...
Setting up qgis-plugin-globe-common (1:2.9.0+git20150224+4629205+13jessie) ...
dpkg: dependency problems prevent configuration of qgis-plugin-globe:
 qgis-plugin-globe depends on qgis (= 1:2.9.0+git20150224+4629205+13jessie); however:
  Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-globe (--configure):
 dependency problems - leaving unconfigured
Setting up qgis-plugin-grass-common (1:2.9.0+git20150224+4629205+13jessie) ...
dpkg: dependency problems prevent configuration of qgis-plugin-grass:
 qgis-plugin-grass depends on qgis (= 1:2.9.0+git20150224+4629205+13jessie); however:
  Package qgis is not configured yet.

dpkg: error processing package qgis-plugin-grass (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 qgis-providers
 qgis
 qgis-plugin-globe
 qgis-plugin-grass
E: Sub-process /usr/bin/dpkg returned an error code (1)

I found the solution. The error was in qgis providers. So I uninstall qgis providers (sudo apt-get remove --auto-remove qgis-providers) and I install qgis without problems.


texts: In what format does a WMS GetFeatureInfo return data?

texts:
In what format does a WMS GetFeatureInfo response return its data?

How can you get particular data from an HTML table using OpenLayers?


texts: Read an external HTML file/website or call Web Service from Google Earth Engine using JavaScript

texts:
I need to call either an HTML page from the web based tool or be able to comunicate with a web service. I tried using the function XMLHttpRequest(). However, the console prints the error "XMLHttpRequest" is not defined in this scope. Is it possible to do what I'm trying to do?

The reason for the mentioned process is because I need to get the contents from a weather station's webpage. From this webpage, there are a few tables I would process to get daily values of some things I can't get from Earth Engine's list of satellites.

I found a couple of links which both go over what I'm trying to do in JavaScript, JQuery, and AJAX. However, from my testing, none of the methods worked in Earth Engine.

https://www.freecodecamp.org/news/here-is-the-most-popular-ways-to-make-an-http-request-in-javascript-954ce8c95aaa/

https://stackoverflow.com/questions/3535055/load-html-file-contents-to-div-without-the-use-of-iframes/3535126


texts: So I made a rookie mistake. I created a point feature class in ArcMap 10.6 without assigning a coordinate system. I put in a bunch of points and then went to export it and realized my mistake. I tried defining the projection but its projection is unknown so that doesn't do anything and I tried project(data management) but I get 000517 The coordinate system is not defined for the input dataset. Is there any way to salvage my mistake?


texts:
I am testing out Qgis (3.0) and have been unable to figure out how to reload a processed layer.

For example I have a simple attribute query from some land use zonings where land use = 'PR'.   The original query works great but when the project is saved and reopened, the results layer appears in the layers list but is empty.

Since it has been stored in the project (.qgs) file, I'm assuming there must be some way to rerun/reload/repopulate it without having to recreate the query each time, but I have obviously missed that.

Where should I be looking?


texts: Creating one TIN for each iterated point and line dataset from gdb using ModelBuilder?

texts:
I need to create a TIN for every line/point dataset out of two geodatabeses. The point and line datasets have the same ending name.

This is my approach how to build up the model:

Am I missing something in the process of creating a TIN for each iterated feature?


texts: Adding field to table and assigning layer name for all records?

texts:
I have 138 layers and I like to add a field which contain the layer name for all records for each table.

Is there any way to automate this process instead of doing it layer by layer?

I have a bike station feature class (point) and bus stations feature class (point) I like to know that, in the radius of 500 meter of every bike station how many bus stations I have and I like to have them separately based on bike station Id.

For example, which bus stations (bus station id) are in the 500 meter of bike stations (bike station id). Problem: the bus and bike stations table have no fields in common. I first buffered the bike stations by 500m and then clipped the bus stations based on buffered layer but the clipped layer does not separate the bus stations based on bike station id!


texts: pgRouting not importing 'to_cost' values for osm2pgrouting?

texts:
I am struggling with the latest pgrouting & osm2pgrouting V2.

The toolchain is installed on my server without any issues, I tried to install it from github and compile it - and I tried it from a stable repo via aptitude as well. Both show the same problems.

I try to import a chunk of OSM data into my routing DB. The import runs smooth and it looks very promising, but there is no 'to_cost' value filled in. I did calculate it once by hand, but I would like to see the original data from the import. What bothers me most, is thhat after a quick glimpse on the source code I noticed that osm2pgrouting does not do that.

"COPY " + tables_prefix + "ways(gid, class_id, length, x1, y1, x2, y2, osm_id, the_geom, reverse_cost, maxspeed_forward, maxspeed_backward, priority, name) FROM STDIN"

Where is this 'to_cost' assignment?


texts:
I'm a newbie and I'd like to realize a project based on a local OSM with postgis +mapnik +angular and leaflet.

The project requirement is :

An ACME company owns geographically distributed equipment which has to be serviced on expiry date. They already have a postgres "ACME" database with a table "equipment" {eqID,eqcustomerID eqNameid, eqAddress, eqServiceExpiryDate}.
ACME database (or just a table "equipment") should be integrated into
a GIS system built on a local openstreetmap server by using postgis and mapnik and have a capability to display as markers:

all devices which servicing date is expired
all devices of a specified customer presented by different markers which depends on expire date.
all devices in a specified city/town

So far I got working local mapnik/postgresql server with osm data imported into the postgis database and tested with leaflet.

I know that "equipment" table should be "expanded" by long/lat values. However, I have no idea where I can put equipment data from postgres database in local osm tables and how to present them....

Any help is welcome.


texts: How to examine pixel size (degree or length) under different projection in QGIS?

texts: In ArcGis, we can check x y size of each pixel in raster property. How to check in Qgis?


texts:
I have a few linestrings that together form a long line. The start- and endpoints of the linestrings are equal with their direct neighbour, but when tested the ST_Distance between any 2 lines is like 1.0x10^-11.

This seems to be the known issue with encoding floats. They are the same but not the same.

However when I update 2 neighbouring lines with their existing Astext coordinates they are encoding by the same algorithm and their distance is 0. But then they have a small distance with their outside neighbours (that are not updated this way).

What I want to do is snap a line left and right with its neighbours so the ST_Distance with both neighbours is 0. I think ST_Snap only moves a geometry to another geometry. That is not what I want. I only want the start- and endpoint of a line to snap to the neighbour. The rest of the line should stay where it is.

How do I do that?

With the given answer I fixed both ends of the conflicting line like this:

update network set the_geom = ST_RemovePoint(the_geom, (select st_npoints(the_geom)-1 from network where gid=6909)) where gid=6909;
update network set the_geom = ST_AddPoint(the_geom, (select st_endpoint(the_geom) from network where gid=6123), (select st_npoints(the_geom) from network where gid=6909)) where gid=6909;
update network set the_geom = ST_RemovePoint(the_geom, 0) where gid=6055;
update network set the_geom = ST_AddPoint(the_geom, (select st_startpoint(the_geom) from network where gid=6909), 0) where gid=6055;


texts:
In PostGIS 3.1 the function ST_SquareGrid(size, bounds) generates a grid. The documentation for the functionality is available in the docs. Understanding how this is done is not clear from the documentation.
I want to create a grid which overlaps with a polygon, in my case a country. The grid size should be in 1:n size of decimal grids. I plan on building grids according to a system called quarter degree grid cells.

The reason for this is that I am currently trying to shift most of the processing of this process to PostGIS rather than having to do the processing on FME. By pushing the processing to PostGIS I get less information back and forth between the database and FME.
How can I utilise this PostGIS functionality towards creating a relevant grid?


texts:
I have created numerous databases from a base source and merely added and removed various layers then saved as a new project. There were more layers common than not in common in each project.
However as i am now branching in QGIS Cloud for some reason in the upload panel it is saying there are layers there that are not in the layers panel.
Is there a purge function (similar to that of autocad).
This question is essentially the same as Seeking purge function to remove layers from qgs file which are not present in Layers pane of QGIS?


texts: Natural Earth: How to get the position of all provinces that belong to a state

texts:
This question is about Natural earth 1:10 states and provinces.shp file.  I'm using ogr2ogr and want to know the name of the id i need to pass  . In purpose of pulling out the right states regions.

I've use couple  of properties name that didn't work (-where "adm0_a3 IN ('MLI')" \ , -where "iso_a2 = 'ML'" \ ). Can anyone help me i'm running out of places to find the answer.


texts: Point Data to journey linestrings - PostGIS

texts:
I have roughly 4,000,000 points of GPS data stored in a PostgreSQL/PostGIS database. The points are from multiple vehicles over the last 2 years.

Sample:

Msgid   Time                   Speed    Vehicle_ID  Geom
1       2017-01-01 07:48:00    48       V1          (valid geom point)
2       2017-01-01 07:49:00    42       V2          “”
3       2017-01-01 07:50:00    2        V1          “”
4       2017-01-01 07:49:00    15       V2          “”
5       2017-01-02 08:49:00    0        V3          “”
6       2017-01-02 08:50:00    23       V3          “”

I need to separate the points into journeys and create a linestring between them.
My first thoughts are to try and base this on time and distance. Something along the lines of partitioning it by the Vehicle_ID, ordering it by time and ranking it. This is to account for the vehicle sending its location approximately every 30 seconds, even when it returns to its base location. If it doesn’t have signal at a point in time, it will just skip sending it, so throughout the data there is gaps of 1-2 minutes. Also when it is turned off at base location it stops sending a signal. Distance needs to be factored in as the vehicles are left on for large amounts of time, so can be pinging within a 20 m radius and I don’t want the linestring to continue at this point.
Ideally the query would only create a new journey when it doesn’t send a signal for 3-5+ minutes and doesn’t move more than 20 metres. I’m unsure of the parameters until I can view some results.

Is there a way of putting the distance and time filters within a rank function?

Or would it be wise to try and calculate a speed and base it on that?

And radial distance?


texts: Change dynamically created layer's minZoom after render

texts:
I want to change the minzoom of dynamically created layer after the rendering.

I tried couple of things:

map.getLayer('my_custom_layer'); // this gets the layer

map.getLayer('my_custom_layer').minzoom = 5;
map.getLayer('my_custom_layer').setMinZoom(5);

map.setPaintProperty('my_custom_layer', 'minzoom', 5); // couldn't make this work at all.

Is it possible to change the layer's zoom programatically after it's created and rendered?


texts:
I'm a complete novice to the world of GIS. I'm involved with a project which requires LIDAR data to be imported into CAD software.

When I go to the geostore, which contains LIDAR survey data published by the UK government, I find that the DSM and DTM downloads give a list of files with a .asc file type.

I found that these could be opened easily enough with notepad. When opened, there are a huge number of rows and columns.

I need to know what a single point is (i.e. what is x, y and z). If I can understand what is going on, I can find a way to change the data so it is a list of coordinates and that way, I can import it into CAD data.

Another thing I would like to know is how to actually use the data to pick a location. The area I have shown in my example was downloaded from a large area (around 100 square kilometers, if I've understood map scales correctly). I'd like to be able to know what areas, specifically, that the numbers are defining.

I have found an online link that has described the format to some extent, but I still need things dumbed down a bit more.


texts: Convert lists of coordinates to multiple lines based on ID at start of each block of coordinates

texts:
I have a list of XY coordinates along multiple lines. The lines are separated by a single identifier at the start of each block of coordinates. How do I convert this to multiple lines linking the identifier to the lines in R so that I can output them as a shapefile? The problem is in parsing the data to link the ID with the subsequent coordinates.

The data is in the following format:

ID1
3285.48 -63.32
3285.14 -64.14
3284.67 -63.56
3285.00 -62.77
ID2
3299.84 -76.82
3299.25 -75.38
3299.96 -75.76
ID3
3299.76 -86.92
3299.77 -86.89
3299.76 -87.04
3299.76 -87.23
3299.74 -87.25
3299.68 -87.22
3299.68 -87.11


texts: How can i fix the dock widget to the the Qgis window using python

texts: I am creating a dock widget for my plugin and i want my widget to be fixed to the Qgis window. How can i do that using python programming?


texts: How to calculate the area of raster catchment zones?

texts: I have a raster with irregular shape and I need to calculate the area. The "classic" method (Vectorize+field calculator) didn't work, it makes thousands of polygons. Any ideas?


texts:
I need the exact values of longitude and latitude to do further calculations with those. Best case would be to have a list with all those dates and do the calculation with this.

I exported from OpenStreetMap to QGIS as a shapefile.
Although the coordinates in the bottom bar are displayed on the map when you click on a point, there is no table (via attribute table) in which all coordinates are summarized.


texts: How to change the color of vector layer of QGIS in api?

texts:
I'm using QGIS-2.4.0 api to develop app in C++. When I add a vector layer to the app, the vector map's color would be random. I used QgsFeatureRendererV2 to get the geometry type of the layer, my provider name is ogr.
My question is: how to set a solid color to the layer?


texts:
What I want to do:

I want to get road graph (ways and their relations) from OSM file to write my own routing program.

What I tried to do:

I tried to use OSMtoRoadGraph, but it returns me a UnicodeDecodeError

(base) C:\Windows\system32>python
C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\run.py -f
C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\data\siberian-fed-district-latest.osm_01_01.osm -n c
starting convert_osm_to_roadgraph
selected network type: car
accepted highway tags: {'pedestrian': {'path', 'secondary_link', 'footway', 'secondary', 'tertiary_link', 'pedestrian', 'track', 'primary', 'tertiary', 'primary_link', 'unclassified', 'road', 'steps', 'service', 'living_street', 'residential'}, 'bicycle': {'secondary_link', 'secondary', 'tertiary_link', 'cycleway', 'track', 'primary', 'tertiary', 'primary_link', 'unclassified', 'road', 'path', 'service', 'living_street', 'residential'}, 'car': {'secondary_link', 'motorway', 'motorway_link', 'secondary', 'trunk', 'tertiary_link', 'trunk_link', 'primary', 'tertiary', 'primary_link', 'unclassified', 'service', 'living_street', 'residential'}}
opening file: C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\data\siberian-fed-district-latest.osm_01_01.osm
starting read_file
starting _read_ways
0%..Traceback (most recent call last):
File "C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\run.py", line 65, in <module>
convert_osm_to_roadgraph(filename, network_type, options)
File "C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\utils\timer.py", line 11, in wrapper
result = function(*args, **kwargs)
File "C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\run.py", line 25, in convert_osm_to_roadgraph
nodes, ways = osm.read_osm.read_file(filename, configuration)
File "C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\utils\timer.py", line 11, in wrapper
result = function(*args, **kwargs)
File "C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\osm\read_osm.py", line 11, in read_file
ways, found_node_ids = _read_ways(PercentageFile(osm_filename), parserHelper)
File "C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\utils\timer.py", line 11, in wrapper
result = function(*args, **kwargs)
File "C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\osm\read_osm.py", line 23, in _read_ways
parser.parse(osm_file)
File "C:\ProgramData\Anaconda3\lib\xml\sax\expatreader.py", line 111, in parse
xmlreader.IncrementalParser.parse(self, source)
File "C:\ProgramData\Anaconda3\lib\xml\sax\xmlreader.py", line 123, in parse
buffer = file.read(self._bufsize)
File "C:\Users\Horseman.mini\Desktop\OsmToRoadGraph-master\osm\xml_handler.py", line 25, in read
data = self.f.read(size)
File "C:\ProgramData\Anaconda3\lib\encodings\cp1251.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 993: character maps to <undefined>

I think the problem is that OSM uses utf-8 format, but I see in the error this line at the very end "C:\ProgramData\Anaconda3\lib\encodings\cp1251.py", line 23, in decode so unicode error is predictable. If no ways to solve unicode problem or any ways to fix this problem using this soft - I haven't found any other ways to import roads graph from OSM.


texts: Adding data to Geodjango Polygon object (and have it carry through operations)

texts:
I would like to add extra information (such as speed and direction) to the base Polygon class and I'd like to maintain that data when performing operations such as convex_hull (extra data shouldn't need to change) or cascaded_union/unary_union (need some functionality to merge the extra data - simple average is probably good enough).

My first thought was that I would subclass the django.contrib.gis.geos. Polygon class.

I initially tried that but even when I create an instance of my new class, I still seem to get back the base Polygon class. I'm also not clear on how to handle the merging of the extra data.

from django.contrib.gis.geos import Polygon

class ExtendedPolygon( Polygon ):
    '''
    extension of Polygon to add altitude, direction and speed
    '''
    def __init__( self, point_list ):
        super( ExtendedPolygon, self).__init__( point_list )
        self._altitude = 0
        self._direction = 0
        self._speed = 0

    def __str__(self):
        return "EXT_POLYGON - alt: %d, dir: %d, speed: %d - %s" %    (self._altitude, self._direction, self._speed, self.wkt )

However, when I try this, even though I instantiate an ExtendedPolygon, I get back the base class.  My attributes are there, but printing it doesn't work as expected:

>>> from extpoly import *
>>> points = ((-75.1, 34.3), (-74.9, 34.3), (-74.9, 34.4), (-75.1, 34.4), (-75.1, 34.3))
>>> ex = ExtendedPolygon( points )
>>> ex
<Polygon object at 0xff6f1144L>
>>> type(ex)
<class 'django.contrib.gis.geos.polygon.Polygon'>
>>> print ex
POLYGON ((-75.09999999999999 34.3, -74.90000000000001 34.3, -74.90000000000001 34.4, -75.09999999999999 34.4, -75.09999999999999 34.3))

This also doesn't handle the case of carrying the extra data through the convex_hull or cascaded_union operation either.

Is sub-classing Polygon the right way to do this, or is there a better way?  If it is the right way, can anyone point me to an example?


texts: QGIS 2.18.9 on mac raster merge is interminable

texts:
User details first: OSX 10.11.6 using QGIS 2.18.9 with kyngchaos GDAL 2.1.3 and all other standard frameworks, dependencies, and plugins (e.g., MrSID).

I want to merge five high-res .jp2 files using QGIS via Raster > Misc > Merge, but after several attempts lasting several hours, the tool appears to make no progress whatsoever. (The longest attempt was over five hours with no other user processes.) There doesn't appear to be any activity on Activity Monitor either. I've tried merging all five files at once, and I've tried merging just two, but I get the same results. However, if I call gdal_merge.py from Terminal or iTerm, the tool works as expected -- aside from the fact the image is flipped. Using Raster > Misc > Information works as expected.

I re-installed all dependencies, frameworks, plugins, and QGIS itself, and I've altered the paths incorrectly set by SQLite (this response), and I've matched the paths in the QGIS advanced settings editor, and still the process is interminable. I know there are alternatives within QGIS to Raster > Misc > Merge, but why is this method interminable while calling it from Terminal works?


texts: How to display a table from a polygon on Google Earth

texts:
I have a polygon that I am working on in ArcMap 10.3. It has an attribute table with about 300 some columns. I am having trouble displaying the whole attribute table on Google Earth when I export the polygon layer to kml.

When I click on the polygon in Google Earth, only the last column of data will be displayed.

Any tips or suggestions on how get the whole table to be displayed?

The photo below shows how only only one column but all the row fields of the table are displayed


texts: Set feature styles dynamically in leaflet

texts:
I am trying to make a leaflet layer that will listen to a slider bar and change the colour of all its features based on if a property of each feature meets a certain criterion.

I begin by getting the event:

$( "#time-slider-bar" ).on("slidechange", function() {

and then I try to change the style on each feature like so:

        thresholdLayer.eachLayer(function (layer) {

            var year = $("#time-slider-bar").slider("option", "value");

            console.log("_yr"+year);
            console.log(layer.feature.properties["_yr"+year]);

            return layer.setStyle(function(layer) {

                console.log("does not print");

                if (layer.feature.properties["_yr"+year] > 100) {
                    return {
                        fillColor: "#ff0000",
                        fillOpacity: 1
                    };
                } else {
                    return {
                        fillOpacity: 0
                    };
                }
            })
        })

But then nothing happens.  The console.log("does not print"); statement does just that - doesn't print.  For some reason, layer.setStyle is not executing.  Am I not using this function correctly? I am following a previous example where I changed an icon on a different layer:

        markerLayer.eachLayer(function (layer) {
            return layer.setIcon(L.icon({
                iconUrl: 'svg/' + $("#time-slider-bar").slider("option", "value") + '/' + layer.feature.properties.name + '.svg'
            }))
        });

Which works just fine.


texts: Setting the map projection in the flex API to an overlay layer

texts: I'd like to use a basemap containing world map data as a backdrop to some point and outline data that I'm hosting in ArcGIS server in the ESRI Flex API, but I would like the map control to share a WKID with my data, so I don't need to reproject it on every operation. However, the Map control seems to want a) the layers to be displayed with the first being on the bottom, and b) the first layer to be the layer that defines the WKID. Is there a good way to work around these contraints?


texts: Do Data Driven Pages enable PDF merging without losing layers?

texts:
I'm setting up a mapbook with layered PDFs, what I have is the first map showing the extent of the grid (an overview map) with the rest of the maps showing each grid. It has been annoying to set up an overview map on the same data driven mxd, it would be much easier to export it as a seperate pdf and then merge it with the rest of the mapbook, but this loses layered pdf.

Anyway, so I have the extent and the rest of the mapbook set up - however I have a couple of issues still. I don't know how to set the symbology between the extent map and the grid maps (i.e road label with a font of 200 is huge on my grid maps). Another issue is the scale bar is tiny for the extent map and huge for the grid maps - I need it to fit both scale types. Another issue is if I put in annotations for the extent map to get around labelling - I won't be able to hide it in the grid maps. Also I am unable to hide grids for the extent map (they are too small and I don't want to show them).

So ultimately it is an issue of having the same labelling for two map types with different scales on the same mxd - if I could somehow merge the PDFs without losing the layered pdf function I could do this much easier.


texts: Finding area between multiple polygons using ArcMap?

texts:
Fairly new to ArcMap 10.3, I'm trying to find a method to build a toolbox model to determine the area of flooding within a basin. The tricky part is that I need to remove the flooding within a pond.

Visually, the pink box is the basin, the light pink polygon is the pond, and the green is the flooding area.  What I am trying to calculate is the area of green that is on the white background over the total area of white.

Using the toolbox I currently have
"Intersect" (to cut the flooding polygons within the basin so its not double counted),
then "Union" (to determine flooding within the ponds),
then "Select" (which removes the flooding within the pond).
From here I was just going to use a "Calculate Field" Tool since each step has determined the area of the new polygon.  Except every time I run the same files it provides a different answer or changes the name which means I have to change my calculate field tool.

I'm trying to automate the process since I need to move onto another project and this needs to be done for twelve flooding events every year.

I've tried using "Add Geometry Attributes" But it always seems to break the model string and keeps giving me the following error "ERROR 000229: The data is not accessible. It is likely either invalid or not available." I usually add this action after "Select" then "Spatial Join" to be able to add a extra fields before "Calculate Field".  Sometimes the add geometry works but 90% of the time it doesn't.

I only have access to basic ArcMap which means many of the answers provided for finding area that are similar I don't have access to, (ex, "Difference", or "Raster")


texts:
I want to perform raster smoothing on a DEM file. I want to to assign the elevation of each pixel using the average elevations of its 8 neighbors. The ESRI's "Python scripting for ArcGIS" has a chapter on using python for raster but it did not help me to write a code for this. I'm looking for any useful literature, tutorial, or sample code...! please note that r.buffer and r.neighbors is not a good answer for me since I want to learn how to write this code completely.

P.S: I already took a look at this and this. they did not help me...may be since my knowledge is limited I need more comprehensive answer. Thanks in advance for any help you are able to provide.


texts: WFS from ArcGIS Online download failed or partially failed

texts:
I've made a WFS service from a Feature Layer in ArcGIS Online. When connecting to the service in QGIS and adding the data to a project it works as expected. But after panning / inspecting the data I'm getting seemingly random log messages that I cannot pinpoint as they happen in different datasets of the WFS service (but same errors).

WFS log message:

  2019-11-20T11:28:37     WARNING    Error when parsing GetFeature response : Error: mismatched tag on line 1, column 907

Log Message:

  2019-11-20T11:28:37     CRITICAL    Layer ProfielScout_Vast_punt : Download of features for layer MudManagerWFS:ProfielScout_Vast_punt failed or partially failed: Error when parsing GetFeature response : Error: mismatched tag on line 1, column 907. You may attempt reloading the layer with F5

What I tried:

Load WFS in ArcGIS Pro 2.4.2 - works fine
Request in browser - works fine
Navigate (in browser) to feature using GetFeatureand typeName and check for mismatched tag on line 1, column 907. But no column 907 on line 1, see result.

Result:

<wfs:FeatureCollection xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:MudManagerWFS="http://dservices9.arcgis.com/arcgis/services/5s3Rxz5DTD3G8MR4/MudManagerWFS/WFSServer" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" timeStamp="2019-11-20T10:43:31Z" numberMatched="unknown" numberReturned="29" xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd http://dservices9.arcgis.com/arcgis/services/5s3Rxz5DTD3G8MR4/MudManagerWFS/WFSServer https://dservices9.arcgis.com/5s3Rxz5DTD3G8MR4/arcgis/services/5s3Rxz5DTD3G8MR4/MudManagerWFS/MapServer/WFSServer?service=wfs%26version=2.0.0%26request=DescribeFeatureType">

Using QGIS 3.8.3-Zanzibar

Anyone have any idea where this error comes from?


texts: QGIS: Dissolving stacked polygons into non-overlapping "donut" features

texts:
I am trying to get my head around what I think is a fairly straight forward geoprocessing problem:
I have created a polygon contour layer. However the polygon features are stacked on top of each other rather than having individual donut like features. Now when I use opacity some areas are thicker than others, due to the stacking of features, and I can't get a nice result (screenshot attached).
Any ideas which QGIS function and settings to use to resolve this? I came across this approach but it seems rather complicated for what I think should be a straightforward process: Exploding overlapping to new non-overlapping polygons?


texts: Batch reproject shapefiles in subdirectories

texts:
I have a catalog tree and in every folder I have a number of shapefiles, images and mxd files. The shapefiles are all in Greek Grid projection system (EPSG: 2100).

What I want to do is to batch reproject every shp in every subfolder from EPSG: 2100 to EPSG: 3035 which is the ETRS89 LAEA projection system.

How to this using ogr2ogr or python?


texts: Filling no data value in raster using ArcGIS Desktop?

texts:
I have a raster with no data values, I want to give them values according to values around them. If a no data pixel is surrounded by 8 pixels whose values are 1 then the no data pixel should adopt this value or if at least it has 5 or more pixels with that value.

How can I do it?


texts: Satellite imagery from Google Earth into QGIS

texts: How can I copy satellite imagery as a raster file from Google Earth into QGIS for digitizing?


texts: Passing only coordinates on click ".ie. remove text" using Leaflet?

texts:
Below is my map script, everything is working pretty fantastic! However, when I click and it sends the e.latlng to the form it is sending

LatLng(38.47939, -105.86426) for example. I would prefer that it only send 38.47939, -105.86426.

How can I remove the text and parentheses?

var mymap = L.map('mapid').setView([38.47939, -99.49219], 5);

L.tileLayer('https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/256/{z}/{x}/{y}?access_token=pk.eyJ1IjoiYnJldHQyMjI3OCIsImEiOiJjajAzNzZjZTkwOWNtMzJxbHZjMmVwZ2hyIn0.cWzkt6Gj_N3SZ8GKzqhByA', {
    }).addTo(mymap);

    var popup = L.popup();

    function onMapClick(e) {
    document.getElementById('lat-lng').value = e.latlng.toString();
        popup
            .setLatLng(e.latlng)
            .setContent("Copy and Paste into the Form \n" + e.latlng.toString())
            .openOn(mymap);

    }

    mymap.on('click', onMapClick);

</script>


texts:
I've been trying to load a .shp file using PyQGIS, but layer.isValid() is always false. I've tried looking around at past solutions for the problem and nothing is working for me. This is my code currently:

from qgis.core import *
from PyQt4.QtGui import QApplication

app = QApplication([])
QgsApplication.setPrefixPath('C:\\OSGeo4W\\apps\\qgis\\', True)
QgsApplication.initQgis()

layer = QgsVectorLayer('C:\\path\\to\\file.shp', 'name', 'ogr')
print layer.isValid()

I've also tried using forward slashes instead of double backslashes in my paths, which doesn't work either. I'm on Windows 10, running Python 2.7.5 with OSGeo4W.


texts: Setting data frame to match exact borders of map using ArcGIS Desktop?

texts:
I would like to have the border of the data frame to fit exactly the maps that are shown inside, so in other words, I want to get rid of blank spaces.

I know, this is possible by dragging the borders and moving the map inside the frame with the handle but I am looking for another option for layout purposes.

Is there a preset option for this ?


texts:
EDITED

I started a project with CRS WGS 84 /Pseudo Mercator and I created a shapefile including point features in different locations around the globe. I have been already working on that for a while and all the operations done so far to measure distances and areas have worked fine enabling "on-the-fly" mode (eg. drawing poly-lines connecting these points, measuring the length of those poly-lines, density of the points, etc).

Now I need to export XY coordinates of the points to use them as an input for a tool external to QGIS (csv, xlsx, or similar formats are fine), but I noticed that the values of XY coordinates do not reflect the actual ground distance between points at each location. For example, for 2 points located in Iceland being 600m away from each other on the x-axis, the difference of X coordinates is 1400m because of my initial choice of CRS. What I would need is XY coordinates relative to the location of each subset of points (eg, with origin on one of the points itself) reflecting the actual ground distance. Note that the geographical position of the points is not important anymore.

Is there a way to extract those coordinates at this point, even with a poorly chosen initial CRS, or to reproject my point shapefile to a more suitable CRS, in order to be able to work with those coordinates?


texts: Python arcpy recursive function problems

texts:
I'm trying to implement an algorithm using values from an arcpy module. Here is my equation written into code. I need for the initial value of the variables St and Yt to start off at zero. After the first time running through the loop I need the previous values of Yt,Qt,and St to be used for the next calculation. I havn't been able to figure out how to get to this to work.

V=0.416395
Dt= 0.5560694202
cursor = arcpy.da.SearchCursor(shapefile,mathlist)
for row in cursor:
    for i in range(1:len(mathlist))
        Yt = min(Dt,St)
        St = min(St+Qt-Yt,V)
        Qt = .82 * row[0] *row[i]


texts:
I have an odd case where creating a GIST index slows down my query instead of speeding it up.

The setup consists of two tables, one with multi-polygons, another with points. I want to calculate which polygons contain which points. My query is:

create table as test
select polygons.name, points.name
from polygons, points where st_contains(polygons.geom, points.location);

To clarify, geom is of type st_multipolygon, location is of type st_point. I make sure to perform a vacuum analyze on tables after creating or deleting indexes. With timing on I get:

no indexes: 14784 ms,
index on geom: 79849 ms,
index on geom, location: 3826 ms

How could this be? If I understand correctly, GIST uses bounding boxes to speedup the st_contains function. Hence, it only makes sense to create bounding boxes for polygon geometries, right? My statement for making a GIST index is

create index poly_index on polygons using gist(geom)

and for points

create index point_index on points using gist(location)

checking queries with the explain keyword tells me the index is used properly. As I'm new to Postgis, with the information available, I'm really confused whether this is normal behaviour or whether it's an error on my side. Lastly, my PostgreSQL version is 9.5.2, PostGIS version 2.2.2 (GEOS: 3.4.2, PROJ: 4.9.1, GDAL: 1.11.2)

Explain results (polygons = top500, points = data_items):

No indexes (14784 ms)

Nested Loop  (cost=0.00..685544.56 rows=23820 width=25)
   Join Filter: ((top500.geom && data_items.location) AND _st_intersects(top500.geom, data_items.location))
   ->  Seq Scan on top500  (cost=0.00..231.59 rows=859 width=52033)
   ->  Materialize  (cost=0.00..139.15 rows=3010 width=49)
         ->  Seq Scan on data_items  (cost=0.00..124.10 rows=3010 width=49)

Index only on polygons (79849 ms)

Nested Loop  (cost=0.14..2308.30 rows=23820 width=25)
   ->  Seq Scan on data_items  (cost=0.00..124.10 rows=3010 width=49)
   ->  Index Scan using poly_index on top500  (cost=0.14..0.72 rows=1 width=52033)
         Index Cond: (geom && data_items.location)
         Filter: _st_intersects(geom, data_items.location)

Index only on points (3822 ms)

Nested Loop  (cost=0.15..1084.66 rows=23820 width=25)
   ->  Seq Scan on top500  (cost=0.00..231.59 rows=859 width=52033)
   ->  Index Scan using item_index on data_items  (cost=0.15..0.98 rows=1 width=49)
         Index Cond: (top500.geom && location)
         Filter: _st_intersects(top500.geom, location)

Index on everything (3826 ms)

Nested Loop  (cost=0.15..1084.66 rows=23820 width=25)
   ->  Seq Scan on top500  (cost=0.00..231.59 rows=859 width=52033)
   ->  Index Scan using item_index on data_items  (cost=0.15..0.98 rows=1 width=49)
         Index Cond: (top500.geom && location)
         Filter: _st_intersects(top500.geom, location)


texts: How to convert from SQL Server geometry BLOB to something else?

texts:
I have a CSV data file from a 3rd party that is an exported SQL Server table.  They simply did a select * from foo and output the result to a text file and sent it over.

In their table is column of Geometry type, so in my raw text I have something like "0xE610000010C47...", etc.  At the moment I've loaded it into a table in SQL Server as an nvarchar.

I anticipated I would be able to reverse back into a Geometry field on my end, but that doesn't seem to be so easy.  STGeomFromWKB doesn't work because it's not actually a WKB. I can't cast the string as Geometry because it complains that it's not a WKT.

So, is there any way I can get this value into SQL Server as if it is a normal Geometry BLOB? Can I tell SQL Server to treat it as such?

I found this link which helped at least answer my question about what is in SQL Server, but didn't get me all the way there:
what is the format of Geometry data type of SQLServer 2008


texts: Overlaping graphics not visible in featureLayer?

texts:
I have constructed a featureCollection from JSON and the feature collection has 44 features.

I have given this feature collection as input to the Featurelayer which is showing only 32 graphics objects of the featurecollection.

I found out that overlapping features are not rendered at all in the feature layer.

How could I resolve this issue?


texts: How to make a shortest path code in mapbasic?

texts:
I have a column table that consist of 2 points (from / to), i wanted to have a dialog box that will show all possible path from source to destination from a list box and show the shortest path with length value on a different text box.

Any one have tried to code this.

Thanks!


texts: Deleting columns/fields from polygon shapefile attribute table?

texts:
I have a polygon shapefile that is loaded with old demographic data in its attribute file, I just received the new data today in xls format.  What I want to do is just delete the old demo data from the existing shapefile by selecting the fields in the attribute table and right clicking delete. Then I would do a simple join using the ID numbers for each feature to add the new data from the new table then just export it out as a new shapefile.  The problem is that for some reason I can not delete entire columns from the attribute table.

How would you go about stripping the data from this polygon shapefile?


texts: Upgrading from ArcGIS 10.3 (Desktop & Server), what version to choose?

texts:
We are currently on 10.3 (Desktop & Server) and have been for 5+ years. Looking to upgrade to new version, cannot go to 10.6.1 due to third party software compatibility.

I have been told (by Esri) that upgrading Desktop up multiple versions is fine, but jumping ArcGIS Server (from 10.3 - 10.5.1) could cause issues. It was recommended to step up the Server upgrade (10.3 to 10.4 to 10.5).

We have the specs for all versions up 10.6 (SQL, RAM, etc.) I recently tried to upgrade on my desktop from 10.3 to 10.6 and it completely crushed my CPU (64 bit, i7 2.70 GHz 16GB RAM . Needed to get my computer reformatted, probably wasn't related to Esri and more than likely hardware/video card issues but it makes me hesitant to push 20 end users up to 10.6 and jump my ArcGIS Server to 10.6 and risk headaches and issues.

I am personally thinking moving up to the stable 10.5.1 and calling it good, including making the jump from 10.3 to 10.5.1 on server. I am aware of the changes that occur at 10.5x+ with ArcGIS Enterprise.

Any similar experiences, insight, or advice?


texts: Vector tile packages (vtpk) publish in ArcGIS server?

texts:
I am still trying to find my way out with the Vector Tile Map Packages.

According to the documentation:

  When you publish a vector tile package to ArcGIS Online or Portal for
  ArcGIS, a vector tile layer is created. The vector tile layer can be
  added to web maps as operational or basemap layers or maps in ArcGIS
  Pro.

Is it possible to publish vtpk files in an ArcGIS Server?


texts: How to cope with imprecision in floating-point grids?

texts:
I have a floating point grid/raster and will want to make all values rounded to the nearest tenth.

I have converted to integer (added 0.5 for rounding), but the final floating point output grid is not giving me the exact values I want. For e.g. 4676.0000 should become 467.6, but instead I get 467.60006.

Also 4674.00000 should become 467.4 but instead I get 467.399994.

Any help and suggestions?


texts: Con tool not working In ArcGIS Desktop 10.5?

texts:
I have a raster dataset [Flow Accumulation  Raster]. Which is located in gdb. I need to perform Con Tool operation with this raster dataset. The Con Tool operation runs successfully with this dataset in ArcGIS 10.1,10.2,10.3 and 10.4 but it does not work in 10.5.
To perform Con Tool these steps I followed in Python window of ArcGIS:
FlowAccumulationRaster is available in TOC.
>>> import sys
>>> import arcpy
>>> from arcpy import env
>>> from arcpy.sa import *
>>> env.workspace = "C:\StreamCreationTes.gdb"
>>> env.scratchWorkspace = "C:\StreamCreationTes.gdb"
>>> spFactoryCode = int(32628)
>>> arcpy.CheckOutExtension("Spatial")
    u'CheckedOut'
>>> spRef = arcpy.SpatialReference()
>>> spRef.factoryCode = spFactoryCode
>>> spRef.create()
>>> arcpy.env.outputCoordinateSystem =  spRef
>>> outConditional = Con("FlowAccumulationRaster","FlowAccumulationRaster,
    "", "VALUE > 10000")

I got this error message.

error Message: Runtime error  Traceback (most recent call last):
File "", line 1, in    File "c:\program files
(x86)\arcgis\desktop10.5\arcpy\arcpy\sa\Functions.py", line 263, in
Con     where_clause)   File "c:\program files
(x86)\arcgis\desktop10.5\arcpy\arcpy\sa\Utils.py", line 53, in swapper
result = wrapper(*args, *kwargs)   File "c:\program files
(x86)\arcgis\desktop10.5\arcpy\arcpy\sa\Functions.py", line 257, in
Wrapper     where_clause)   File "c:\program files
(x86)\arcgis\desktop10.5\arcpy\arcpy\geoprocessing_base.py", line
510, in      return lambda args: val(*gp_fixargs(args, True))
ExecuteError: ERROR 001143: Background server threw an exception.

This is the Geoprocessing Options settings of my ArcGIS.

Can anyone help in this regard?


texts: QGIS field calculator: Change start value for @row_number

texts:
So I can use the @row_number function to number sequentially but I want my start value to be 27, not 1.
Is there some bit of code i need to use, where I can change the start value?


texts: How can I export each individual Raster out of an ESRI Rastercatalog?

texts: I have a managed raster catalog (ArcGIS 10.0) which contains many images. I need to migrate these to another GIS and have to export them individually. As far as I can see, I can only export all images to a raster catalog. Is there a way to iterate through each item and export them singularly?


texts: How can I create a spatially aware multipatch shp-file with autocad map 3d?

texts: I have a dwg-file with 3d buildings. What I need is a multipatch shp-file. The dwg is already georeferenced.


texts: SyntaxError from Python Script tool written using ArcPy

texts:
I am in an advanced GIS course and was assigned to create a simple tool that is used in the ArcMap toolbox that allows the user to create a buffer of 100 feet. This is the code that I have so far.
import arcpy
cody1=arcpy.GetParametersAsText(0)
100Feet=arcpy.GetParametersAsText(1)
output=arcpy.GetParamtersAsText(2)
arcpy.Buffer_analysis(cody1, 100Feet, output, "")

Does anyone know why the code is not working?
Below is the error I am getting.


texts: Intersect between polygonal shapefiles error

texts:
I'm encountering a problem when I try to intersect two different shapefiles.  They are all new shapefiles I created to descibe the land cover and the land use of a city. The problem occurs when I intersect them to create a new single shapefile in which the original areas are divided and have information of both land uses, that I have to use for the CORINE legend.

When I use the intersect tool, it create a new shapefile but left out some areas that were in both files and must have an intersection. I tried to obtain the missing shapes from a difference between this new intersect shapefile and one of the orginals, but even in this way qgis only recognized some polygons and rejected the others.  If I repeat this procedure I can improve the output, but I'm not able to include some areas.

The file have the same kind of geographical reference and the same dimension. I also don't understand why the output changes if I use one shapefile first or the other when I tell it which file to intersect.  The intersection should be the same?

The images of the files are posted below: the first two are the input shapefiles and the last is the output. It's clear that there are some missing areas, like the big wooded area lower right.

After running a geometry validator:


texts:
I have a full world image (raster) that I would like to make available, such that I can use it with a leaflet.js based web page. I have looked at GeoServer and MapServer, but from what I can tell these are more oriented towards taking vector data and serving them as tiles?

How should I go about making my image available for this use? For one of the images (jpeg), its file size is 690MB.


texts: Load a really big geojson to a feature layer in leaflet

texts:
I have this geojson file(about 60mB) that contains the administrative area boundaries. I want to make a chloropleth and give color based on each geometry properties value and add it to the featureLayer.
Problem is when I try to load the geojson file, it will take a considerable amount of time. I tried tileLayer but using this I can't find a way to change the filling color of the polygons. How can I solve this to make the geojson load faster?


texts: Collada file mirrored when created with qgis2threejs in QGIS 2.18

texts:
When I export a Collada file from QGIS 2.18.23 using the amazing QGIS2threejs plugin version 1.4.2, my Collada file comes into Blender and Sketchup with the East West mirrored. This is not the case in the browser or when I export an .obj.

I don't know of a way to fix it in Sketchup or Blender because it would require being both flipped and turned insideout. I know I could use Blender to convert the .obj to a .dae but I need my students who will have QGIS and Sketchup installed but not Blender to be able to export and use a Collada file.

The .dae is a of a lidar derived DEM in MA State Plane Feet.

In QGIS 3 the plugin has been updated and .gltf is the only export option.

An alternative conversion process that results in a .dae would be acceptable.


texts: ArcGIS for Server cached map service - jumbled tiles issue

texts:
Using ArcGIS for Desktop 10.3.1 and ArcGIS for Server 10.3.1, I am trying to create a cached map service. It includes a raster image (that i've added to a mosaic dataset) and a few vector layers. I used the default ArcGIS Online tile structure.

When trying to view the publish service via the Javascript API viewer (that we have locally hosted), I have a jumble of map tiles that differ depending on the scale zoomed to.

My ideas on what may have gone wrong:
- Mosaic dataset contains only one raster image. I added it to a gdb because it was originally ECW format and server did not like this.
- Tile structure chosen is not correct


texts: Clip a heatmap made from point layer (not heatmap plugin) in QGIS

texts:
So I'm just trying to make a heatmap based on 13 points I have which are the centroids for 13 regions in a country. The attribute of 'water percentage' is what I would like to base the heat map off of.

I've been working on this in arcgis with no love for some time. (Not enough points to create a strong krig or IDW output), Kernel density yielded a nice output but wouldn't allow me to extend the output further, past the points extent so it wouldn't cover my whole country boundary (geoprocessing>environments>processing extent; data frame set extent; properties>extent>set extent to another layer; etc. --nothing would actually change it).
See Arcmap image below:

So I tried QGIS (which I have never used before) because I saw they had an easy option for making heat maps. I cannot use the heat map plugin because my data is vector (13 points) not raster.

What I've done is added my points as a point layer, went to properties>style, and changed it from single symbol to heat map. I get a nice output which looks good enough (still working to make it look more accurate)

**The problem is I need to clip this output to my country boundary and I can't seem to do this. I save it but it only shows up as a points layer again, without the style formatting. How may I clip the style formatting?


texts:
I am merging .DEM files from CUGIR NY repository, and need to merge files into one larger image for the whole of NY city. I use python 3.6 + rasterio; It works perfectly for all but one file - "The Narrows". When plotted separately, this file looks fine, but once merged with any other, creates invalid values (see below). All files have same band and projection...

here is the code snippet:

sources = [rasterio.open(path) for path in files]
dest, out_transform = merge(sources, bounds=None, res=None, nodata=nodata, precision=7)

with rasterio.open(files[0]) as src:
    profile = src.profile

profile.update({'dtype':rasterio.uint8, 'count':1, 'compress':'lzw', 'nodata': -32767.0})

with rasterio.open('whole.tif', 'w', **profile) as dst:
    dst.write(dest.astype(rasterio.uint8))

rasterio 1.0.1


texts: How can I create a QgsRubberBand with holes?

texts:
I tried to create a QgsRubberBand object with holes, but failed:

rb = QgsRubberBand(iface.mapCanvas(),True)
geom = QgsGeometry.fromWkt("POLYGON((0 0,4 0,4 3,0 3,0 0),(1 1,3 1,3 2,1 2,1 1))")
rb.setToGeometry(geom,None)

Looks like QgsRubberBand doesn't recognize holes at all.
Is it a bug, or am I doing something wrong?


texts: Overlaying Map QGIS 3 (oblique secant cylindrical projection)

texts:
I am trying to overlay a heightmap of Canada (EPSG:3857) with an old map scan I have (https://geoscan.nrcan.gc.ca/starweb/geoscan/servlet.starweb?path=geoscan/fulle.web&search1=R=294063).
The projection of the scan I have come to find is an oblique secant cylindrical projection, and I am hoping to reproject the heightmap to this projection so everything aligns properly.
I was wondering how I would go about doing this with QGIS3? I have looked into using the Georeferencer Add-on, or using gdalwarp but I think I am confused as to what an oblique secant cylindrical projection is and how to define it. I have tested a few of the cylindrical projections in QGIS but nothing seemed to align properly.


texts: QGIS projects - collaboration on different platform

texts:
On my computer, I have both  - Ubuntu and Windows - operating systems.
Since I work on both of them and QGIS save path to particular layers using absolute path, it's very inconvenient to store projects on local disk.

Moreover, I wish to access QGIS projects and layers from other computers.
Is there any possibility to store them on the Internet?
What will be the best, free of charge, solution?
I thought about Dropbox, but I'm not sure if there's more convenient way.


texts: QGIS: Select objects and insert relative attributes in other layer

texts:
In QGIS I'd like to graphically select multiple objects in one layer and insert corresponding multiple IDs in a unique field of a second layer.
Is that possible with QGIS?
(I'm working with two PostgreSQL/PostGIS tables, the first with geometries and the second without.)
I'll try to explain myself better: in QGIS I'd like to select some points in one layer (with geometries) and copy multiple IDs related in a single field "p_id" of another table (with no geometries) in the form {id1,id2,id3,etc...}, like the following example:
+----+------------+------+----------------+
| id | date       | work | p_id           |
+----+------------+------+----------------+
| 1  | 2020-04-01 | 1    | {1,2,3}        |
+----+------------+------+----------------+
| 2  | 2020-05-02 | 2    | {124,512,99,1} |
+----+------------+------+----------------+
| 3  | 2020-12-04 | 1    | {15}           |
+----+------------+------+----------------+

Now I would be able to reach this goal by selecting objects, copy-and-paste related ids, separate them by commas, enclose them by curly brackets and write a SQL command to write the values I need in the second table, but I'm asking if I can also insert values starting from a manual graphical selection of objects starting from QGIS


texts: Getting date modified for feature class within file geodatabase via ArcPy?

texts:
For ordinary shapefiles located on a disk, I know I can check the date modified using os.stat (see Creating table containing all filenames (and possibly metadata) in File Geodatabase?), but how would I do so if I want to know the date modified for a feature class WITHIN a file geodatabase?

Specifically via ArcPy in ArcGIS Desktop 10.2.

There are some XML based methods (Determining date or time Feature Class was created in File Geodatabase? and How do I find out when a shapefile was created?) but they seem a bit overkill just to get some basic metadata out.

Basic code:

import arcpy
gdbDir=r"D:\path\to\Default.gdb"
arcpy.env.workspace = gdbDir

fcList = arcpy.ListFeatureClasses()
for fc in fclist:
    pass
    #code to extract feature class's date modified goes here


texts:
I have converted the GIS layer to KML.

When I open it in Google Earth, it opens my map in the sea.

What's wrong?


texts:
I am trying to access and use QGIS modules/class/methods from IDLE on a mac. I have had the same problem as a few other people, and browsing the forums have tried to follow the advice they have been given.

when typing:

import qgis.core

I receive the msg:

ImportError: No module named core

I have tried to set path settings as follows:

export PYTHONPATH=/Applications/QGIS.app/share/python

and

export LD_LIBRARY_PATH=/Applications/QGIS.app/lib

but I am very new to using command line for the mac and also to python.

I have now spent a couple of hours searching for others' answers that could hopefully help me, but now I am giving up and asking for advice.


texts:
I want to use the OnCreateFeature-Event to combine it with other actions. So I use

Events.OnCreateFeature += delegate(IObject obj) { LoopTools_OnCreateFeature(obj); };

to listen to this event. That works very well.

But how can I stop listening? I tried

Events.OnCreateFeature -= delegate(IObject obj) { LoopTools_OnCreateFeature(obj); };

but this didn't release the event. So when I looped through some sweeps, it happened that I have wired the event two or more times and the corresponding actions are done to often. I also tried

Events.OnCreateFeature -= LoopTools_OnCreateFeature;

but that has the same effect.
What am I doing wrong?

I'm thankful for any suggestions.


texts: QGIS does not recognize projection of ESRI geodatabase file (.gdb): How to set the projection so that QGIS does regonize it?

texts:
I want to load an ESRI geodatabase file into a project in QGIS and I am new to working with databases in QGIS. When I try to do this the layers from the database are loaded without any CRS or it seems that QGIS does not recognize it. I have tried to follow the procedure in CRS interpretation in QGIS?, but that is very case specific. I have used ogrinfo to get information of the projection of the files in the database by typing:
ogrinfo -al Facilities.gdb/

From this command I get this information about the CRS (similar for the other layers in the database):
Layer name: FireStat
Geometry: Point
Feature Count: 7
Extent: (481630.038600, 3751518.459900) - (511891.895000, 3774915.805800)
Layer SRS WKT:
PROJCS["NAD83 / UTM zone 17N",
    GEOGCS["NAD83",
        DATUM["North_American_Datum_1983",
            SPHEROID["GRS 1980",6378137,298.257222101,
                AUTHORITY["EPSG","7019"]],
            TOWGS84[0,0,0,0,0,0,0],
            AUTHORITY["EPSG","6269"]],
        PRIMEM["Greenwich",0,
            AUTHORITY["EPSG","8901"]],
        UNIT["degree",0.0174532925199433,
            AUTHORITY["EPSG","9122"]],
        AUTHORITY["EPSG","4269"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-81],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",0],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","26917"]]
FID Column = OBJECTID
Geometry Column = Shape
ID: Integer (0.0)
STATIONNUM: String (16.0)
RESPONSEDI: Integer (0.0)

I had the same problem with another ESRI geodatabase, which I could fix by using ogr2ogr:
ogr2ogr -s_srs EPSG:26917 -t_srs EPSG:4326 -f 'ESRI shapefile' reprojected_Base.gdb Base.gdb
Somehow it just does not work for this database.
Does anyone have a solution, preferably something I can do using the terminal or in Python?
And can someone explain why there are multiple EPSG codes in the WKT for this CRS?


texts: Sorting SLD file for BGS Digimap provided by Edina?

texts:
Does anyone know how to sort the sld files provided here:

http://digimap.edina.ac.uk/webhelp/geology/using_data_with_gis/legend_files.htm

The reason I ask is that I only want to display the appropriate types in the legend under Qgis.  At the moment all of the rock types appear to be displayed.

Unfortunately I can't access the LYR file provided by BGS with Qgis.


texts: I am trying to geocode a couple of addresses, but I keep getting a "failure to connecting to API" error. I received my API key from signing up with Thunderforest, and I also installed certificates through my Python shell, but I still seem to keep getting this error. I installed the latest pip, and I have over 1000 data points, so I think it may be the reason, but I am not too sure.


texts: Weird polyline mapbox when drawing on android from pgRouting

texts:
I am creating android apps which can show the route that generated from pgRouting, and return geojson file.

I already can draw the polyline on the web with mapbox-gl js with this code:

var geojson = {
          "type": "FeatureCollection",
          "features": []
        };

for(var i=0; i<data[0].length - 1; i++)
        {
            $json = JSON.parse(data[0][i]['json']);
            geojson.features.push($json);
        }

map.addLayer({
                        "id": "rute",
                        "type": "line",
                        "source": {
                            "type": "geojson",
                            "data": geojson
                        },
                        "layout": {
                            "line-join": "round",
                            "line-cap": "round"
                        },
                        "paint": {
                            "line-color": "#009688",
                            "line-width": 3
                        }
                    });

and the result is good like this:

But, when i draw the polyline on android with this code:

private ArrayList<LatLng> latLngs = new ArrayList<>();
for(int i=0; i<array_geocoordinate.length(); i++)
                            {
                                String[] koordinat = array_geocoordinate.get(i).toString().split(",");
                                LatLng koordinat_baru = new LatLng(Double.valueOf(koordinat[1].split("\\]")[0]), Double.valueOf(koordinat[0].split("\\[")[1]));
                                    Log.d(koordinat[0].split("\\[")[1] + ",", koordinat[1].split("\\]")[0]);
                                    latLngs.add(koordinat_baru);
                            }

map.addPolyline(new PolylineOptions()
                        .addAll(latLngs)
                        .color(Color.parseColor("#3bb2d0"))
                        .width(2));

The line of route become like this:

There're many polylines that draw incorrectly, how to fix that?


texts:
I'm starting to get involved in a humanitarian project to understand crop-type and crop-yield in India to identify areas where they may be food shortages.
The current approach for this project is to process satellite data, to identify field boundaries and to use the NDVI profile to understand what the crop type is and what stage of growth the crop is at. The researchers working on this have successfully done this for several countries prior. However, one challenge is that there is a shortage of ground truth data for India. The current ground truth data are points with a crop type attached, however the data is very inaccurate.
My question is:

are there any ground-truth data-sources for vegetation in India (commercial is fine)
are there any existing tools/apps that can be used to gather this data on the ground in a crowd-sourced way?


texts: OpenLayers 4.3.4 - Feature, ol.style.icon rotation - rotate heavy but not good?

texts:
I display a feature-marker with ol.syle.icon. But when I put a rotation value, the icon rotate heavy in chaos order?

I thought the rotation value 0-360 is clockwise, is not it?

So e.g. a value of 180 should flip the icon horizontaly, but it does not?


texts:
I have the following KML file which is a cube:

</Placemark>
<Style id="3Dobject">
    <PolyStyle>
        <color>7fff5500</color>
        <outline>1</outline>
        <fill>1</fill>
    </PolyStyle>
</Style>
<Placemark>
    <name>Warehouse01</name>
    <description>Warehouse Center：106.97777777 -6.19758333</description>
    <styleUrl>#3Dobject</styleUrl>
    <Polygon>
        <extrude>1</extrude>
        <tessellate>1</tessellate>
        <altitudeMode>absolute</altitudeMode>
        <outerBoundaryIs>
            <LinearRing>
                <coordinates>
                    106.9772778,-6.19808333,100
                    106.9782778,-6.19808333,100
                    106.9782778,-6.19708333,100
                    106.9772778,-6.19708333,100
                    106.9772778,-6.19808333,100
                </coordinates>
            </LinearRing>
        </outerBoundaryIs>
    </Polygon>
</Placemark>

I am trying to make this cube to be drawn 100 meters above the ground, so basically:

I tried adding an 100 but it always display from the bottom.

I am using CESIUM.


texts:
Using QGIS 2.14 I would need to join/link multiple layers with each a couple of hundred records with a georeferenced point layer - so basically much like geotagging of pictures.

Do you have any idea on how to link the xyz-less records to the most nearest geographical record, both based on the Date-Time attribute ?

I don't speak Python


texts: Creating new layer/shapefile from each element using ArcPy

texts:
How can I create a new layer (shapefile) from every element in another layer?

I have point shapefile 'przystanki.shp' (in Polish mean bus stops) with 19 point and some attributes in table. What I want, is create for each stops new shapefile(or feature class in GDB).

I try:

import arcpy
arcpy.env.workspace = r'F:\Prog_GIS'
arcpy.env.overwriteOutput = True
przystanki = 'przystanek.shp'
arcpy.SplitByAttributes_analysis(przystanki, r"F:\Prog_GIS\test.gdb", ['nazwa'])

and I get 19 separate attributes tables in GBD (excellent!) with names by column 'nazwa' (in PL: names) BUT - without geometry. It's not solving my problem, but I think is good way.

What function can I use in next steps to add geometry?

Or maybe is there another workflow to solve this problem?

Of course I can select every element and export only selected data (that I do in job), but I try find solution to solve this problem with for example larger layer.


texts: Leaflet - how can I call custom js after drawing polygon?

texts:
I want to draw a polygon on a leaflet map and afterwards send it to the DB and retrieve all objects that intersect that polygon.

In OpenLayers I did it by using custom function in "featureAdded:" when declaring OpenLayers.Control.DrawFeature.

How can I do the same in leaflet ?

Also , is there an easy way to add custom controls from top right to top left as in OpenLayers control panel ?


texts: What's the right way to calculate the scale parameter value for r.relief in GRASS?

texts:
I have a little doubt about the way I should calculate the value of the "scale" parameter in the r.relief command in GRASS.

In the description section of the r.relief page of the GRASS manual I read:
"The scaling parameter, which compensates for a different horizontal scale than vertical scale. If scale is a number, then the ewres and nsres are multiplied by that scale to calculate the shading. (Default=1.0 for equivalent horizontal and vertical scales.)"
while in the parameters section of the same page I read:
"Scale factor for converting meters to elevation units".
This last statement is confusing to me because it seems to contradict the previous one in my opinion.

I'm working with ASTER GDEM v2, so if I'm not wrong I should change the default value because horizontal scale is defined in degrees while vertical scale is defined in meters.

Now, what's the right value for the "scale" parameter?
Is it the number of vertical scale units (meters in my case) contained in the horizontal scale unit (degree in my case)?
Is it vice versa (the number of horizontal scale units contained in the vertical scale unit?)
Or is it simply the default value because the vertical scale is defined in meters ("Scale factor for converting meters to elevation units")?


texts: Cannot get ArcGISLocalFeatureLayer to update when adding features

texts:
I have C# and XAML code that I would like to use to add features to a feature layer that is in a file geodatabase. This is how the feature layer is defined in the XAML code:

<esriLocal:ArcGISLocalFeatureLayer ID="myLayerName" x:Name="myLayerName" Path="C:/Projects/MyMapPackage.mpk" LayerName="myLayerName" OutFields="*"
DisableClientCaching="True" Editable="True" Visible="True"
AutoSave="False"  ValidateEdits="True" Opacity="0.50" />

This is how I am attempting to add the data to the feature layer in the C# code:

     var aLayer = _map.Layers["myLayerName"] as ArcGISLocalFeatureLayer;
 if (aLayer != null)
     aLayer.Graphics.AddRange(myGraphicCollection);
 aLayer.SaveEdits();

When I checked the unpacked location of the feature class, there are no features added, although the attributes and graphics are added to MyGraphicCollection, and show up there when I'm tracing through.

Am I doing something wrong in my code?

I am using ArcGIS Runtime.


texts: Resolving Sentinel-1 Interferogram Unwrapping error when constructing DEM/DSM?

texts:
I have been trying to create a DSM of a coast and some islands, and have run into some issues regarding how the data looks in the unwrapped interferogram (which affects my height data). I have been using the following method to process my SAR data using esa's SNAP software:

1) Co-register 2 images
2) Interferogram formation
3) Deburst + Merge
4) Goldstein phase filtering
5) Phase unwrapping
    -SNAPHU export,
    -run SNAPHU on ubuntu,
    -SNAPHU import

The final steps after successfully importing from SNAPHU are:

6) Phase to Height
7) Range Doppler Terrain Correction

After step 5, when I observe the unwrapped interferogram (of an island and coast), bands appear (along the sea) that seem to skew the data and I don't know why (please see image below: coherence image on the left , phase image on bottom right and resulting unwrapped interferogram on the upper right).

The bands follow a gradient from left to right and can be observed after phase to height and terrain correction. The gradient of heights of course is not representative of the area at all.

Does anyone have an idea why this is happening?


texts: Displaying layer after using QgsGeometryAnalyser?

texts:
I have already discovered this class, but I am confused. If I am doing a analysis on the current layer, I don't know why it is not displaying on the map.

lyr =iface.mapCanvas()
layer = lyr.currentLayer()
QgsGeometryAnalyzer().centroids(layer,'new route\new shape.shp',False)

I haven't got any errors, it just does nothing. When I execute the code in the QGIS Text Editor, I click on "Run" and executes the file. Nothing appears on the map and I don't see any new shapefile in the folder written.


texts: How to keep polygons detailed when exporting in QGIS?

texts:
When i export to pdf from QGIS the polygons become rounded or bloated. This image is a printscreen from the workspace in QGIS:

This image is a printscreen from the pdf (size A3 zoomed in 800%):

Although it's zoomed in alot it's noticable when fullscreen. The map im trying to make is size A3 so the details can be seen. Is there any way to keep the details as shown in the first picture? I have tried to uncheck the "simplify geometry" in the rendering tab for the layer, but without effect. The resault is somewhat better when changing the layout from A3 to something bigger like A1 or A0, but it's an annoying workaround because of scales.


texts:
I am using the GDALReprojectImage method from gdalwarper.h. Is there a way to suppress the output? The function has GDALWarpOptions * psOptions as an input but there in no quiet option.

I have seen that this is available in the GDAL sources as bQuiet but I cannot find a way to set this in GDALReprojectImage.

Is there maybe a global option I can set?


texts: ArcGIS mosaic to new raster colour difference

texts:
I am trying to merge two rasters from a Sentinel-2 scene in ArcMap 10.5. They are next to each other geographically and were taken moments apart on the same day. Prior to this issue I have used the composite bands tool for each to add together the separate sentinel bands. When I display them without mosaicking, there is a difference in their colours (presumably from one image containing a few clouds resulting in a different stretched histogram). I assumed this would right itself when the two images were merged into one raster. However, I have tried using the 'mosaic to new raster' tool, as well as adding the rasters to a new mosaic dataset, and the colours are still different between the two halves of the image. I've attached an image of the output I got from adding them to a new mosaic dataset.
Is there any way I can rectify this and make them look seamless? I am worried that when I run vegetation indices the outputs will be inaccurate.


texts:
I have an android application that takes a static GTFS data that I manually turned into a database.

How do I update this GTFS data automatically, or is that not possible?


texts: GRASS 7 commands in PyQGIS without results (QGIS 2.18)

texts:
I have tried to run different GRASS commands as part of a PyQGIS script in QGIS 2.18 and 2.14, without obtaining any result, e.g. for the following code:

# Open raster
fileInfo = QFileInfo(raster)
baseName = fileInfo.baseName()
filePath = str(os.path.abspath(raster))
rlayer = QgsRasterLayer(filePath, baseName)

# Define raster extent
extent = rlayer.extent()
xmin = extent.xMinimum()
xmax = extent.xMaximum()
ymin = extent.yMinimum()
ymax = extent.yMaximum()

# Open vector
vector = QgsVectorLayer(vector, vector, "ogr")

# Break each line at each point shared between 2 and more lines
cleaned = "cleaned.shp"
processing.runalg('grass7:v.clean', {"input": vector, "tool": 8,
    "GRASS_REGION_PARAMETER": "%f,%f,%f,%f" % (xmin, xmax, ymin, ymax),
    "output": cleaned})

This code doesn't throw any error (also not in the Log Message Panel > Processing). However, no output is generated and the file is not accessible with iface.addVectorLayer. I have tried different grass commands as well and running the script in the Python console of QGIS 2.14 and QGIS 2.16. A similar script works fine, if only qgis and no GRASS commands are used.

I am guessing that QGIS is not properly connected to the GRASS commands. I didn't have these problems with QGIS 2.16, which I don't have installed any more, so I didn't run this script in QGIS 2.16.

Here a related question on this question:
Get results from using GRASS algorithms with the QGIS processing tool --> Running QGIS as an administrator didn't change anything

Secondly, I am wondering if it would be advisable to switch from

programming PyQGIS scripts, calling all processing modules via processing.runalg() and running these scripts in the QGIS Python shell to
programming Python scripts that call modules e.g grass.run_command and running these in the OsGeo4W shell.

I don't have much experience on that second option and find it hard to estimate additional required knowledge. But from the few examples I am finding on my first option, I get the feeling that I am not using the most common approach. Any advice on this?


texts: Converting NZTM2000 projection to Lat-Long system using PHP

texts: Is there a way to convert coordinates from New Zealand Transverse Mercator to Google compatible longitude and latitude using PHP? I have tried PHP-COORD library, but it does not have the NZTM option.


texts: Automating Atlas to create maps for all Attributes

texts:
I'm using QGIS 2.18 (Las Palmas).
I have an attribute table with 75 municipalities and around 50 attributes. I would like to creat a map for each of the attribute (always showing all of the municipalities at once) in graduated categories (preferably with values). I know that by using the Atlas-Function i can create a series of maps, but it seem like i can only do that for each of the municipilities but not for the attributes. I have looked around in Stackexchange and i found similar questions that were unfortunately unanswered. I also read that you should tranpose the data, but i fear that i wouldnt be able to see the municipalities any longer.
Any suggestions?


texts:
I am trying to develop an application using OL. In my code I am using base maps of google , yahoo etc. For this I am  including the link in the script,this means that I am connecting to respective server(google,yahoo) etc every time through internet connection(I think this is what including the links in scripts mean). But sometimes when I select Yahoo maps , it takes a lot of time to load and in some cases it doesn't load at all.  So for a better response time my idea is to use caching concept and store these maps in my memory using cookies etc.... But I donno whether Its possible to do this or not.So will this caching concept work?

Are there any other better ways to get good response time with loading of maps???? or How can I load maps better?
Your suggestion are much valuable.


texts: Add a Header to BaseMapGallery Widget added in ExpandWidget ArcGIS Javascript API 4.1

texts:
I want to add a Header in the BaseMapGallery Widget. I have added the BaseMapGallery widget in my ExpandWidget as content. How can I now add some text to the BaseMapGallery widget (e.g. instructions) and a title bar?

Here is my code:

var basemapGallery = new BasemapGallery({
    view: view,
    source: [
          // Basemap.fromId("streets-navigation-vector"),
          // Basemap.fromId("satellite"),
          Basemap.fromId("hybrid"),
          Basemap.fromId("dark-gray-vector"),
          Basemap.fromId("osm"),
          Basemap.fromId("gray-vector"),
        ]
}, "basemapGallery");
    var bgExpand2 = new Expand({
     view: view,
     content: basemapGallery
      });


texts: Aligning raster perfectly with feature using ArcMap

texts:
I have a feature layer with 1000x1000m polygons that are seamlessly glued together. From this layer I want to create a raster with 25x25m cells as basis for further raster operations.
I'm using ArcMap > Tools > Polygon to Raster to do so, with cell size 25 and no other settings (no snap raster, no specified processing extent etc). The feature layer is in a metric projection (LV95).
I assumed since 1000 divides cleanly by 25, that the raster would align perfectly with the borders of the polygons, however the raster is not aligned (see below).
What can I do to snap the Raster directly to the edges of the polygons (or to avoid ambiguity one reference polygon)?


texts: How can I combine addr:* tags in JOSM to create the addr:full tag?

texts:
I have about 400 addresses that I need to update in OSM.  They have already been conflated using Josh Doe's Conflation plugin, http://wiki.openstreetmap.org/wiki/JOSM/Plugins/Conflation, which my version of JOSM no longer supports for some reason.  I have updated the addr:street:name and addr:street:type for the dataset in JOSM, but now I need to update the addr:full tag.  Is there a way to perform a calculation in JOSM that would concatenate something like this:

addr:full = "addr:housenumber" + "addr:street:name" + "addr:street:type"

If there is a way in iD, Potlatch2 or Merkaartor that would be great too.


texts: Create cache for mobile using ArcGIS for Server?

texts:
I want to use tile map service ( cache map) in a mobile project . I'm using ArcGIS SDK for android as a API and the basemap is ArcGIS Tile map.The mobile operating systems of end users are android and The property of cache service is as below :

DPI :96

Tile height and width : 256 * 256

Tile format : JPG

storage format : compact

The cache scales are based on google map scales ( 20 zoom level)

maximum resolution of my system is 1920 * 1080

The problem is that the quality of map in mobile device get low .

How can i show the high quality map in my project ?

Which API's or SDK  do you recommend instead of Arcgis sdk for android ?


texts: Create random points not creating enough points-ArcMap

texts:
I'm creating random survey points within polygons based on how large each patch is, about 1 point per hectare. The points also need to be at least 175m apart. Since the plots are weird shapes, I figure I won't be able to fit quite that many but the program will fit what it can. Yet when I run it, it only places 2 or 3 points in polygons that should fit 20 or 30. It throws the error that it couldn't fit the requested number of points, but even the closest are over 200m apart.

It seems like the program thinks there isn't enough space, even when there is. Any ideas why this would happen? Let me know if there's more information you need to understand the problem!


texts: Where do spatial indexes look for SRIDs?

texts:
I'm looking into optimizing the spatial indexes on some of our tables (stored in SQL Server 2008 R2), so I ran

exec sp_help_spatial_geometry_index
    @tabname='myTable',
    @indexname='IX_myTable_Shape',
    @verboseoutput=1,
    @query_sample=@geomString

and that returned (among other stuff) Number_Of_SRIDs_Found:  2.  Troubled by that, I immediately did a select count(*) from myTable where Shape.STSrid <> @mySrid and saw 0.  Everything in the table is apparently using the correct SRID, so where could sp_help_spatial_geometry_index be finding another SRID?

I ran other spatial indexes through the same sproc and found 2 SRIDs for them as well.  Getting paranoid, I threw this together to look through all spatial columns in the entire database...

declare @tablename varchar(50)
declare @fieldname varchar(10)

DECLARE cSpatialColumns CURSOR STATIC LOCAL FOR
    SELECT  table_name [Table Name], column_name  [Column Name]
    FROM information_schema.columns c
    where data_type = 'geometry' and TABLE_NAME NOT LIKE 'vw%'

OPEN cSpatialColumns

FETCH FROM cSpatialColumns INTO @tablename, @fieldname
WHILE @@FETCH_STATUS = 0
BEGIN
    declare @myquery nvarchar(1000)
    set @myquery = 'select count(*) as ' + @tablename + 'Count from ' + @tablename + ' where ' + @fieldname + '.STSrid <> 102605'
    exec sp_executesql @myquery
    FETCH FROM cSpatialColumns INTO @tablename, @fieldname
END

... and found no spatial objects at all that don't use our SRID of choice.  So I'm at a loss.  Could it be a matter of this being a bug in 2008 R2?

I tried looking at the SQL for that sproc but it simply executes another sproc to which I apparently don't have access.


texts:
I would like to use a QGIS custom widget in a UI window on Qt Designer for Mac. I only have the Qt widgets and cannot find a way to see the QGIS widgets.

I have Mac OS Mojave 10.14.6, Qt Creator 4.11 (based on Qt 5.14.1), Qt Designer 5.9.6, QGIS 3.10 and of course python 3, Qt, PyQt.

I already saw the answers on No custom widgets in Qt Designer for QGIS 3 but:

Most answers apply to MS-Windows. Thus I have no .exe or .bat with the designer. I cannot find a similar designer executable in the QGIS Mac package.
The promote of http://www.informit.com/articles/article.aspx?p=1405227&seqNum=3 works of course, but I don't benefit from the custom properties of the widget. It is not very convenient to define them in the code.
The plugin approach of http://www.informit.com/articles/article.aspx?p=1405227&seqNum=3 is ways too complicated ... and I expect that QGIS did it already, seeing the designer for MS-Windows.
I try to add some path in Qt Designer preferences (template paths) to /Applications/QGIS3.10.app/Contents/Frameworks/QtDesigner.framework/ and several paths within. Similar in the Qt Creator preferences (Designer > model paths).

What am I missing? How to get it?


texts: changing text in an MXD textbox with items from a list in ArcPy

texts:
I am trying to create a text label for a series of maps over time. I have a text box with the element name "DateBox" in my mxd. As a filler, it says "Week # here". I want to it say "Week XX", where XX refers to the week number. I am using arcgis 10.3.

I have tried:

import arcpy
from arcpy import env
env.workspace = r"C:\Users\GIS_User\Output"
map_mxd = arcpy.mapping.MapDocument(r"C:\Users\GIS_User\Output\timelapse.mxd")

for XX in range(1,121):
    for TextElement in arcpy.mapping.ListLayoutElements(map_mxd, "TEXT_ELEMENT"):
        if TextElementName == "DateBox":
            TextElement.text = 'Week ' + str(XX)
        print TextElement.text

The arcpy window in ArcMap prints the text and shows that it successfully loops from Week 1 to Week 120. However, this change is not reflected in the textbox of the map document. The textbox itself still holds my original filler text "Week # here" and shows no changes when I run this code.


texts: Evis plugin Icon does not show up on the QGIS

texts:
I have installed evis plugin on my QGIS. Unfortunately, it's Icon is not showing up and it is not in the plugin list.

Do you know how I can fix it?