texts:
I use QGIS 2.12 in my standalone application. Now I want to upgrade my application to the lastest QGIS version (2.16). I use OSGeo4W installer to download all headers, libs and other files. I have three directories with QGIS after installation:

C:\OSGeo4W\apps\qgis

C:\OSGeo4W\apps\qgis-dev

C:\OSGeo4W\apps\qgis-rel-dev

In every directory I can find qgis_core.dll and qgis_gui.dll. But all of them depends from release Qt libraries so I can't debug my application in Visual Studio?

It crashes with error "Must construct QApplication before QPaintDevice".

When I use QGIS 2.12 I had debug and release versions of this libraries.

My question is where I can find debug versions to run my application in debug mode?


texts: Finding help for setting up QGIS Web Client in Windows 7

texts:
Is there any procedure or installation guide of QGIS Web Client for Windows 7 OS? Because I'm really having a hard time setting up the Web Client in Win7 and I don't know any Linux-based commands that's featured in https://github.com/qgis/qgis-web-client.

My QGIS Server is running well and I'm using QGIS 1.8.


texts: Dragging and dropping images into Leaflet map to create image markers?

texts:
I am using Leaflet. I need to make custom, draggable, resizable icons for the map, using custom images that are set inside a sidebar as such:

        &times;

Actions

Défense en ligne

Défense en ligne prévue

Défense périmétrique

Défense périmétrique prévue

Action localisée indépendante

Action en Noria

Action simultanée et concertée

I know I have to use L.icons But I have no idea on how to do it with my sidebar, since it'll have about 100 images.


texts: Getting maximum and minimum latitude and longitude of view

texts:
How can I retrieve the maximum and minimum latitude and longitude of the current view using the arcGIS javascript API (4.x)?

I can get the center lat and lon by using:

MapView.center.latitude and MapView.center.longitude.

I can also get the height and width in pixels using:

MapView.height and MapView.width.

However, I can't convert the pixel size to a lat/lon as the MapView.resolution property is 0. The MapView.extent is also null.

I am asking as I would like to query a database and only get the entries with a latitude and longitude within the view to save having to draw every point.


texts: Quickly getting all symbols for feature layer with ArcObjects?

texts:
I have a FeatureLayer and I want to enumerate all the symbols used in it. Simple way - it is to call SymbolByFeature for each features. Something approximately likes:

Dim l as IFeatureLayer
Dim c as IFeatureCursor
Dim r as IFeatureRender
Dim f as IFeature
Dim s as ISymbol

Set r = IGeoFeatureLayer(l).Renderer
Set c = l.Search(0, True)
Set f = c.NextFeature

Do Until f is Nothing
  Set s = r.SymbolByFeature(f)
  [...]  ' check whether this symbol is in collection and add it if necessary
  Set f = c.NextFeature
Loop

The problem with this method is that it too long, especially when there is a lot of features in the feature layer.

Is there a faster way to get a collection of all the symbols in a feature layer?


texts:
I am following this tutorial and I can't display the GeoJSON file mentionned 7day-M2.5.json. I copied and pasted the same code ; there is no error message in debug tools.

var map = new ol.Map({
    target: 'map',
    layers: [
      new ol.layer.Tile({
        title: 'Global Imagery',
        source: new ol.source.TileWMS({
          url: 'http://demo.opengeo.org/geoserver/wms',
          params: {LAYERS: 'nasa:bluemarble', VERSION: '1.1.1'}
        })
      }),
      new ol.layer.Vector({
        title: 'Earthquakes',
        source: new ol.source.Vector({
            url: '/exercices/data/7day-M2.5.json',
            format: new ol.format.GeoJSON()
        }),
        style: new ol.style.Style({
            image: new ol.style.Circle({
            radius: 3,
            fill: new ol.style.Fill({color: 'white'})
            })
        })
    })
    ],

The problem seems to be the json file because of "this" : in ol.js window, "this" is the reference to the GeoJSON. I can't go further, no idea.


texts: Creating look up tables in QGIS that last more than one session?

texts:
It seems that when I create a Look up Table or Value Map for a shapefile or a PostgreSQL table in QGIS it saves it for one session, then when I open it again it had disappears.

Can someone enlighten me to this, where am I going wrong?


texts:
There are three roadkill data sets from three different institutions. We are sure that a combined data set will have duplicates.

The three institutions will probably record their data differently:

coordinates for roadkills with different tools - handheld GPS, GPS in phones etc. So we are looking at a probability of the same incidence being recorded with coordinates with up to 300 meters distance.
time might be recorded different. Most probably the same day, but this can also be fuzzy. Up to 2 days difference. Where one institution records the incidence through field officers (police, rangers, etc), the other could record this by asking for week number and then set an arbitrary date within that week.

Thus we are looking at a two dimensional distance calculation consisting of time and physical distance. Duch closeness could be calculated based on relative closeness (establishing a distance list for each object related to all other objects for this attribute, or an absolute distance filter (categorizing distances).

I guess the way to do this is to run subsequent matching according to dates and coordinates. I have been looking at the different libraries in FME 2015.0 but have not found any which can use coordinate closeness and time closeness as filters.

The hard way to find neighboring coordinates is to pull the coordinates out as numbers and then do a comparison. It will of course mean I have to populate an array and work on that array. I could then export it and use a small python script to do the job. I was hoping to avoid that.

Does anyone have examples of such duplicate procedures and their parameters/constraints using FME?


texts: RTree spatial index does not result in faster intersection computation

texts:
I have some code that I am using to determine which Shapely Polygon/MultiPolygons intersect with a number of Shapely LineStrings.  Through the answers to this question the code has gone from this:

import fiona
from shapely.geometry import LineString, Polygon, MultiPolygon, shape

# Open each layer
poly_layer = fiona.open('polygon_layer.shp')
line_layer = fiona.open('line_layer.shp')

# Convert to lists of shapely geometries
the_lines = [shape(line['geometry']) for line in line_layer]
the_polygons = [(poly['properties']['GEOID'], shape(poly['geometry'])) for poly in poly_layer]

# Check for Polygons/MultiPolygons that the LineString intersects with
covered_polygons = {}
for poly_id, poly in the_polygons:
    for line in the_lines:
        if poly.intersects(line):
            covered_polygons[poly_id] = covered_polygons.get(poly_id, 0) + 1

where every possible intersection is checked, to this:

import fiona
from shapely.geometry import LineString, Polygon, MultiPolygon, shape
import rtree

# Open each layer
poly_layer = fiona.open('polygon_layer.shp')
line_layer = fiona.open('line_layer.shp')

# Convert to lists of shapely geometries
the_lines = [shape(line['geometry']) for line in line_layer]
the_polygons = [(poly['properties']['GEOID'], shape(poly['geometry'])) for poly in poly_layer]

# Create spatial index
spatial_index = rtree.index.Index()
for idx, poly_tuple in enumerate(the_polygons):
    _, poly = poly_tuple
    spatial_index.insert(idx, poly.bounds)

# Check for Polygons/MultiPolygons that the LineString intersects with
covered_polygons = {}
for line in the_lines:
    for idx in list(spatial_index.intersection(line.bounds)):
        if the_polygons[idx][1].intersects(line):
            covered_polygons[idx] = covered_polygons.get(idx, 0) + 1

where the spatial index is used to reduce the number of intersection checks.

With the shapefiles I have (approximately 4000 polygons, and 4 lines), the original code performs 12936 .intersection() checks and takes about 114 seconds to run.  The second piece of code that uses the spatial index performs only 1816 .intersection() checks but it also takes approximately 114 seconds to run.

The code to build the spatial index only takes 1-2 seconds to run, so the 1816 checks in the second piece of code are taking just about the same amount of time to perform as the 12936 checks in the original code (since the loading of shapefiles and converting to Shapely geometries is the same in both pieces of code).

I cannot see any reason that the spatial index would make the .intersects() check take longer, so I am at a loss for why this is happening.

I can only think that I am using the RTree spatial index incorrectly.  Thoughts?


texts:
I have developed an application using leaflet JS, which loads the services from the ArcGIS server via REST API.

I want to put a search box to search by cities. Should I load a base map to be able to search? How should I configure the search box?


texts: Using schema other than public in PostGIS?

texts:
I'm currently setting up a fresh install of PostGIS 2.0.2 and PostgreSQL 9.1.6 on Ubuntu.  I've recently come across some information indicating that using the public schema to store all data is not a good idea.

For this reason, I've set up a schema called data and made myself the owner, but is it a good idea?

My concerns are:

Besides setting the owner, I may need to pay attention to things on the Privileges tab when creating this new schema (through pgAdmin III);
I may not get the same benefits by storing my data in the public schema and dumping all data into a separate schema before doing a backup/restore (this would save a few keystrokes when using ogr2ogr); and
I may run into trouble by not having the default PostGIS tables and views in my new data schema (they are in the public schema within the same database).


texts:
I'm trying to open an MODIS file (hdf format) with gdal in a python script under windows OS. I use the HDF4 driver, as read at http://www.gdal.org/frmt_hdf4.html.
But when I run it I got this error message:

ERROR 4: `MOD10A1.A2000064.h12v04.005.2007164045648.hdf' not recognised as a supported file format.

I have tried with the gdal.ALLRegister() statement with the same result. My goal is to obtain the properties of the image using GeoTransform, RasterXSize, etc. and reproject it afterward.  If you could provide me with any help it would be much appreciated.

ps. I know I can use the Modis Reprojection Tool (MRT) but I need it to be included in my script as it will iterate over a folder containing a lot of images.

thanks


texts: Is there a way to merge a grid with a shapefile?

texts: I'm using QGIS and I have a shapefile that's a grid I created and another shapefile that is points.  I would like to join them so each grid section is linked with points that fall within in.  The grid geolocations are "left/top/right/bottom."  The shapefile has latitude and longitude.  Is there a way to join the two files if there is no common field?  Can you convert the grid's coordinates to latitude and longitude and then join them?


texts:
I'm trying to use GRASS on python 2.7, but I'm having some problems at setting my script on IDLE, then I'm getting an error at parser() function:

Here is my script:

import os
import sys

gisbase = os.environ['GISBASE'] = 'C:\Program Files (x86)\GRASS GIS 7.0.1RC1'
gisrc = 'C:\grassdata'
gisdbase = 'C:\grassdata'
location = 'newLocation'
mapset = 'TC'
LD_LIBRARY_PATH = 'C:\Program Files (x86)\GRASS GIS 7.0.1RC1\lib'
PATH = 'C:\Program Files (x86)\GRASS GIS 7.0.1RC1\etc';'C:\Program Files (x86)\GRASS GIS 7.0.1RC1\etc\python';'C:\Program Files (x86)\GRASS GIS 7.0.1RC1\lib';'C:\Program Files (x86)\GRASS GIS 7.0.1RC1\bin';'C:\Python27';'C:\Program Files (x86)\GRASS GIS 7.0.1RC1\Python27';'C:\Program Files (x86)\GRASS GIS 7.0.1RC1\msys'
PYTHONLIB = 'C:\Python27'
PYTHONPATH = 'C:\Program Files (x86)\GRASS GIS 7.0.1RC1\etc\python'

sys.path.append(os.path.join(os.environ['GISBASE'], 'etc', 'python'))

import grass.script as grass

grass.parser() #I'M STUCKING HERE

I'm getting an error inside subprocess.py :

  p = subprocess.Popen([prog, '-n'] + argv, stdout=subprocess.PIPE)

The full error:

Traceback (most recent call last):
  File "C:\Users\Ciro\Desktop\teste_grass.py", line 19, in <module>
    grass.parser()
  File "C:\Program Files (x86)\GRASS GIS 7.0.1RC1\etc\python\grass\script\core.py", line 680, in parser
    p = subprocess.Popen([prog, '-n'] + argv, stdout=subprocess.PIPE)
  File "C:\Python27\ArcGIS10.1\lib\subprocess.py", line 679, in __init__
    errread, errwrite)
  File "C:\Python27\ArcGIS10.1\lib\subprocess.py", line 893, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

What am I missing?


texts: Calculating how many points are in each polygon, grouping that polygon by a field in PostGIS

texts:
I have two shapefiles:  One point file (occ_master) and 1 polygon file (geol_1m). The point file represents mineral occurrences. The polygon file represents geology, which can be subcategorized by field lith_name, as displayed in the image. I need to find a way to determine how many mineral occurrences (points) occur in each lith_name. This query will allow me to figure out which geological unit has the most mineral occurrences.
I know it will involve a ST_Contains and GROUP BY query but it is my first day on PostGIS and so I am rather inexperienced.


texts:
I have a model that works well but I can't iterate with a batch process. Therefore, I would like to use a python script to iterate to avoid repetitive tasks.
I want iterate my model (that I have created in graphical modeler) and the iteration should create x layers for x cities instead of 1 layer for 1 city.
In this example the python script should iterate once for Bellinzona and once for Mendrisio and give two layers: one for Bellinzona, one for Mendrisio.
What I did? I took the script from history when my model ran successfully for Bellinzona (from the history of the processing algorithm dialog). Here you can see the script of the algorithm when run successfully for Bellinzona:
processing.run("model:Zone_geo_aut.amm", {'autoritamministrativaselezionata':' \"Aut_amm\"  =  \'BELLINZONA\' ','comuneselezionato':' \"nome_comune\"  =  \'BELLINZONA\' ','vettorecomuni':'dbname=\'condivisione\' host=postgis.ti.ch port=6400 sslmode=disable key=\'objectid\' srid=21781 type=MultiSurface checkPrimaryKeyUnicity=\'1\' table=\"pubb\".\"comuni_mu_poligoni\" (shape) sql=','vettorizones1s2s3':'C:/Users/T149323/Scaricati 08.07.2020/File_per_Simone/layers_QGIS/export_gespos_zone_geometrie riparate.shp|layername=export_gespos_zone_geometrie riparate','qgis:deleteduplicategeometries_1:Zone_excel':'memory:'})

You can see that the most important thing is BELLINZONA, because is the variable that have to change in the iteration. For example if instead of BELLINZONA I have had MENDRISIO as a result I have had another result representing MENDRISIO. My purpose is to change every time 'BELLINZONA' with the other cities (that are in an attribute table in an input layer of the model) during the iteration.
If I do this script:
aList = ('BELLINZONA','MENDRISIO')
anIterator = iter(aList)
for item in anIterator:
    print(item)

the result is:
BELLINZONA
MENDRISIO
so it should be enough to insert in the processing.run of the model the variable "item" that is the list of cities in aList and the iteration should run without problems. In fact, if I inserted in the processing run the variable item I should obtain once the first layer 'BELLINZONA' and the second and last layer 'MENDRISIO'. It is my wished result!
Based on the script above that works right I created the script that should integrate in the processing.run the list variable "item" giving the iteration with two results, namley a first vector layer BELLLINZONA and a second layer MENDRISIO:
import processing
aList = ('BELLINZONA','MENDRISIO')
anIterator = iter(aList)
i=1

for item in anIterator:
    processing.run("model:Zone_geo_aut.amm", {'autoritamministrativaselezionata':' \"Aut_amm\"  =  \'item\' ','comuneselezionato':' \"nome_comune\"  =  \'item\' ','vettorecomuni':'dbname=\'condivisione\' host=postgis.ti.ch port=6400 sslmode=disable key=\'objectid\' srid=21781 type=MultiSurface checkPrimaryKeyUnicity=\'1\' table=\"pubb\".\"comuni_mu_poligoni\" (shape) sql=','vettorizones1s2s3':'C:/Users/T149323/Scaricati 08.07.2020/File_per_Simone/layers_QGIS/export_gespos_zone_geometrie riparate.shp|layername=export_gespos_zone_geometrie riparate','qgis:deleteduplicategeometries_1:Zone_excel':"C:/Users/T149323/Scaricati 08.07.2020/File_per_Simone/gis_data/shapefile/test"+str(i)+".shp"})
    i+=1

This script creates two layers called test1 and test2. Good? Yes because there is no python error when it run, but the big problem is that they are empty! I don't understand why!
I have already created loop for iteration with number variable in Python for other QGIS algorithms or graphical modeler algorithms and all works right! I have the problem of the empty result in QGIS always (and ONLY) when the variable for the iteration is of type string like city or other names.
Could someone explain why I am not able to run loop in QGIS with string variables and someone could edit my last script code above?


texts: Updating table with arcpy make terminal hangs

texts:
I am using this simple code to update a table on ArcMap:

# Setup
tableName = 'myTable'
tableInput = tableName +'.dbf'
fldName = 'myField'

# Updating
tableUpdate = arcpy.UpdateCursor(tableName)
i = 0
pct = int(919814 / 4) # to show % of advancement
for row in tableUpdate:
    if row.getValue('FID') <= 919814:
        if row.getValue('FID') == pct:
            print('25% done')
        if row.getValue('FID') == pct*2:
            print('50% done')
        if row.getValue('FID') == pct*3:
            print('75% done')
        if row.getValue('FID') == pct*4:
            print('100% done')
    #
    row.setValue(fldName,data[i])
    tableUpdate.updateRow(row)
    i = i + 1
else:
    break

From the code: (a) 919814 is the total number of rows to be updated; (b) 'break' is used because there are more rows inside the table (i.e., others I don't want to update); (c) 'data' is a list of integers of length 919815.

My problem:

The codes works during the first attempt and the update is made in a few minutes. However, when trying a second attempt (because the data are changed), the terminal run the code but hangs in (possibly) an infinite loop. I never see the '25% done' coming up.

Any idea why?

To solve it, I have to re-start ArcMap... and reload all my data from a csv file.

EDIT:
I've seen the '25% done' coming but after 30 mins, instead of 4mins... I do not understand why it takes longer at each second attempt (CPU usage and RAM usage look fine).


texts: Saving QGIS Files With a Connects Underline

texts:
I have seen in some places, like this, that QGIS file names are made with a connect underline.

For example a file name will be "World_Map" and not "World Map".

Is this underline is somehow important or is it just the acceptable form of writing, without any significance?


texts:
I have some crime data in a point file for the whole united states.  I would like to run a hot spot analysis on the data in arcgis 10.4 using the Hot Spot Analysis tool.  Instead of running it for the whole united states, I have a CBSA/MSA field which of which I would further like to segment the hotspot analysis to account for these changes in political boundary.

Is this possible to do this with this tool without having to split the US up into these MSA/CBSA sub categories?  I cannot seem to find any information on the web on how this maybe done.


texts: Why is EPSG:4326 projection making trouble with the zoom?

texts:
I'm quite cartography illiterate.

I implemented an OpenLayers 3 map on my website and everything's working fine except for the zoom in/out. The first time the map loads, I can zoom into any city and it will update the zoomed in tiles accordingly showing the streets and all the info. However, after this initial zoom-in, if I zoom out and then try to zoom in on any other city, it won't load the tiles. It will still zoom in but I will only see some pixelated map tile because the current zoom level tiles are not updating properly.

I've tried pulling the tiles specifying other OSM sources (for example: "http://labs.metacarta.com/wms-c/Basic.py/1.0.0/basic/{z}/{x}/{y}.png") but this made no difference.

I've also tried setting an event on the map to refresh the tiles on click. I tried a couple of functions from OpenLayers API website, redraw(), render(), renderSync(), but none did the trick.

The only moment when zooming in/out actually works properly is when I don't explicitly set the projection on the view.

      var view = new ol.View({
      // projection: 'EPSG:4326',
      center: [0, 0],
      numZoomLevels: 1,
      zoom: 2
  });

Uncommenting the projection parameter will make the zoom in/out work flawlessly. Unfortunately, I have a set of coordinates I need to make the map aware of, and the only way of having them placed correctly is by using that projection.

Can you show me any way around this?


texts: Extracting rows from attribute table and save as new shapefile using ArcPy

texts:
I have a shapefile made up of polylines. Polylines have a contour attribute. I want create new shapefiles based on these contour attributes. Something like this:
depth = [-10, -20, -30, -40]
map = myfile.shp
for d in depth:
    for row in map:
        if row.contour == d
            add to newshape_d.shp

Sorry if this code makes no sense, but that is the gist of what I am trying to do.


texts: Converting NAD 83 State Plane Maryland Feet Coordinates from lat/long and vice versa using QGIS?

texts:
I need to convert a list of lat/lon points (in.csv file) into NAD 83 State Plane Maryland Feet and vice versa.

I know it can be done using ArcGIS, but I only have QGIS.

I am also quite new to QGIS.


texts: Using WMS layer transparency with Geoserver, Openlayers and Drupal?

texts:
I am using OpenLayers in Drupal to display Geoserver WMS data. I can get the layer to overly properly, however the raster layer (png) has a white background I cannot remove. I have created a style in Geoserver using:
         ...
         FeatureTypeStyle - Rule - RasterSymbolizer - ColorMap - ColorMapEntry

However, even though this style is referenced in the 'Styles' for the OpenLayers layer in Drupal, nothing I do to this style file makes any changes to the map. ie: the background is always white. I have also tried to use opacity to make the entire layer transparent, but nothing changes. Drupal does not seem to be applying the style to the layer.

I am not sure if it matters, but the Geoserver information is provided by an external WMS server: http://nowcoast.noaa.gov/wms/com.esri.wms.Esrimap/obs?service=wms&version=1.1.1&request=GetCapabilities

Has anybody had this problem and found the proper fix?


texts: Get LineString length in meters (Python, GEODjango)

texts:
In a Django model, I have a LineString field which holds GPS coordinates of a street route.
I know that I the .length holds the length of the LineString, but I don't know what unit the returned value is in.

The only docs I've found (https://docs.djangoproject.com/en/1.9/ref/contrib/gis/geos/#django.contrib.gis.geos.GEOSGeometry.length) don't say that.

I tried with simple lines and got the following results:

>>> l = LineString([(0, 0), (0, 1), (1, 1)])
>>> l.length
2.0

>>> l = LineString([(0, 0), (360, 0)])
>>> l.length
360.0

the second one, in my app, should be Earth's equatorial circumference expressed in meters (instead of 360).

So I guess the length is "unit-less", which leads to my question:

how can I convert the .length to meters, if the coordinates are GPS coordinates, expressed in degrees?
(less important, I'm just curious) the unit of measure of the returned value.


texts: Compilation of QGIS master branch under CentOS 6.3

texts:
I tried to compile QGIS master branch 1.9 (qgis-Quantum-GIS-b99ff61) under CentOS for many hours now as explained here and here / here

Compilation:

[  7%] Generating ui_qgsmapserverexportbase.py
File "/usr/lib64/python2.6/site-packages/PyQt4/uic/pyuic.py", line 2
exec /usr/bin/python /usr/lib64/python2.6/site-packages/PyQt4/uic/pyuic.py ${1+"$@"}
     ^
SyntaxError: invalid syntax
make[2]: *** [python/plugins/mapserver_export/ui_qgsmapserverexportbase.py] Error 1
make[1]: *** [python/plugins/mapserver_export/CMakeFiles/mapserver_export-.-stageinstall.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[  7%] Built target sextante-._otb_description-stageinstall
make: *** [all] Error 2

Against:

PyQt 4.10
Qt 4.6.2-26
Scintilla 3.3
Sip 4.14.5
QScintilla 2.7.1 (closest to Python 2.6.6 on CentOS)

I am without any idea how to solve this compilation. PyQt is working and can be imported.


texts:
I am creating a longitudinal profile in Google Maps.
For this, I created a function that lets you draw a line and when it disappears just drawn. So far there is no problem, but when I return to view this function that is hosted on a button, and I think the new profile line adheres to the old, not the new one is created.

Any suggestions?

this is my code:

var elevator;
var perfil1=[];
var data_val=false;
var total;
var cadena=[];
var elevationService = new google.maps.ElevationService();
function longitudinal(lat,lng){

    var elevator = new google.maps.ElevationService;
    for (var i=0; i<lat.length; i++) {
        perfil1[i]= new google.maps.LatLng((lng[i]),(lat[i]));
    }
    var path=perfil1;
    displayPathElevation(path, elevator);
        google.setOnLoadCallback(function () {
              google.load('visualization', '1', { 'packages': ['corechart'],         'callback': function
        () {
                chart.render(path);
              }});
            });

}

 function displayPathElevation(path, elevator) {
     // Display a polyline of the elevation path.
          // Create a PathElevationRequest object using this array.
      // Ask for 256 samples along that path.
       // Initiate the path request.
       chart = new             google.visualization.ColumnChart(document.getElementById('elevation_chart'));
     elevator.getElevationAlongPath({
    'path': path,
    'samples': 256
   }, plotElevation);
  }

   // Takes an array of ElevationResult objects, draws the path on the map
    // and plots the elevation profile on a Visualization API ColumnChart.
        function plotElevation(elevations, status) {
    var chartDiv = document.getElementById('elevation_chart');
     if (status !== google.maps.ElevationStatus.OK) {

         chartDiv.innerHTML = 'No se puede mostrar el gráfico en este momento: ' + status;
      return;
      }
     // Create a new chart in the elevation_chart DIV.
           var chart = new google.visualization.ColumnChart(chartDiv);

       var elevationPath = [];
        for (var i = 0; i < elevations.length; i++) {
         elevationPath.push(elevations[i].location);
          }
         // Extract the data from which to populate the chart.
         // Because the samples are equidistant, the 'Sample'
             // column here does double duty as distance along the
           // X axis.
               if(data_val==false){
              var data = new google.visualization.DataTable();
            data.addColumn('string', 'Sample');
                 data.addColumn('number', 'Altura');
             for (var i = 0; i < elevations.length; i++) {
               data.addRow(['', elevations[i].elevation]);

               }
                 data_val =true;
            }else {
              var data = new google.visualization.DataTable();

              data.addColumn('string', 'Sample');
               data.addColumn('number', 'Altura');
             for (var c = 0; c < elevations.length; c++) {
              data.addRow(['', elevations[c].elevation]);

            }

            }

         // Draw the chart using the data within its DIV.
            chart.draw(data, {
            height: 200,
             titleY: 'Altura (m)',
            titleX: 'Distancia '
              });

            map.removeInteraction(perfil_linea);

     }


texts: Leaflet info box only showing properties from selected layer

texts:
I would like to use the info box as shown in the tutorial interactive choropleth map with multiple layers and properties from different layers.
The idea is to only show the properties from the selected layer.

For example the infobox has both Statename and Cityname as properties. Statename is a property in the layer States and Cityname is a property in the layer Cities.

var info = L.control({position:'topleft'});

info.onAdd = function (map) {
    this._div = L.DomUtil.create('div', 'info');
    this.update();
    return this._div;};

info.update = function (pro) {
this._div.innerHTML = '
Information
' +  (pro ?
    'State ' + pro.Statename + '
City ' + pro.Cityname + ''
    : 'hover over map');};

info.addTo(map);

And to use the infobox the following three parts within the var for each layer

function infoFeatureStates(e) {
var layer = e.target;
info.update(layer.feature.properties);}

To empty the infobox

function resetInfoState(e) {
info.update();}

Eventlistener

function onEachFeatureState(feature, layer) {
layer.on({
    mouseover: infoFeatureState,
    mouseout: resetInfoState,});}

And similar functions for the other layer: infoFeatureCities, resetInfoCities, onEachFeatureCity.

When hovering over a feature from the layer States, the infobox now shows both properties, with the correct value for Statename and showing Cityname 'Undefined' as it is not a property of that layer. And vice versa when hovering over a feature from Cities layer.

I would like the info box to only be populated by the properties that are part of the selected layer (based on the feature selected by mouseover). So it doesn't show Cityname Undefined when hovering over a feature from layer States.

How do I tell the infobox with property belongs to which layer?
And how do I change which properties are shown depending on which feature (layer) is selected?

Or should I build something else completely?


texts: How to measure mean distance in search radius by PyQGIS?

texts:
I have a point layer with 250 features. I want to find mean distance for each point feature base on 500 search radius. In QGIS by "Distance Matrix" I can measure mean distance for each feature based on all points not in specific search radius. Also with below code (Measure distances between specific features in QGIS for Desktop) I can measure mean distance like "Distance Matrix":

from math import sqrt
layer = iface.activeLayer()
features = layer.getFeatures()
points = []
for feature in features:
    geom = feature.geometry().asPoint()
    points.append(geom)

n = len(points)

for i in range(n-1):
    for j in range(n):
        if i < j:
            print i, j, sqrt(points[i].sqrDist(points[j]))

I tried to improved this code like below to measure mean distance for each point in 500 meter search radius, but the results is not correct.

from math import sqrt
layer = iface.activeLayer()
features = layer.getFeatures()

points = []

for feature in features:
    geom = feature.geometry().asPoint()
    points.append(geom)

n = len(points)
i_count = 0
sum = 0

for i in range(n-1):
    for j in range(n):
        if i < j and (sqrt(points[i].sqrDist(points[j]))) <= 500:
                print i, j, sqrt(points[i].sqrDist(points[j]))
                sum += (sqrt(points[i].sqrDist(points[j])))
                i_count += 1
                print sum / i_count

what is the correct code for this purpose?


texts: Embedding python to select feature in QGIS action

texts:
I am working from QGIS actions with python and want go to select the current feature that I've identified using the identify tool.  (Key point is that there is a difference between identify and select).  What do I need for my action to make the current feature selected?

I have used
vlayer.setSelectedFeatures( [ ] )
but this so far hasn't allowed me to enter the current feature.

I've making use of previous posts to help me including:

Is it possible to take automatically a "screenshot" of my selected feature in QGIS using Python?

How to create a QGIS action which copies features between layers?

There is a little more to what I'm trying to achieve which is why I'm looking at actions.  Firstly I don't just want to select the feature I want to Zoom to the feature.  (I had sussed zooming to selected features).  The beauty of actions is that they are available from an attribute table and what's more in a relation within custom forms.  Hence I really wanted to achieve zooming to a feature using an action by right clicking on and attribute table.  These other options aren't available here.

An automated select on identify May be a solution, I would be interested learn more but would have to look at it.

The key is it needs to be a simple process for the user.


texts: Lose Domain Dropdown Function after using Geoprocessing?

texts:
I have a large geodatabase with multiple feature classes.

I ran Geoprocessing- Arc Toolbox - Data Management - Features - Add XY Coordinates. Then I copied these values into our existing X Coordinate and Y Coordinate fields using the field calculator.

However, now my set domains do not drop down in either the table or attribute window.

Has anyone else had this issue? Does anyone know how to resolve it? I dont' want to lose my domain functionality.

0

Tom,

None of the fields I populated had domains. And what's weirder, is it stripped the domain function from some features, but not all of them, in the same feature class.

For example I have 2 features across the road from each other - one lets me populate domains with drop downs and the other does not.

I did this in other feature classes and still have drop down attribute function.


texts: Why might data sources of Current ArcSDE layers vary in way they are listed?

texts:
I would be interested to know if someone can tell me why SDE Connection: Layer Data-source shows C:\USER\JOHN_SMITH and not DATABASE CONNECTIONS\****

Back ground is we are going through a migration process of switching our SDE layers at the moment. This involves doing a data listing of all the data sources on maps. During this process i have noticed the the data sources of the the Current SDE layers are varied in the way they are listed.

What i expect to see (happening some of time ) is below

Database Connections\NAME_OF_SDE.sde\NAME_FEATURE

But i am also seeing this

C:\Users\JOHN_SMITH\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog\NAME_OF_SDE.sde\NAME_FEATURE

i am thinking this might be related to where the data is pulled from. Say if it is coming directly from a the SDE or if it is dragged and dropped from a map. Then the user name might be picked up


texts: How to add points to points in polygon function

texts:
I have downloaded my shapefile and also a CSV file with the population of each location. Each population is associated to a meshblock (district) that has coordinates. I need to put this population onto a map but I can't seem to make these population's into points.

I tried using points in polygon function, but the drop down has no points to select from?


texts: OpenLayers ZoomBox control kills SelectFeature event firing

texts:
I have a navigation toolbar with some common OL controls such as Navigation and ZoomBox on it.

I also have a SelectFeature control that isn't part of the navigation toolbar b/c it should be active all the time for vector features. Each layer that is added to the SelectFeature control using setLayers() has a handler registered to the 'featureselected' event.

However, in cases where I choose the ZoomBox control my ability to select vector features disappears. I have to refresh the layer to get it back. I can work with the Navigation control (in fact many other controls too) and still have my vectors responding to the select event.

Has anyone else experienced this or know a work around? Even if you have a cool Firebug way to troubleshoot this issue I'd like to hear about it.

thx
mazery


texts: Rose diagram of direction values of polyline vector layer

texts: I have a vector layer of polylines with a set of multiple lines having length and bearing (azimuth in plane). I need to make some statistics on these lines, including the construction of rose diagrams over directions (with adjustable step on angles) and histogram of lines length distribution. How it is possible to achieve this in QGIS?


texts: How to attach a graph to a point feature class?

texts:
Is there any way to attach a graph to every point in a feature class?

When I click to identify a point in my map I want it to show me the characteristics from attribute table (as it actually shows) and a graph, unique of every point. These graphs are done in Excel.


texts: Selecting features from grouped shapefile

texts:
I have downloaded some glacier outlines from the GLIMS database (http://www.glims.org/maps/glims) as a SHP file.

This contains multi-temporal data, that is, more than one outline per glacier (more info on https://www.glims.org/Workshops/2017_vienna/glims_rgi_update_at_egu2017_splinter_meeting.pdf); outlines are grouped by glacier.

How can I extract a "snapshot" of a particular time (especially the most recent version in each outline group, knowing that different groups have different timestamps), if possible in QGIS? It is done in the presentation I have linked above, but with no explanation.

Sample data uploaded here (file glims_polygons): https://ufile.io/rvotq


texts: Choosing script writer/editor in QGIS Script Runner Preferences

texts:
I am a beginner to QGIS and have recently installed QGIS ver.3.82 onto my Windows OS laptop. I have downloaded the Script Runner plugin.

I want to use my favorite my script writer/editor (either PythonWin or Notepad++) to use as default for QGIS using the Script Runner Preferences from the toolbar menu: Plugins>Script Runner>Script Runner Version 3.05 window.

I then click-on the Preferences icon to open Script Runner Preferences window.

I click-on the check box enabling me to select my chosen script writer/editor to use as default by clicking on the three dots on the right (...) After this, another window opens allowing the user to select their chosen script writer/editor.

However, this method isn't working. After the new window for selection of our chosen script writer/editor appears. No matter whether I select my favorite script writer/editor, then click-on OPEN or whether I click-on CANCEL. I still receive the same frustrating Python error notification in a new window:

An error has occurred executing Python code:

Type Error: setText(self, str: Argument 1 has unexpected type 'tuple'

Python version 3.7.0 (v.3.7.0:...)
QGIS version 3.8.2 - Zanzibar ...

This very strange and frustrating. Because I am only trying to choose my favorite Python writer/editor as default in relation to QGIS. And no matter whether I choose my favorite with OPEN or click-on Cancel. The frustrating Python error notification still appears.


texts:
I am having problem with projecting my counties which are in GSC_1841/Hermannskoegel to WGS_1984 in ArcGIS Desktop 9.3. I tried the basic "project" with importing the existing coordinate system but that's pretty much it and nothing happens. Somebody advised me that first I have to change the ellipsoid manually, and then do the transformation using predefined seven values/numbers.

Could anyone be more specific?

Old Yugoslavia is the country.


texts:
I want to improve my bike routing. I know, that I can change the "costs" by changing the speed in the config file, but for me it's not detailed enough. A small subset of my config file looks like that:

wtr.tag.highway.track =          2,  71, 10,  bike
wtr.tag.tracktype.grade1 =       1,  81, 15, bike

What I wish to do is, that a highway=track which has ALSO the tracktype=grade1 as tag gets a higher speed (here 15) than a street, which is "only" declared as track (here 10).


texts: Equal (ish) areas Map Projection at the Tropics

texts:
What map projection (non-interrupted) preserves areas well for the entire tropical region?
I am thinking of using a Cylindrical Equal Area or a sphere based version of a Cylindrical Equal Area or Mollweide (http://spatialreference.org/ref/esri/54009/). My goal is to minimize area distortion.


texts: Debugging unexpected characters placed by ArcPy Python script tool in text element of ArcGIS Pro layout?

texts:
I am seeing something very unexpected from ArcGIS Pro 1.4.1 when exporting what should be the same PDF from the same ArcPy script and same data using two methods.

When I run the script from IDLE the title of the map looks like below:

When I run the same script from an ArcGIS Pro project pane by placing it behind a Python Script Tool (that has no parameters set for test purposes) it looks like below:

The single text element that is displaying CALTON HILLS and SURFACE GEOLOGY in both cases is having its contents set by the line of code below:

elm.text = '<FNT name="Arial" size="24">{0}
<FNT size="14">\n{1} GEOLOGY</FNT></FNT>'.format(mapName,geologyType)

(note that in the text above there is a \njoining the two lines that is not getting rendered within the question - the Python code is all on one line)

where elm is a text element object from lyt.listElements("TEXT_ELEMENT"), mapName is set to "CALTON HILLS" and geologyType is set to "SURFACE GEOLOGY".

Where might these three additional characters be coming from, and why would they only manifest themselves when the same script is run on the same data from the ArcGIS Pro custom tool?

My script saves a copy of the APRX used to create the PDF immediately after the PDF is created.  The three additional characters are visible in the text element when it is examined in the copy of the APRX, but not in the APRX that is opened at the beginning of the script.  Consequently, it does not appear to be the ExportToPDF that is causing it.

A similar symptom is seen in another place on the same map where different text elements that are putting out longitude/latitude values at the corners of the map face have an A with a circumflex accent inserted before the degree symbol.

The problem only emerged after a custom font was installed on my machine to support some geological labels like the one circled in red below:


texts: Adding point then saving it to ArcGIS Server?

texts:
I use ArcGIS for Server. I have all of my data for my feature layer on that database. The point is being added by coordinates, but it is not saving to the database. I am getting the error "An error occurred in the database" in my server logs.

My code is below.

Here is the log:

<?xml version="1.0" encoding="utf-8" ?>
<Msg time='2014-03-31T11:06:05,468' type='SEVERE' code='17000' target='Calvert_City_Test.MapServer' methodName='GraphicFeatureLayer.Add' machine='ARCGIS-PC' process='696' thread='3204' user='anonymous' >A database error occurred.</Msg>
<Msg time='2014-03-31T11:06:05,810' type='SEVERE' code='17000' target='Calvert_City_Test.MapServer' methodName='GraphicFeatureServer.HandleREST_ApplyEditsOperation' machine='ARCGIS-PC' process='696' thread='3204' user='anonymous' >A database error occurred.</Msg>
<Msg time='2014-03-31T11:08:49,895' type='SEVERE' code='17000' target='Calvert_City_Test.MapServer' methodName='GraphicFeatureLayer.Add' machine='ARCGIS-PC' process='696' thread='3204' user='anonymous' >A database error occurred.</Msg>
<Msg time='2014-03-31T11:08:49,965' type='SEVERE' code='17000' target='Calvert_City_Test.MapServer' methodName='GraphicFeatureServer.HandleREST_ApplyEditsOperation' machine='ARCGIS-PC' process='696' thread='3204' user='anonymous' >A database error occurred.</Msg>

Each time I add it produces two error messages. This is showing me trying to add a feature two separate times.

Here is my XAML:

  <esri:FeatureLayer ID="Meters"
                    Url="http://xx.xx.xxx.xx/arcgis/rest/services/Calvert_City_Test/FeatureServer/2"
                    MouseLeftButtonUp="FeatureLayer_MouseLeftButtonUp"
                    DisableClientCaching="True"
                    OnDemandCacheSize="0"
                    Mode="OnDemand"
                    AutoSave="False"

C#:

 private void CorrectInformationButton_Click(object sender, RoutedEventArgs e)
        {
            CheckAddedPoint.Visibility = Visibility.Collapsed;
            OptionsPortal.Visibility = Visibility.Visible;

            FeatureLayer featurelayer = MyMap.Layers["Meters"] as FeatureLayer;

            double latitude = Convert.ToDouble(addLat);
            double longitude = Convert.ToDouble(addLong);

            Graphic graphic = new Graphic()
            {
                Geometry = _mercator.FromGeographic(new MapPoint(longitude, latitude)),
                Symbol = LayoutRoot.Resources["DefaultMarkerSymbol"] as ESRI.ArcGIS.Client.Symbols.Symbol
            };

        graphic.Attributes["OBJECTID"] = 244;
        graphic.Attributes["PWSID"] = "55555";
        graphic.Attributes["CIS_METR"] = addAccount;
        graphic.Attributes["CUSTYPE"] = " ";
        graphic.Attributes["SIZE"] = Convert.ToDouble(5);
        graphic.Attributes["TYPE"] = " ";
        graphic.Attributes["OTHTYPE"] = " ";
        graphic.Attributes["MANUF"] = " ";
        graphic.Attributes["MODEL"] = " ";
        graphic.Attributes["YEAR"] = " ";
        graphic.Attributes["TESTDATE"] = " ";
        graphic.Attributes["MASTER"] = " ";
        graphic.Attributes["MBOX"] = " ";
        graphic.Attributes["MBOXTYPE"] = " ";
        graphic.Attributes["PLACE"] = " ";
        graphic.Attributes["STR"] = addStreet;
        graphic.Attributes["CITY"] = addcity;
        graphic.Attributes["COUNTY"] = " ";
        graphic.Attributes["AGENCY_CON"] = " ";
        graphic.Attributes["CONTACT"] = " ";
        graphic.Attributes["LAST_UPDT"] = " ";
        graphic.Attributes["XY_SOURCE"] = " ";
        graphic.Attributes["XY_ISSUES"] = " ";
        graphic.Attributes["COMMENTS"] = addName;
        graphic.Attributes["SHAPE"] = null;

            featurelayer.Graphics.Add(graphic);
            featurelayer.SaveEdits();
        }


texts: How do I work around floating-point errors using ST_SubDivide?

texts:
I'm using ST_SubDivide() to speed up some complex calculations to answer a question. Yet I'm noticing there is a different boundary on the geometry that results from ST_SubDivide(). Essentially, I have a query that works reasonably well until ST_SubDivide(). Then it intersects with other polygons that it wouldn't otherwise intersect with. I'm running an query and joining with ST_Intersects in my actual app.

# SELECT gid, ST_Area(ST_Union(geom)) - ST_Area(state.geog::geometry)
FROM census.state
JOIN (
  SELECT
    gid,
    ST_SubDivide(geog::geometry,10) AS geom
  FROM census.state
) AS t
  USING (gid)
GROUP BY gid
HAVING NOT ST_Equals(state.geog::geometry, ST_Union(geom));

 gid |       ?column?
-----+-----------------------
  34 |  1.03028696685215e-13
  43 | -1.18529221992958e-08
  25 | -3.64934146901419e-07
  32 |  8.88178419700125e-16
   8 | -8.51020365288946e-09
  12 |  5.55111512312578e-16
   1 | -7.74611432774464e-08
  10 | -1.11022302462516e-14
  26 | -5.37694003810429e-06
... contd.

For reference, I'm trying this with 2016 TIGER state date. I loaded it with

shp2pgsql -DIGc -s 4326 census/tiger_state/*.shp census.state | psql`

I got the idea from a video cast by Regina Obe

  For any geometry you give it, it will chop it up into smaller bits. And this is useful for performance reasons. For example, if you have a huge state it's often useful to chop that into smaller polygons. So when you do intersects the number of points that it has to be dealt with are a lot fewer. So here is an example where I take four states, so I have four rows and then I pass it through the SubDivide function. [...] So you have four states converted to 186 polygons.


texts: I searched on Google, found few things, aren't there many of them?


texts: Different colours for touching lines on MapInfo?

texts:
I am creating maps for surveyors showing different sections of roads. The start and end points need to be clearly visible so I am using a Region IndValue thematic map.

However, sometimes when an area has a very large number of segments the odds are that the large number of colours displayed mean some sections are similar to the colour of the backdrop mapping.

I have remedied this slightly by removing these colours from the default template.

But I was wondering if there was a way to have smaller range of colours as the only thing I need to ensure is that lines that are touching each other do not have the same colour? Is there a way to do this?

Thanks,
Alan


texts:
I recently purchased a new PC (OS: Windows 10 Pro, ver. 20H2, build 19042.868), into which I installed one after another (with clean installations) different single versions of QGis (3.10.14, 3.16.4, 3.18), but every release, with any different project I work with, gives me the same annoying problem: QGIS freezes repeatedly, for a time ranging from a few seconds to a few minutes, anytime I launch any type of command (editing, adding/removing layers, panning/zooming, etc…): it is not really possible to work with QGIS…
Further detail: any external plugin is disabled.
In addition to that, in the same machine, I installed, under Oracle VM, Ubuntu 20.04.2 LTS and QGis 3.18: in this case the QGis works just fine.
Should I then assume that it is in OS problem?
How can I resolve this problem?


texts:
I have 2 layers that I want to compare. I wish to retrieve the features in the layer 1 that have no part in common with the features in the layer 2. I try queries like that but do not returns me the expected result :

select * from c1 join activite.c2
on st_disjoint(c1.geom, c2.geom)
WHERE c2 blabla' ;

I get here (except error) a table that lists for each feature in the layer 1 those of layer 2 who do not cut it. But how to recover those of layer 1 which are intersected by any of the layer 2 ? Hope it s clear...


texts: How to refresh a layer after filter features in pyqgis

texts: When I queried some features using QgsFeatureRequest().setFilterExpression() in pyqgis,I want to make the current layer just only show what I queried without creating a new memory layer. Just like you right click on a layer in qgis and filter features you want,the layer will be changed and no new layer will be created.So what should I do? Or is there any other ways without using QgsFeatureRequest().setFilterExpression().


texts: Uploading file geodatabase to PostgreSQL database schema?

texts:
I'm attempting to load a file gdb to an alternate postgresql database schema.
The process works OK with the following but uploads to the public schema.

ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=GIS user=postgres password=xxxxxx" "C:\test.gdb

Can anyone assist?


texts: Recording coordinates of Scene view in ArcGIS Pro

texts:
I am teaching my GIS class this year using ArcGIS Pro 2.0.  Some of the lessons involve using 3D scenes.  Is there a way for me to direct my students to a specific view of a scene for me to visually inspect a screenshot that they provide.  For example, I would like to be able to direct them to show me what their scene looks like at this particular location by entering the coordinates I give them for my scene, including elevation and azimuth, and comparing it to theirs:

I cannot determine how to record those values and then use something like the old "Go to" tool from ArcMap to find that view.


texts: Create a point in intersection of 2 lines postgis

texts:
As an ArcGIS user this is simple but in PostGIS has became a nightmare. But well I guess this is typical in beginners like me.

I have 2 layers (multilinestring) called roads and waterways, I'm trying to do a intersection between them that will result in points, but so far I had problems with geometry, this is what I have done:

SELECT r.gid as rgid, r.name as rname, r.type as rtype, w.gid as wgid, w.name as wname, w.type as wtype, ST_DUMP(ST_INTERSECTION(w.geom, r.geom)) as rw_geom,
COUNT(DISTINCT r.gid)
FROM waterways w, roads r
WHERE ST_INTERSECTS(w.geom, r.geom) AND w.gid < r.gid
GROUP BY r.gid,w.gid,ST_INTERSECTION(w.geom, r.geom);

The first thing was renaming the attributes, because it shows error for duplicity, then I break the multiline and intersect them, after uses functions to avoid duplicity (according to what I have read in manuals and other questions) and group (in this point if I don't use r.gid and w.gid it won't work)

After all this I get this as result

What I'm doing wrong?


texts:
I recently reinstalled PostGIS on my pc, following
these instructions link.
The installation is successful, and for several days work using PostgreSQL and PostGIS without problems.
Now, I need to insert some shapefile within my database, but trying to execute the command "shp2pgsql" I get this result:

abominio@abominio-X555LD:~$ shp2pgsql --help
Il programma "shp2pgsql" non è attualmente installato.
È possibile   installarlo digitando: sudo apt-get install postgis

I tried to do a search

sudo find / -name shp2pgsql

but I do not get results.
currently I'm using Postgres 9.3 and PostGIS 2.1.6.
why I do not have this function? how can I fix?


texts: Pedestrian network analysis for campus routing in QGIS?

texts:
I am working on creating a network analysis routing system for a school campus. As of right now I am just focusing on calculating the network analysis based on 10 buildings. I want the user to be able to find the quickest route to get from one building to the next, so they know how long it will take for them to get to class.

I have tried to use the 'Road Graph' plugin, but I am doing network analysis based off of pedestrians walking from building to building, this plugin seemed more accurate for mobile transportation, not as much walking. I have tried I have had more success at creating a network in ArcGIS, but I am trying to keep this project completely open source. (I am not a very talented programmer, so the least amount of algorithms the better.)

What is the most accurate tool/ plugin/ method for calculating network analysis for campus (pedestrian) routing in QGIS?


texts: Change center of map in OpenLayers dynamically

texts:
Is there a way to change the center of the map in OpenLayers dynamically? For example on button click. It would be too much to ask a "fly to" functionality and as I read this is offered in OpenLayers 3 but currently I am using OpenLayers 2 and we don't plan to migrate.

I tried something as simple as:

map.setCenter(22.191969,38.784336,7);

but this doesn't work..


texts: I want to know about the safety of data shared in an ArcGIS server network. Can someone hack into the network and steal the data? Suppose we create an ArcGIS web service and put up an application, can someone steal/hack the data in that web application?


texts:
I would like to use the Oblique Mercator projection in GeoTools.

I'm currently using a WGS84 Mercator projection like this:

        final CoordinateReferenceSystem wgs84CoordSystem = CRS
                .decode(LATLON_EPSG_CODE);
        final CoordinateReferenceSystem worldMercatorCoordSystem = CRS
                .decode(MERCATOR_EPSG_CODE);
        final MathTransform latLonToMercator = CRS.findMathTransform(wgs84CoordSystem,
                worldMercatorCoordSystem);
        final MathTransform mercatorToLatLon = CRS.findMathTransform(worldMercatorCoordSystem,
                wgs84CoordSystem);

The Oblique Mercator EPSG code doesn't appear to be supported (and I want to be able to specify the latitude of centre and azimuth anyway).

Could anyone give me an example of how to create a WGS84 Oblique Mercator projection and MathTransform to allow me to convert to/from Lat/Lon please?


texts: I have QGIS 3.12.1 which doesn't have any GDAL options in the Raster Menu. Also in the Plug-In menu I cannot find GDAL. Does any know how I can add this?


texts: I wanted to convert Raster into Point Vector in QGIS. Is it possible? QGIS have option to convert it into polygon but i didn't found any tool to convert it into point. can anyone help me?


texts:
I am trying to converta batch of ecw aerial photos to jpg in arcmap using the  ( Raster to other format) but each time it converts 4 or 5 images  and then fails and show this message.

i tried to convert them using FME and the issue still there,
Is there any method to convert the photos using arcmap and what might be the issue with them.
i tried to do the same operation on more than one PC and the issue is the same.
any suggestions??


texts: Geodjango InspectDB Fails on Postgis Raster_Columns View

texts:
I am trying to generate models for an existing Postgresql database using the Django InspectDB command. Models are produced but a failure occurs on the raster_columns view. The error is:

 Exception: Could not find a geometry or geography column for "raster_columns"."extent". Inspectdb does not continue generating models for the remaining tables.

This makes sense because raster_columns is a system view created by Postgis. Looking at the definition of the geography/geometry_columns views, the raster_columns table is explicitly filtered out from them. Since the Extent field in raster_columns is a spatial type but does not exist in the geometry/geography_columns views, the model generation fails.

Anybody know how to get around this aside from generating the models by hand?
...


texts: Taking line substring from pgr_withpoints output

texts:
I want to compute the shortest route through a network between two arbitrary points along edges in the network and then get the line substring for that route. I have achieved this with the code below but it only works when the line fraction corresponding to the starting point is smaller than the line fraction corresponding to the end point due to the requirements of the ST_LineSubstring() function.
I know that I could use the least() and greatest() functions to get around this but I won't know from the output if the start and endpoints have been switched. I would also like to reverse the order of the vertexes with ST_Reverse() in cases where the order of the start and end point have been reversed.
Is there a way to do this which would produce output indicating whether the order of vertices was reversed while also performing this reversal?
CREATE TEMP TABLE temp(pid serial, edge_id bigint, fraction float);

INSERT INTO temp(edge_id, fraction) VALUES
  (<STARTING EDGE ID>, <STARTING EDGE FRACTION>),
  (<ENDING EDGE ID>, <ENDING EDGE FRACTION>);

WITH route AS (
  SELECT * FROM pgr_withPoints(
    'select id, source, target, the_geom, cost from edges',
    'select pid, edge_id, fraction from temp',
    -1, -2, directed => false)
),

edges_geom AS (
  SELECT * FROM edges, route WHERE edges.gid=route.edge
),

edges_union AS (
  SELECT ST_LineMerge(ST_Union(the_geom)) AS geom FROM edges_geom
),

startFrac AS (SELECT ST_LineLocatePoint(
  (SELECT geom FROM edges_union),
  ST_LineInterpolatePoint(
    (SELECT the_geom FROM ways WHERE gid=<STARTING EDGE ID>),
    <STARTING EDGE FRACTION>
  )
)),

endFrac AS (SELECT ST_LineLocatePoint(
  (SELECT geom FROM edges_union),
  ST_LineInterpolatePoint(
    (SELECT the_geom FROM ways WHERE gid=<ENDING EDGE ID>),
    <ENDING EDGE FRACTION>
  )
))

SELECT ST_LineSubstring(
  geom,
  (SELECT * FROM startFrac),
  (SELECT * FROM endFrac)
) FROM edges_union;


texts: Discrepancies in reprojection to British National Grid using different software

texts:
I am converting coordinate values from EPSG 4326 (lat long) to EPSG 27700 (British National Grid).  I have used QGIS and am then verifying the results using GDAL, but I am find that for higher latitudes the results do not match:
Using QGIS

Long
Lat
BNG_X
BNG_Y

-3
61
346015
1235698

-4
61
291937
1236937

Using GDAL (gdaltransform -s_srs EPSG:4326 -t_srs EPSG:27700)

Long
Lat
BNG_X
BNG_Y

-3
61
345920
1235625

-4
61
291850
1236864

What is causing this divergence of results at more northern latitudes?


texts: Covert Multipatches to Shapefile and back to Multipatch

texts:
I'm working with ArcMap 10.3.1.
I want to convert a CAD-Drawing including Multipatches to Shapefiles and reconvert them.
After reconverting there are hundreds of circles. This Problem is a result of converting Inserts.

Is there a way to avoid These circles?


texts: ArcGIS 10. Convert dbf to csv or similar in ArcPy without cursors

texts:
I have many dbf's created by the Spatial Analyst Sample tool.
I would like to convert those dbf's into csv's or space delimited (or any text for that matter).
I can't seem to find the ArcPy equivalent of "Right click table > Data > Export"

There are a few ideas I saw, which include the use of cursors:
Exporting table to XYZ ASCII file via ArcPy?
and
Bulk convert DBF to CSV in a folder ArcGIS 10.1 using Python

Is there anything simpler and quicker?
My tables have over 3 million rows each.
I did see the mention of "arcpy.ExportXYv_stats", but that fails with input table is not recognized format etc.

Alternatively, where can I find their dbf specifications?
Fortran should be faster.


texts: Joining attribute data from one layer to another layer in QGIS 2.12.2-Lyon

texts:
I have a polygon vector layer that I am trying to join its attributes to a point vector layer. The problem is that the polygon layer consists of grids that are numbered 1-150 (ID) and I am trying to join these grid ID's to over 1000 yield points that fall within the grid (some points actually do not fall within the grids). Every time I perform the join (in properties), the attributes come up as 'NULL'.
This is basically what I am trying to achieve:

.


texts: Writing feature class attributes and counts to Excel workbook in Python?

texts:
I have a feature class with 3 fields that I would like to reference later in an excel workbook.  They are all represented in 3 different maps.  I would like to show the the attribute counts for these 3 fields in Excel.  The purpose of this is to ultimatelly create an automated process with Adobe Indesign for map book creation.

The ideal process would be:

Select feature class attribute to be shown on map.
Python automation to show the number of features displayed on map, written to text file or excel workbook.
I don't want every column or row written, only the attribute displayed in layout or data view in ArcGIS.
I would like to complete this from the Python window in ArcGIS for QA/QC purposes.


texts: Raster to Vector, Reduce to Vector - Layer 1: Layer error: must be integral

texts:
I am trying to get the centroids of some landsat pixels, but I am getting the error, Layer 1: Layer error: Image.reduceToVectors: First band ('B1') of image must be integral..

Here is my code:

https://code.earthengine.google.com/9f65e14d883e8bad6f1e9b4fd0f28915

//mean of all data
var l8 = l8.mean().clip(one).select('B1');

//convert to points
var vectors = l8.reduceToVectors({
geometry: above,
crs: l8.projection(),
scale: 30,
geometryType: 'centroid',
maxPixels: 100e9
});

Map.addLayer(vectors);


texts: In MapBasic, how do I open a connection to MapMarker so I can allow my app to geocode?

texts:
I would like my app to open up MapMarker and automatically geocode for me.  I cannot get past the Open Connection statement as I am receiving an error while compiling.  Here is the code:

Include "mapbasic.def"

Dim CnctNum As Integer
CnctNum = 1

Open Connection into Variable CnctNum Service Geocode MapMarker
Interactive off

The error that I am receiving says "Found [interactive] while searching for [url]."  I am only looking to connect to MapMarker so I am not sure why I am receiving this error.


texts: Populate field with drive time values during isochrone creation in Carto

texts:
I'm creating isolines (isochrones) in Carto to show 15, 30, 45, and 60 minute drive times from a set of points in a shapefile. Here is the SQL I've written to create those isochrones in an empty table. But I'd also like to populate a field with the corresponding drive time, so 15, 30, 45, or 60. Here is my SQL:

INSERT INTO <my_empty_table> (the_geom, point_name, latitude, longitude, drive_time)
    SELECT (cdb_isochrone(the_geom, 'car', ARRAY[900,1800,2700,3600]::integer[], ARRAY['is_destination=true','mode_traffic=enabled','quality=1']::text[])).the_geom,
      point_name, latitude, longitude, ??????
      FROM <my_points_table>

This SQL (minus my new "drive_time" field) works, because I've successfully run it. But what I'm struggling with now is what to write in place of the ?????? so that I can populate the new drive_time field with the corresponding drive_time that's being calculated in ARRAY[900,1800,2700,3600]. (The isochrone array is in seconds, which is why my minutes are multiplied by seconds to get 900, 2700, etc., although for the drive_time field I'd like them to simply read 15, 30, 45, 60).

I'm thinking it's something like XXX.drive_time, but I'm not sure what XXX should be. I tried (ARRAY[15,30,45,60]::integer[]).drive_time but got the error: Error in SQL query: column notation .drive_time applied to type integer[], which is not a composite type, so I obviously do not know what I'm doing.

For reference, here are Carto's isoline functions: https://carto.com/developers/data-services-api/reference/#isoline-functions


texts:
How to filter shapefiles data in R with dplyr and then put it in a leaflet map?

not reproducible example sorry:

library(dplyr)
library(leaflet)
library(sp)
library(maptools)
library(rgdal)

lines<- readShapeLines("test",verbose=TRUE, proj4string=XXX)
lines@data<-lines@data %>%
  filter(X>400,Y=="YES")

m = leaflet() %>% addTiles()
m %>%addPolylines(data=lines,col="blue")

I woulk like to make a leaflet map only with the data selected (attribute X>400 and attribute Y =="YES") ,

"addPolylines(data=lines)" add all lines in the shapefiles

(do I need to merge lines@data with lines?)


texts: How to calculate object real life location from self driving car?

texts: I have a video made from a car together with GPS information (location coordinates, altitude, speed, track to true North degrees and other. Also I have a 3gf file of g-sensor but I’m not able to parse it). I ran object detection and now I need to calculate coordinates of the detected object (latitude and longitude). However, I can’t find a formula for how to do it. Can anyone give me some examples on how to do it?


texts:
First of all, I realize that this question can be considered like "open" or maybe "too wide" (and definitely very basic for all of you). However, I am completely new in this and I am not looking for more then several hits where to begin, which topics I should search for.

Also, I search for some similar questions and I found few open questions with similar meaning (Java, GIS knowledge…What next?, The Best books from ESRI, Where can I find QGIS tutorials and resources?) so I hope someone can help.

The Issues:

I have data in geographical coordinates which I would like to project them into geomagnetic coordinates.

What do I need for that? Is information on the internet enough to solve this or I should search for a book? What should I search for?


texts: Tutorial for publishing and consuming toolbox using ArcGIS Server 10.1

texts:
Is there a simple tutorial for publishing and consuming toolbox using ArcGIS Server 10.1.

In 10 I can just right click and publish my tools but in 10.1, things seems to change a lot.

May I know if there is any simple tutorial from start to end?


texts:
I would like to list all image available years of image collection and use it as an item for ui.Select. I have tried to figure out a code for it, but it is not working. Is anyone can help me to improve it?

var collection = ee.ImageCollection('MODIS/006/MOD13Q1').select('NDVI')};

var allDates = ee.List(collection.aggregate_array('system:time_start'));
var allDatesSimple = allDates.map(function(date){
  return ee.Date(ee.Date(date).format('YYYY')).millis();
  }).distinct();
print(allDatesSimple);

var year_select = ui.Select({
  items: allDatesSimple.getInfo(),
  onChange: function(value) {
  var year_number = value
  },
  style: {width: '200px'}
});


texts: Can labels for overlapping points be combined/merged into one label?

texts:
I have points representing sample locations. Often, multiple samples will be taken in the same location: multiple points with the same location but different sample IDs and other attributes. I'd like to label all points which are co-located with a single label, with stacked text listing all the sample IDs of all the points in that spot.

Is this possible in ArcGIS using either the regular labeling engine or Maplex? I know I could work around this by creating a new layer with all the sample IDs for each location in one attribute value but I'd like to avoid creating new data just for labeling.

Basically I want to go from this:

To this (for the topmost point):

Without doing any manual editing of the labels.


texts: Can OpenLayers 4 shift the showing position of overlaying tile map?

texts: I'm now overlaying some tile image maps on basemap, by using OpenLayers 4. But some layer data is not accurate, so feature positions of the layer are little shift from that of basemap. To avoid this, I want to show the layer little shift from original tile position... is it possible in OpenLayers 4?


texts:
I am pretty new to ArcMap, only learning this program within the last few days.

I have this parcel data in a .shp file, as well as a proposed highway. I need to find the addresses of each parcel and export them into a database, excel file, etc..

I know I can use the Geocode tool and find the address by holding the left-click button, but I am not sure how to extract the information.


texts:
I have one GeoTIFF file with 2 bands. The data type is Byte. I want to calculate (Band2-Band1)/(Band2+Band1).

But the following command provided a dark image:

gdal_calc.py -A infile --A_band 1 -B infile, --B_band 0 --outfile outfile --calc "(A-B)/(A+B)"

Does gdal_calc.py not calculate arithmetic with in the same file?

EDIT:

I run the following code using python:

import subprocess
gcalc = 'C:\\Users\\cleo\\Documents\\gdalpys\\gdal_calc.py'

a = 'D:\\a.tif'
b = 'D:\\b.tif'
outfile = 'D:\\result.tif'
expr = '(A-B)/(A+B)'
subprocess.call([sys.executable,gcalc,'--type','Float32','-A',a,'--A_band','1','-B',b,'--B_band','0','--outfile',outfile,\
    '--calc',expr],shell=True)
a,b,outfile = None, None,None

gdalinfo -stats is as follows:

Driver: GTiff/GeoTIFF

Files: D:\tt.tif

Size is 36001, 36001

Coordinate System is:

GEOGCS["WGS 84",

    DATUM["WGS_1984",

        SPHEROID["WGS 84",6378137,298.257223563,

            AUTHORITY["EPSG","7030"]],

        AUTHORITY["EPSG","6326"]],

    PRIMEM["Greenwich",0],

    UNIT["degree",0.0174532925199433],

    AUTHORITY["EPSG","4326"]]

Origin = (-0.000138888888898,0.000138888888884)

Pixel Size = (0.000277777777778,-0.000277777777778)

Metadata:

  AREA_OR_POINT=Area

Image Structure Metadata:

  INTERLEAVE=BAND

Corner Coordinates:

Upper Left  (  -0.0001389,   0.0001389) (  0d 0' 0.50"W,  0d 0' 0.50"N)

Lower Left  (  -0.0001389, -10.0001389) (  0d 0' 0.50"W, 10d 0' 0.50"S)

Upper Right (  10.0001389,   0.0001389) ( 10d 0' 0.50"E,  0d 0' 0.50"N)

Lower Right (  10.0001389, -10.0001389) ( 10d 0' 0.50"E, 10d 0' 0.50"S)

Center      (   5.0000000,  -5.0000000) (  5d 0' 0.00"E,  5d 0' 0.00"S)

Band 1 Block=36001x1 Type=Float32, ColorInterp=Gray

  NoData Value=1.175494351e-038


texts: How to append geographic features into a .dgn file?

texts: How can I export all the geographic features of a featureclass into .dgn (Microstation) file using C#/ArcObjects? I was able to create a new .dgn file and I want to export all the geographic features of a selected feature class into that newly created .dgn file.


texts: Create Drag Drop Pegman Using OpenLayers 4

texts:
Here is a fiddle of my progress: http://jsfiddle.net/pegues/a5mn1ogu/

I've been trying to figure out how to create a drag and drop marker using OpenLayers like what is found with Pegman in Google Maps. I've successfully added a marker to the page, either on page load or by clicking a button. But I need to actually duplicate the behavior identical to how Google uses Pegman at maps.google.com to load streetviewer. I have no idea how to proceed with producing this behavior.

I've tried using HTML5 drag behavior, but that doesn't work:

document.getElementById('pegmanButtonDiv').addEventListener("dragstart", function(e) {...}

There are no examples similar to pegman with drag and drop markers at: http://openlayers.org/en/latest/examples/

I was successfully able to use interact.js to be able to implement drag and drop (interactjs.io#drag-and-drop), but this is independent of the OL canvas. I'm at the point where I need define the interact.js DOM element as an OL marker, then when dragged and dropped capture the coordinates where the marker was dropped in the OL map. Perhaps I also need to load a GEOJSON file to specify the bounding box region in interact.js?


texts: Problem with adding a point-feature in QGIS

texts:
Problem: when I add a point-feature to a vector layer it doesn't appear where it is supposed to.
Here's what the process looks like:

I create a vector Shapefile with point as a geometry type and add two fields (one for North coordinate and one for East coordinate). Field type: Whole number. I apply the same CRS (SWEREF99 TM) as the project has.

I turn on toggling for the layer and click on "Add point feature".

I click on a random spot on the map and enter the coordinates which I have gathered from a website. The website is a local (Swedish) equivalent of Google Maps. I use it because It provides coordinates for SWEREF99 TM CRS.

I insert the coordinates and the point does not land on the spot where it should, rather in the vicinity of it. I even downloaded a georeferenced (SWEREF99 TM) satellite photo of the area and hovered over the spot where the point should be and noted the coordinates. Then I inserted those coordinates into this vector layer and still the point ends up in the wrong place. No matter which way I do it, it always appears in the wrong place, we are talking ca 2 to 10 cm off every time. I even tried inserting North coordinates into East coordinate field and vice versa but nothing works.


texts: Using layer variable to address attribute column for styling?

texts:
I would like to use a (new) userdefined layer variable, here "style_variable" (picture 1), to address a column in the attribute table (picture 2). The layer style a little complex (picture 3), but in the end i want to colour features
based on its values (type: double) in the attribute table.
The columns name in the attribute table is VZ_A_L2_NA. To address this column i defined the layer variable with "VZ_A_L2_NA".
The main reason is that i want to style the this layer in various ways based on various columns in the attribute table. I thought if i only have to change the value of the layer varibale style_variable, i dont have to change the whole expessions.
Is that even the right way and is it even possible via expressions?


texts: How to save an OSM nominatim query's output to a csv file?

texts:
We have to reverse geocode 1000's of address and want the output of the queries in a csv/txt format. Currently if i run this query in a browser

https://nominatim.openstreetmap.org/reverse?format=xml&lat=15.052367&lon=-23.4668449999999&zoom=18&addressdetails=1

getting proper results

    <result place_id="162512055" osm_type="way" osm_id="388397021" ref="Ribeira de São Domingos" lat="15.0517782" lon="-23.4655677" boundingbox="15.0345067,15.052133,-23.4811055,-23.4651987">
Ribeira de São Domingos, Achada Baleia, São Domingos, Cape Verde
    </result>
    <addressparts>
    <road>Ribeira de São Domingos</road>
    <village>Achada Baleia</village>
    <county>São Domingos</county>
    <country>Cape Verde</country>
    <country_code>cv</country_code>
    </addressparts>
    </reversegeocode>

How to save this output directly to a csv or a txt file with respective headers ?


texts: QGIS error while importing .shp file, missing geometry (gdal issue)

texts:
In Manjaro Linux (Antergos as well and so I suppose vanilla Arch), with QGIS 3.2 + gdal from official repository, and QGIS 3.4 + gdal-ecw from archgeotux repository, when I try to add a .shp the output is

ERROR 1: Error in fread() reading object of size XX at offset YYY from .shp file

And the result is that some of the geometry in the .shp are missing.

(note that this error doesn't appear with all my .shp, some of them work perfectly)

See this for reference: https://trac.osgeo.org/gdal/ticket/4203, the problem is the same but no solution.

Meanwhile, with Ubuntu 18.04 for example (but Windows as well) all my .shp files load correctly.

Anyone with Manjaro or Arch have a clue about this?


texts: python application extension onCreateFeature

texts:
Trying to populate certain attributes as soon as a feature is created.   I have tried the python add-in application extension function "onCreateFeature", which does get triggered when a feature is created.  The new feature remains selected in the display and table, but then when I execute a "describe" or Search/UpdateCursor within the onCreateFeature class it returns the selection that existed before the feature was digitized. (eg: feature OID 12 is digitized and remains selected/highlighted, but describe and cursor see OID 11 as the current selection.)
Any suggestions as to what's wrong here?

class UpdateNewFeature(object):
    """Implementation for listener3cursor_addin.ext3 (Extension)"""
    def __init__(self):
        self.enabled = True
    def onCreateFeature(self):
        TESTline_Lyr     = "TESTlines"
        TESTline_Fields  = ['OBJECTID','NewAttrib','SHAPE_Length']

        # count selected features
        d = arcpy.Describe(TESTline_Lyr)
        if len(d.FIDSet) == 0:
            TESTline_Select = 0
        else:
            TESTline_Select = len(d.FIDSet.split(";"))
            print "OID:",FIDSet

        with arcpy.da.UpdateCursor(TESTline_Lyr,TESTline_Fields) as cursor:
            for row in cursor:
                print "ROW:", row
                # and update a few attributes based on current conditions


texts: Calculating route length per grid cell using fishnet

texts:
I have a problem determining the length of the routes (boat) I've surveyed in order to calculate the survey effort. I added the GPS points of the boat and then used the points to line tool and added a field in the attribute table with the length of each route.
Then I used the steps described by PolyGeo♦ here: Calculating density map of cycleways using fishnet in ArcGIS Desktop?
but for some reason it doesn't work for me, I only get zeros and not the length per grid cell. Any ideas why that might be?


texts:
I have this script and It return me some problem that I didn't find.

from osgeo import ogr
import os

class checkVectorMCV:

    def __init__(self, vector_path):

        self.vector_path = os.path.abspath(vector_path)
    def check_field_name(self):

        # Construindo a lista de campos do arquivo entregues

        daShapefile = self.vector_path
        print daShapefile, type(daShapefile)
        dataSource = ogr.Open(daShapefile)
        daLayer = dataSource.GetLayer(0)
        layerDefinition = daLayer.GetLayerDefn()

        #Construindo os campos dos arquivos entregues
        field = []

        for i in range(layerDefinition.GetFieldCount()):
            field.append(layerDefinition.GetFieldDefn(i).GetName())

        field = sorted(field)

        # Name of file with extension
        basename = os.path.basename(self.vector_path)

        # Name of file without extension
        name = os.path.splitext(basename)[0]

        #Comparação das listas de campos
        if (set(self.reference_field(name)) == set(field)) == False:
            return "Erro nos campos da camada: %s" % name;

for subdir, dirs, files in os.walk(rootdir):
    for file in files:
        ext = os.path.splitext(file)[-1].lower()
        #Print all files which have .shp extension
        if ext in extensions:
            arquivo = checkVectorMCV(file)
            print arquivo.check_field_name()

The error:

Traceback (most recent call last):
      File "/home/infra/PycharmProjects/untitled/projeto_desenvolvimento_script/validacao_mapeamento_1.py", line 191, in <module>
        print arquivo.check_field_name()
      File "/home/infra/PycharmProjects/untitled/projeto_desenvolvimento_script/validacao_mapeamento_1.py", line 144, in check_field_name
        daLayer = dataSource.GetLayer(0)
    AttributeError: 'NoneType' object has no attribute 'GetLayer'


texts: How to refresh displayed labels after setting properties via ArcObjects?

texts:
I originally posted this query on the ESRI forums but thought I may get more help here.

I have cobbled together some code to set halos around text labels for a given feature layer in ArcMap. The problem I'm having is having the newly formatted labels updated in the display afterwards. The usual IDocument.ActiveView.Refresh doesn't work.

So far the code below does make the necessary changes in the label properties but any type of refresh code doesn't make the changes in the display view. The only way to do it is open up the properties, toggle something to get the 'Apply' button activated, then press Apply. I ran code and only toggled the IGeoFeatureLayer.DisplayAnnotation and it worked fine with the usual ActiveView.Refresh method. This leads me to think that something is not being set or updated correctly in the ILabelEngineLayerProperties properties before being added to the IAnnotateLayerPropertiesCollection at the end. Any suggestions out there?

ArcGIS 10.3; Windows 7; VS Express 2013

   public void add_halo(IGeoFeatureLayer fl)
   {
    IAnnotateLayerPropertiesCollection pAnno = fl.AnnotationProperties;
    pAnno.Clear();
    IAnnotateLayerProperties labelEngineProperties = new LabelEngineLayerProperties() as IAnnotateLayerProperties;
    ILabelEngineLayerProperties pLprop = labelEngineProperties as ILabelEngineLayerProperties;
    ITextSymbol pTextSymbol = pLprop.Symbol;
    IFillSymbol pMaskFillSymbol;
    IRgbColor pMaskFillColor;
    IMask pMask = (IMask)pTextSymbol;
    pMask.MaskStyle = esriMaskStyle.esriMSHalo;
    pMask.MaskSize = 2; //  ' halo size;

    pMaskFillSymbol = new SimpleFillSymbol();
    pMaskFillColor = new RgbColor();
    pMaskFillColor.Red = 255;
    pMaskFillColor.Green = 255;
    pMaskFillColor.Blue = 255;
    pMaskFillSymbol.Color = pMaskFillColor;
    pMaskFillSymbol.Outline = null;
    pMask.MaskSymbol = pMaskFillSymbol;

    pTextSymbol.Size = 10;
    pAnno.Add((IAnnotateLayerProperties)pLprop);

    fl.DisplayAnnotation = true;
}


texts: Creating static popup in OpenLayers that contains HTML content?

texts:
I would like to create a static popup using openLayers 2.11 which is always in the lower-right corner of the screen and appears on map load.  The idea behind this is to have a logo for my school always appear.  I already have a marker layer setup.  Maybe I am approaching this incorrectly.

I have tried using some of the examples on the OpenLayers website regarding anchored popups with no luck.

The contents of the popup are as follows:

    <link rel="stylesheet" type="text/css" href="css/cube.css">

front

back

top

bottom

left

right


texts: Is there a WMS server, which I can be add to QGIS, that displays USGS Digital Raster Graphics (DRGs)?  If so please explain how?


texts: Saving Android app QGIS and Ministro 2 with right qt libraries onto USB for installation onto tablets without internet?

texts:
I need to get the ministro 2 app onto a USB to install onto android tablets for the QGIS app to work.

I can get both apps on OK but not the required qt libraries in Ministro 2.

Reason being there is no internet where I am and I want to install this app on peoples tablets when they visit for navigation.


texts: I need to change the value of pixels that where created in an image as a result of merging 2 rasters, this new pixels have a value of 0. The problem is, that there are pixels with 0 in the original rasters that I need to keep, so I can't just reclasify ...


texts: Setting section of ModelBuilder model as optional but also as precondition to later steps?

texts:
I have a model that runs a series of reclass calculations on a Feature Layer

I want to run several "summary statistics" tools in different locations to allow testing/ viewing of the results of the sequential relcass operations.

The "summary statistics" must be run as a precondition to the next reclass operation, because each time a new reclass is conducted, the data changes. So the point in time at which the summary statistics runs is important.

My issue is - I would ideally like to be able to control these summary statistics tool runs to be optional - via a single Boolean tick box. This would allow an option to run the model without all these separate summary statistics - in order to reduce model run time.

My question is - is there any way to make all the summary statistics calculations optional, e.g. via a Boolean tick-box?  but still when run for the summary statistics to run in the correct locations, e.g. like a precondition.

The main issues are:

If the model is set with a precondition, but the Boolean tick-box is turned off then the main model will not run
I know I could run a copy feature from each stage of the model and save to disk, or in memory and then have the summary statistics run on those copies, however this would not result in any time saving
I can't use a set of make feature layers and use them as the source for the summary statistics because the underlying feature layer data changes during the model run
I have looked into if then else commands and branching, but I can't see how to use this, without having to make lots of copies of the data at each split when two branches are created

Any thoughts / tips would be appreciated!


texts: Seeking 1km bioclim data layers for time period between 2005 - 2009?

texts:
I am looking to download some simple bioclim layers for a college exercise.

I am looking at annual precipitation and mean temp and want it at 1km spatial resolution for any time period around 2005 - 2009.

The worldclim website seems to indicate the 30 second data should be 1km resolution, but does not give an indication of timelines.

Can anyone point me to a link that kind of explains how and where go about this?


texts: Want cell linear regression values for a netCDF or multi-band raster

texts:
I have climate raster type netCDF data.

I want the slope and other regression statistics of temperature for each cell over time.

I have read that GEOV IDL can do a temporal regression to achieve what I want but it is not open source. Does anyone know of a good open source software that can accomplish what I would like? R maybe?


texts:
My team is building a web GIS portal using GeoNode. We're trying to add a "go to XY" function or widget into MapLoom or GeoExplorer, so users can enter coordinates and pan/zoom to that location on map.

Does anyone know particular script, tool, or API to make this work?


texts: Determine the furthest driving distance from a road layer to the nearest point of a point layer using OSM/QGIS

texts:
In a specific geographic area, I have a road layer and roughly 30 points dispersed around the geographic area as part of a point layer. Both layers are in SHP and PostGIS formats. The records from the point layer correspond to "stops" on the road layer.

How can I calculate the "furthest driving distance at any point in the network to the nearest 'stop' distance is ..."? and as a follow up, can I save that route, or show the furthest points as a different layer?

I'll be using QGIS and OSM or my own road layer data for this.


texts: How to implement a radius search using PostGIS

texts:
I am very new to this topic and after a long time of research I didn't find a solution.
I want a query that I can use on my PostGIS database performing a radiussearch.. I inserted the Open Street Map Data from Geofarbik covering whole Austria.
The Input parameters are a point in lng,lat notation, like Point(16 48) ~ some point in Vienna and as second parameter the radius in m.

For a reason I don't know the lat lon values in the db are somewhat different. On the internet I found people talking about different types of SRID, but I really don't know which SRID I should use and how it could be useful to me to compare the input data with the data in the database.
I added a column geom, because the command ST_Within(geom, geom) needs a geom. Now the data is even less readable, so I cleary don't know what to do with the input data for comparing and knowing it was done the right way.
I can't look behind the concept of the SRID in this moment.

SELECT * mytable node
WHERE node.tags @> ARRAY['subway', 'station', 'uic_ref']
and ST_DWithin(geom, st_makepoint(mylon, mylat), radius) = true

My query would look like this, but I doesn't work yet.
If someone could give me some advices how to speed up queries like this it would be great to.


texts: Calling PostgreSQL procedures or functions from QGIS' Query Builder

texts:
I am trying to call either a stored procedure or function defined in the PostgreSQL/PostGIS database and use it from the QGIS Query Builder.
Neither work:

the function returns a table that cannot be interpreted by the Query Builder
the procedure, which returns a selection, fails when I call it using the call instruction

Both work well in DataGrip and query a tag from a tag text-array column in the waypoints table.
Here is the function:
create or replace function gwd(t text)
RETURNS TABLE (f_ogc_fid int, f_name text)
LANGUAGE plpgsql
AS $$
BEGIN
    return query
        SELECT ogc_fid,name::text
        FROM gis.gps.waypoints
        where tag @> STRING_TO_ARRAY(t, ',');
end;
$$

Here is the procedure which fails at the CALL in QGIS' Query Builder:
create or replace procedure grw(T text)
LANGUAGE plpgsql
AS $$
BEGIN
        SELECT *
        FROM gis.gps.waypoints
        where tag @> STRING_TO_ARRAY(T, ',');
end;
$$

Here is the error reported by QGis when I execute call grw('iron') in the Query Builder:
An error occurred when executing the query.
The data provider said:
ERROR:  syntax error at or near "grw"
LINE 1: SELECT * FROM "gps"."waypoints" WHERE call grw('iron') LIMIT...

When I call it without the CALL, it does not work either:
An error occurred when executing the query.
The data provider said:
ERROR:  grw(unknown) is a procedure
LINE 1: SELECT * FROM "gps"."waypoints" WHERE grw('iron') LIMIT 0
HINT:  To call a procedure, use CALL.


texts: How can I check in QGIS python if an atrribute is included in my layer?

texts:
I use the following code:

for field in self.layer.pendingFields():
    if field.name()=='elevation':
        do this
    else:
        do that

Although there is an elevation attribute in my layer it does not recognize it does that instead of this.
Any ideas why?


texts: Iterate through path type inside 'WHERE' statement

texts:
I have a table defined as following

CREATE TABLE public.geometry_polyline_volume (
    id          serial not null primary key,
    distance    float not null,
    height      float not null,
    coordinates path not null );

Is there any way to iterate the coordinates in order to filter some specific points inside the coordinates ?
Somthing like this ->

SELECT * FROM public.geometry_polyline_volume WHERE FOR coord in coordinates DO coord[0] > 15 END;


texts:
I am starting to convert old code of OpenLayers 2 to OpenLayers 3. In the old version you could make polygon shape based of the amount of sides like in the example below:

http://jsfiddle.net/r9g1odce/4/

I was looking for the same functionality in OpenLayers 3 but couldn't find any... is there something I am missing?

The best example I found for drawing and modifying features is here
but there is no square shape:

http://acanimal.github.io/thebookofopenlayers3/chapter07_07_editing_features.html

The code I am using for polygon drawing is:

drawInteraction = new ol.interaction.Draw({
    features: featureOverlay.getFeatures(),
    type: /** @type {ol.geom.GeometryType} */ ('Polygon')
  });

map.addInteraction(drawInteraction);

The types can be found here:
http://openlayers.org/en/v3.1.1/apidoc/ol.geom.html


texts: ArcPy RemoveLayer removes all layers in loop

texts:
I am trying to remove layers that are not found within a list. The loop iterates through the layers within the Map_Left data frame. However, when I run this, it removes all of the layers within the data frame! Any explanation why?

preserved_layers = ("Major Roads", "Secondary Roads", "Water Features", "Rivers / Streams")
for lyr in arcpy.mapping.ListLayers(mxd, "", Map_Left):
    if lyr.name not in preserved_layers:
        arcpy.mapping.RemoveLayer(Map_Left, lyr)


texts:
I currently use outdated versions of JTS and GeoTools in my Java application. GeoTools is used for parsing GML structures into JTS Geometry objects. However, I do not know how to update the libraries so that the versions are on par with each other.
Is it still possible to do this with newer versions of the libraries, and is the version correspondence between GeoTools and JTS documented somewhere?


texts: How to customize label color in QGIS: Data defined label settings? Expressions? Both? What are the steps?

texts:
Updated to show more current screenshot and clarified the question (Which tools? What are the steps?)

I'm learning QGIS (1.8 "Lisboa" for Mac).

On the QGIS Layer labeling Settings window there is a section called "Data defined settings":

I believe the user's guide briefly describes its purpose:

  The advanced entries inside the Label tab allow you control the appearance of the labels using attributes stored in the layer. The entries beginning with Data defined allow you to set all the parameters for the labels using fields in the layer.

But there are no instructions for using the Data defined entries and the Help file doesn't mention them at all.

For example, I want the label color to be white for the darkest polygon colors in a choropleth map. Will the Data defined settings help me do this in QGIS? If so, how? (Cartographica, for example, allows a user to easily set individual label colors for each category in a choropleth scheme. I was expecting a similar function in QGIS.)

One commenter suggested using the "Expression based label" tool. I don't know how to access the tool and there don't appear to be instructions in the user's guide. It isn't clear to me whether "Expression based labeling" supersedes "Data defined settings" or is meant to be used in conjunction with them.

I'm in need of clear, step-by-step instructions.


texts:
I am building a Dashboard that relies on tabular data and that is located in a Google spreadsheet. Since the spreadsheet is dynamic and gets updated constantly, I would like those changes to be reflected in the Dashboard automatically and as soon as they occur. Thus, I am trying to add a Google Sheet to my ArcGIS Online content rather than a CSV file, but when I select the spreadsheet I always receive the following error message:

Cloud Drive file is invalid or not found

These are the steps I take when I try to add the Google Sheet:

In the AGOL Content menu, I click on Add Item and choose From a Cloud Drive
I select Google Drive as my source.
I change the File Type to Google Sheets and select the spreadsheet from my drive. This is when the error message pops up.

I have tried a similar process in the Map Viewer but I still receive the same message that the file could not be found. I also published the Google Sheet to the web first but I still cannot load it into AGOL.
I would like to mention that other Google Sheets in my Drive can be added but this one is giving me trouble. The Google Sheet in question includes several formulas (IMPORTRANGE, ARRAYFORMULA, etc) and a large number of records (over 8,000). Could this be the problem? Is there a limit on the number of records that can be added via Google Sheets? Are the formulas causing these issues for some reason?


texts:
I just finished my first ever code in QGIS using qgis stack and google. Now I want to make its UI so that my non-programmers can use it easily. I just walk through this guide (Building a Python Plugin) but it is making plugin with external tools like Qt Creator.

I want to ask you is there any direct UI making facility available in qgis through which i can run my console code or alternative any.?


texts: What is the openlayer.js alternative of unloadinvisibletiles of leaflet.js

texts:
I am using OpenLayers with a tile server. I want to load maps while panning and destroy the loaded region when out of screen (alternative to unloadinvisibletiles of leaflet.js)

How am I suppose to achieve this?


texts: Is it possible to set scale-based visibility for groups or sub-groups of layers in QGIS 3?


texts: ESRI File Geodatabase with a field calculator with an incrementing number

texts:
I've got a python script that runs on the Field Calculator of a ESRI File Database.  Right now it runs correctly in that it will increment the last three digits of the value.  But this is a script that is run as part of post processing so it will be run everytime there are new entries in the feature class.  My question is how can I modify this so that every time it runs it will look at the last four digits of the FacilityID and increment from there below is a screenshot of my attribute table:

EDIT:
And below is my Python script I need to modify.

cur = arcpy.SearchCursor("Telecommunications Line")
fac_id_values = [int(row.FACILITYID[-4:]) for row in cur]

maximum_value = max(fac_id_values)
if maximum_value:
 rec= maximum_value
else:
 rec = 0

def autoIncrement():
 global rec
 pStart = 1
 pInterval = 1
 if (rec == 0):
  rec = pStart
 else:
  rec += pInterval
 return "COMLI" + "11" +  format(rec, '03d')

Ok after running the code above I got this as a result.  It overwrote the previous values as shown above.  The First item should have a FacilityID of COMLI111001.