texts: Converting latitude/longitude to UTM using GDA2020 datum with Pyproj

texts:
I want to convert a pair of (latitude, longitude) values that represent a location in Australia to UTM values within the GDA2020 datum.
I tried to do something similar to what I usually do with North American (latitude, longitude) pairs with the library Pyproj in Python. In the NAD83 datum, the conversion runs fine doing:
from pyproj import Proj
proj_utm = Proj('proj=utm +zone=18T, +south +ellps=GRS80 +datum=NAD83 +units=m +no_defs')
utm_values = proj_utm(-73.665, 45.455)

Let's say that now, I want to convert the (latitude, longitude) pair: (-27.45745, 153.05715) to UTM in the GDA2020 datum. The UTM zone is 56J.
proj_utm = Proj('proj=utm +zone=16J, +south +ellps=GRS80 +datum=GDA2020 +units=m +no_defs')

returns the following error:
pyproj.exceptions.CRSError: Invalid projection: +proj=utm +zone=56J, +south +ellps=GRS80 +datum=GDA2020 +units=m +no_defs +type=crs: (Internal Proj Error: proj_create: Error -9 (unknown elliptical parameter name))

The only things I have found online so far are about how to convert from one CRS to another. It is possible that my understanding is wrong but my understanding is that the latitude longitude I get is already expressed in the GDA2020 datum and the only thing that I want to do is to have the same location expressed in UTM in this same datum. I know about the utm package. It is a bidirectional WGS84 converter between lat/lng and UTM but I am afraid to use it and to end up with a gap of 1 meter or more in my data.
Update: I think my logic is inaccurate, I have trouble to pinpoint which part is inaccurate. GDA2020 seems to be in meters https://epsg.io/7842 but it seems to have refinements for some specific utm zones (GDA2020 / MGA zone 56 for instance) https://epsg.io/7856.
On the other hand, It seems that some lat, lng can be given in the NAD83 datum in North America as the unit is degrees https://epsg.io/4269. What is the Australian datum most precise for lat/lng in this context might be part of my confusion.
Update2 after further readings:
GDA2020 is based on the reference frame ITRF2014 (source)
ITRF2014 can be considered equal at a 10cm margin to WGS84 (no conversion exists). Source
Therefore, if I get a latitude/longitude pair in Australia given to me by a system that claims using GDA2020 reference system in their data, I can consider it to be given in ITRF2014 which is equivalent to WGS84.
From there, I found that I can either use the definition of a CRS in Pyproj as suggested by @snowman2 or define a transformer like:
transformer = Transformer.from_crs(9000, 7856)
lat, long = -27.45745, 153.05715
x, y = transformer.transform(lat, long)

EPSG 9000 is ITRF2014 https://epsg.io/9000
EPSG 7856 is GDA2020 / MGA zone 56 https://epsg.io/7856 which in my current understanding is a realization of UTM that is more precise for Australia given the continental drift it undergoes at a pace of about 7cm/year.


texts:
In geonetwork I have truncated metadata file title when I do a search. Sometimes it is only a few characters that are missing so I try to increase the number of characters that can be displayed.
in the gn_search_default.less file located in /catalog/views/default/less folder there are the options for the title.

gn-md-title {
      margin-top: 2px;
      min-height: 3.5em;
      max-height: 3.5em;
      overflow: visible;
      cursor: pointer;
      h3
      {
    /* Leave space for selection checkbox */
    //padding-left: 40px;
    margin-top: 0px;
    a {
      //text-transform: uppercase;
      font-weight: normal;
      font-size: 80%;
      color: #333333;
      max-width: 800px;
      overflow: visible;
    }

    a:hover {
      color: #428bca;
      text-decoration: none;
    }
  }
}

I can change the font-size percentage for instance but the max-width has no effect. I removed the text-overflow: ellipsis option and set overflow: visible.
However it has no effect on the displayed length of the title.

Here is a screenshot of the website in Firefox.

Any idea how to modify that?


texts: Trying to install PyGreSQL, receiving DLL load failed error

texts:
I am trying to install the PyGreSQL package into Python 2.7.  I am running 32-bit Python on a 64-bit Windows 7 machine.  The installer I am using is the file PyGreSQL-4.1.1.win32-py2.7.exe from here.

The installation of PyGreSQL purportedly proceeds successfully, but upon attempting to import the module in python, with

import pg

I receive the following error:

Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    File "pg.py", line 31, in <module>
        from _pg import *
ImportError: DLL load failed: %1 is not a valid Win32 application.

My PostgreSQL installation is 64-bit, if that complicates things.  Anyone know how to resolve this?


texts:
I want to create a QGIS Atlas on a point of interest dataset with categorical attribute poi_type.
The atlas should have a page for each type (e.g. stadium, hospital, etc.).

I can't find the right filter to set in the filter with field. QGIS keeps cycling over each feature, as opposed to cycling over each unique value of poi_type. Any tip?


texts: How to calculate the "depth" of a linestring using postgis

texts:
I have linestring features, which look like bent linestrings, hemicycles or convex or concave linestrings. In the moment I can select the distance between the startpoint and endpoint of each feature. Now I want to calculate the vertical (orthogonal) distance between

a) the imaginary line between startpoint and endpoint

b) and the most distant point of the linestring

Like the maximum orthogonal distance between the deepest point in a hole referring to a straight surface.
How can I calculate this with postgis?

Here is a picture:


texts: I had setup cartoDB locally in my server. I am very curious to know about the free storage space alloted (in means of mapviews, tables, Data Storage) for using cartoDB from my own server for private views. And also, below is a snapshot of cartoDB storage statistics after setting in my own server. In that it is mentioned 10GB of space and 10k mapviews are free to use. I would like to know 10kmapviews for per month or year? I would also like to know is there any possiblity of storing the data in external sources like my own server and use cartoDB API alone for customization and In this case, will this charge?


texts: what software was used to create qfield android app?

texts:
i imported the github android project from this link:https://github.com/opengisch/QField

however it showed android framework detected.it was obvious that the app was not created in android studio.
so what software was used ?how can i make changes to the app?


texts: Land temperature anomaly data from earth observations in R

texts:
I am trying to work with the NASA's land temperature anomaly dataset at https://neo.sci.gsfc.nasa.gov/view.php?datasetId=MOD_LSTAD_M&date=2013-01-01
When I am using the extract function on the raster file <downloaded at 0.1 degrees>, I am getting abnormally high range >100 - 160. The earth observation is showing that these values range from -12 to 12 for this particular month (January, 2013).
I am not sure what I am doing wrong. I also downloaded the GeoTiff (floating point), but still getting the same values.


texts: How can I use ArcGIS 10.1 to find a geodesic equidistant point defined by three points?

texts:
For example, I have coordinates for three base points on a coastline and I need to find the coordinates of the point off the coast which is equidistant from all three. It’s a simple exercise in geometry, but all the measurements must take geodesy into account.

If I was approaching this in a Euclidian manner, I could measure the geodesic paths connecting the base points, find the midpoints of the sides of the resulting triangle and create perpendicular orthodromes to each of those paths. The three loxodromes would presumably converge at the equidistant point.  If this is the correct method, there’s got to be an easier way to do it in Arc.


texts:
Is it possible to link different map's cursors in Google Earth Engine?

For exemple:

var left = ui.Map();
var leftcusor = left.style().set('cursor', 'crosshair')

var right = ui.Map();
var rightcursor = right.style().set('cursor', 'crosshair')

ui.root.clear();
ui.root.add(left);
ui.root.add(right);

ui.Map.Linker([left, right])

How can leftcursor and rightcursor move together (like in Erdas) ?


texts: Build legend in CartoDB using createLayer

texts:
I'm not using createVis, but rather createLayer to generate my maps on the fly, but can't seem to figure out how to add a legend using something simple like legends: true, which is available when using createVis.

What's the best way to do this?


texts:
I'm trying to calculate the area of US congressional districts (shapefiles from here). I have eight different district shapefiles. I can calculate areas perfectly for the first five shapefiles (corresponding to the 81st, 87th, 92nd, 93rd, and 98th Congresses).

But for the 103rd, 108th, and 113th Congress shapefiles, it screws up. When I calculate areas manually (Vector->Geometry Tools->Export/Add Geometry Columns), the progress bar stalls at some point (eg. 53% for districts113). When I calculate areas using python, (processing.runalg('qgis:exportaddgeometrycolumns',layer,0,output)), I can see the progress bar slowly get up to 53%, then it finishes suddenly, and the resulting shapefile is missing half the states.

What's the problem here?


texts: Attribute table of a point: longitude, latitude info missing

texts: In my QGIS map I have several vector layers. They all appears on the map well. I am just wondering, where in the Attribute table I can find the information about the geolocation. I supposed that in a point layer I will see in the Attribute table a column for X (longitude) and Y (latitude) for every single point. I hope my question is clear. In other words, how can QGIS know that a specific point is there and not somewhere else, where is the information?


texts:
I'm working at OpenStreetMap project for android at the moment. I want to retrieve OSM data from my app(nodes, markers and paths) and convert it to shapefile (.shp, .dbf and .shx). Later, I'll load it into ArcGIS editor.
I've been investigating about it, and I have no clear idea if It's possible a direct conversion between this formats, or I have to  step first on KML file and parse it in shapefile.

I actually don't know how to retrieve the OSM data to save a OSM file for being treated. I've been looking for a library or something like that but I have no lucky.

Can anyone give me a helping hand?


texts: How to configure Apache for topojson gzip files

texts:
Building an online interactive map with leaflet and some heavy layers with my spatial data in topojson format. I have been reading about gzip but I am still uncertain how to configure it.

Do I need to:

gzip the files used for my leaflet map myself in my terminal ?
change my javascript code so that instead of calling 1966.topojson I call 1966.topojson.gz ?
change the apache server (2nd generation) in some way?

Not sure how to change it so that it can send topojson files.

Is there any good tutorial around for that?


texts:
I want to analyse parks for their reachability by foot, and I thought of doing that with a buffer around the parks (more than 300 in total). Now the problem is, that in cities usually there are boundaries that cant be crossed or only at very specific spots. So I would like to create a buffer that is limited by these boundaries, but where they are open, it should still expand according to the maximum distance given to the buffer. I think it can be easily understood from the picture below. I'd need the polygons for further analyses like the amount of people living in the parks vicinity.
Any tips on how to approach that?


texts: What is the difference between ArcGIS World Imagery Classic and the World Imagery Clarity?

texts:
Clarity: https://www.arcgis.com/home/item.html?id=ab399b847323487dba26809bf11ea91a
Classic: https://www.arcgis.com/home/item.html?id=10df2279f9684e4a9f6a7f08febac2a9
Is Clarity more recent and higher res? The ESRI description isn't exactly clear.


texts: Plotting PLSS (Township Range Section) Data to ArcMap?

texts:
I work for a Tribal Environmental Department and I have been asked to map locations and area of culturally significant sites. unfortunately for me, most of there data Township Range Section format.

Is there any way to plot this data in ArcMap 10.1 as a layer?


texts:
I'm trying to work with 20m x 20m resolution Corine landcover data for Finland
(CORINE maanpeite 2018, 20 m), which is in EPSG:3067 map projection. I also have the official Statistics Finland grid polygons at 250m x 250m resolution (also in EPSG:3067). Sorry, I don't think that the grid is freely available, but I've added the import information underneath.
library(sf)
library(rgdal)
# load corine
corine <- raster(x = "../Clc2018_FI20m.tif")
# check map projection
crs(corine)
# load grid
grid.250 <- st_read("../T11_grd_e_250m.shp")

Reading layer `T11_grd_e_250m' from data source `..\T11_grd_e_250m.shp' using driver `ESRI Shapefile'
Simple feature collection with 6262152 features and 7 fields
geometry type:  POLYGON
dimension:      XY
bbox:           xmin: 61500 ymin: 6605750 xmax: 733000 ymax: 7776500
projected CRS:  ETRS89 / TM35FIN(E,N)

I'm cropping both objects first:
# crop around Helsinki
e <- extent(362960,403020,6656040,6697640)
grid.250.cropped <- st_crop(grid.250, e)
corine.cropped <- crop(corine, e)

In QGIS they line up perfectly, but when I zoom in on tmap, I have a misaligned grid. I believe this might just be an optical error and not a real one. How can I check and/or fix this?
Update: A polygon created from the raster file aligns perfectly, so it seems to be indeed cosmetic (does not affect spatial stats, but is plotted wrong).
library(tmap)
tmap_mode("view")

tm_shape(corine.cropped) +
  tm_raster() +
tm_shape(grid.250.cropped) +
  tm_polygons("GRIDCODE", alpha = .25)

Here's an example of the same data in QGIS. As you can see the raster lines up perfectly with the grid.


texts:
I have used your code for picking feature info from WMS layer using WMSGetFeatureInfo function. I have used this link.
http://underdark.wordpress.com/2011/03/17/picking-a-features-attribute-value-from-a-wms-layer-with-openlayers/
but I can't find the feature info.

feature.length function returns 0.

My WMS layer is:

 tiled = new OpenLayers.Layer.WMS(
                    "unit_project2_ws:unit_project3_view - Tiled",
                    "http://localhost:8080/geoserver/unit_project2_ws/wms",
                    {
                        LAYERS: 'unit_project2_ws:unit_project3',
                        transparent: true,
                        STYLES: '',
                        format: format,
                        tiled: true,
                        tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom

                    },
                    {
                        buffer: 0,
                        displayOutsideMaxExtent: true,
                        isBaseLayer: false,
                        yx : {'EPSG:900913' : false}
                    }
                );

........................

Code I have used for the GetFeatureInfo request for the WMS layer:

roadidPicker = new OpenLayers.Control.WMSGetFeatureInfo({
                url: 'http://localhost:8080/geoserver/unit_project2_ws/wms',>
                title: 'identify features on click',
                layers: [tiled],
                queryVisible: true
            });
roadidPicker.infoFormat = 'application/vnd.ogc.gml';
roadidPicker.events.register("getfeatureinfo", this, pickRoadid);
map.addControl(roadidPicker);
roadidPicker.activate();

function pickRoadid(e) {
  if (e.features && e.features.length) {
     var val = e.features[0].attributes.id;
     alert(val);
     //document.getElementById('roadId').value = val;
  }
  else
      alert(e.features.length);  // this function returns 0 result.

}

What is problem with this code.


texts: Making 3D landscape area appear in Vectorworks 2011

texts:
I am using Vectorworks 2011 to build a site plan. I would like to include a 3D view using a "Landscape Area" to display a block of vegetation. I have drawn the shape of the area, set the 3D view to "3D Plants" and added the plant information.

When I turn on OpenGL mode and switch to a 3D view the plants appear only as plain grey cross-shaped 3d objects (not sure of the right word!). I can't get them to look like plants either as 3D shapes or 2D images.


texts: Can I avoid setting up a proxy for GeoServer, Apache?

texts:
I'm using Apache (port 80) and GeoServer (port 8080) on Windows 7. I guess I need to set up a proxy if I want to use WFS, since they're on different ports.

My kind of silly question is, can I avoid it? If I re-set my website on GeoServer's www file, is everything going to work fine? Does GeoServer share the same characteristics with Apache?

If GeoServer's www file is a bad idea can you please help me set up a proxy? I never done it before, so if you have a link with an analytical tutorial, it would be great...


texts: I have an Arc/Info image and I want to resample it in QGIS but I don't know how.. Anyone could help? I have already tried raster-> reprojection -> warp but it didn't work.


texts: How to create Strips with GCP point distribution for raw GeoEye satellite imagery?

texts: I have raw GeoEye satellite imagery, I just want some guidelines for creating a strip map with GCP distribution. We need to make orthorectification for raw GeoEye satellite imagery, I think it's available in ERDAS Imagine but I don't know how I can make this.


texts:
I have daily data for several years (GRIB but also available as netCDF), I would like to investigate how the wind speed and direction has changed along the migratory route of a bird (in spring) and also in smaller areas such as in between the areas where the birds stop.

Which ArcGIS tools/extensions can I potentially use?


texts: Auto generate map from natural earth data with QGIS or other utility

texts:
I'm looking at natural earth data to generate each country and save it as a png. What I'm using is: 10m_populated_places, 10m_admin_0_countries and 10m_land.

The populates places is the first layer, then the countries and then the land. For each of the countries I want to:

1) Filter populated places to FEATURECLA = 'capital' & ADM0NAME = country

2) Filter countries to ADMIN = country

3) Set the said country in the middle of the screen and save it as an image. For this I need to zoom in but leave some space around the country.

I'm a complete beginner, what is the easiest way to accomplish this with QGIS or some other GIS software?


texts: Need to extract coordinate information from SRTM 3 files

texts:
From this link here - http://www2.mmm.ucar.edu/wrf/users/docs/user_guide_V3/users_guide_chap3.htm#_Writing_Static_Data I wrote  code in java to transform SRTM3 data into WRF geogrid data. I read the SRTM3 file data and rewrote it south to north as a 2-dimensional array of unsigned integers. However this part of the data transformation that requires me  to rename 5835 .hgt files for Eurasia obtained from here -   http://dds.cr.usgs.gov/srtm/version2_1/SRTM3/Eurasia/ is not clear.

I need to extract xstart and xend as well as ystart and yend. While code samples are not required I am more interested in understanding what those variables refer to and how they can be extracted from the .hgt files. Please let me know if my question requires more clarity or needs to be reframed.


texts: How can I vectorize contour lines from a DTM in QGIS?

texts:
I'm using QGIS 3.16. I am trying to do the following: Starting with a DTM model (geoTIFF format) I am computing the contour lines (100m) with QGIS. So far, so good. In order to import the results into Adobe Illustrator I am trying to use the Vectorize (Raster to Vector) tool to obtain the same result in a vector format.
However:

when I try to save the contour lines layer in QGIS from the original DTM layer, the resolution is very poor (and when saving there doesn't seem to be an option to increase the resolution), i.e. much worse than if I just take the original DTM layer and choose the contour option to display the desired contours.
I can start the Vectorize tool with both the original or the saved contour line layer but it computes indefinitely (I let it run for 2-3 days) without returning a result (but no errors either).

Any advice for a novice GIS user on how to obtain contour lines from a raster DTM in a vector format (any standard format is fine, e.g. shapefile)?


texts: Use subprocess module to run GDAL processes

texts:
I am attempting to write a python script that will reproject & merge a series of .tif files then clip them to the boundaries of a .shp file. I have successfully used the subprocess module to do step 1, but am not sure how to use subprocess to run another second operation. Below is an example of what it might look like if I used subprocess/GDAL to reproject one set of files, then reproject a second set in another folder in the same script. Any ideas on why this won't work?

import os, gdal, subprocess, sys

cmd = ['gdalwarp', '-t_srs','+proj=longlat +ellps=WGS84','*.tif','new7.tif']
cmd2 = ['gdalwarp', '-t_srs','+proj=longlat +ellps=WGS84','newfolder/band4.tif','newfolder/band4_r.tif']
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr=subprocess.PIPE)
stdout,stderr=proc.communicate()
proc1 = subprocess1.Popen(cmd2,stdout1=subprocess1.PIPE,stderr1=subprocess1.PIPE)
stdout1,stderr1=proc.communicate()
exit_code=proc.wait()

I am new to python and subprocess, thus my code may be way off. Any ideas?


texts: Is it possible to search a layer by name in geemap?

texts:
I'm using geemap, a wrapper of ipyleaflet and folium for earthengine objects.
I'd like to verify if a layer already exist on my map and search for it by it's name, is it possible ?


texts: Delete unattached internal polygons in single polygon

texts:
My shapefile is a single MultiPolygon (1 feature) which has some holes, within which there exist multiple parts of this polygon, remnants of vectorization.
I need to eliminate those small as shown on the screenshots and cannot find a way to do so.

I work  in QGIS.


texts: geotools filter CQLException: Encountered “t”

texts:
I am querying a simple feature type schema:
r:Long:index=join,*g:Point:srid=4326,di:Integer:index=join,al:Float,s:Float,b:Float,an:Float,he:Float,ve:Float,t:Float,m:Boolean,i:Boolean,ts:Long;geomesa.table.sharing='true',geomesa.indices='attr:4:3,records:2:3,z2:3:3',geomesa.table.sharing.prefix='\\u0001'

with the query expression: r = 31 AND di = 5 AND BBOX(g, -38.857822, -76.111145, -74.64091, -38.61907) AND al <= 39.407307 AND s <= 1.6442835 AND b <= 83.14717 AND an <= 87.0774 AND he <= 40.89476 AND ve <= 88.761566 AND t <= 44.786507 AND m = true AND i = true.

but it throws an exception saying Encountered "t" at line 1, column 195.

Here is my exception log detail:

org.geotools.filter.text.cql2.CQLException: Encountered "t" at line 1, column 195.
Was expecting one of:
    <NOT> ...
    <IDENTIFIER> ...
    "include" ...
    "exclude" ...
    "(" ...
    "[" ...
     Parsing : r = 31 AND di = 5 AND BBOX(g, -38.857822, -76.111145, -74.64091, -38.61907) AND al <= 39.407307 AND s <= 1.6442835 AND b <= 83.14717 AND an <= 87.0774 AND he <= 40.89476 AND ve <= 88.761566 AND t <= 44.786507 AND m = true AND i = true.
    at org.geotools.filter.text.cql2.CQLCompiler.compileFilter(CQLCompiler.java:106)
    at org.geotools.filter.text.commons.CompilerUtil.parseFilter(CompilerUtil.java:196)
    at org.geotools.filter.text.cql2.CQL.toFilter(CQL.java:134)
    at org.geotools.filter.text.cql2.CQL.toFilter(CQL.java:113)
    at com.hps.GeomesaClient.query(GeomesaClient.java:134)
    at com.hps.Reader.run(Reader.java:69)
    at java.lang.Thread.run(Thread.java:745)

I am not able to determine, why it's throwing an exception on querying with the attribute named t. Whereas if I remove attribute t from the query, it works as expected.

Is t a reserved key or am I missing something?


texts: AttributeError: 'unicode' object has no attribute '_arc_object' from arcpy.mapping.ListLayers?

texts:
I'm trying to write a script that allows me to list .mxd files in a folder and then list  the layers in each map document, however, I keep getting this error:

  Traceback (most recent call last):   File
  "C:\Python27\ArcGIS10.1\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py",
  line 326, in RunScript
      exec codeObject in main.dict   File "C:\Users\Daimon Nurse\Desktop\DFMPROJECT\Scripts\editmapdocument8.py", line 9, in

      lyr = arcpy.mapping.ListLayers(file)   File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\utils.py", line 181, in fn_
      return fn(*args, **kw)   File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\mapping.py", line 1499, in
  ListLayers
      result = mixins.MapDocumentMixin(map_document_or_layer).listLayers(wildcard,
  data_frame)   File "C:\Program Files
  (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\mixins.py", line 822,
  in listLayers
      layers = self.layers   File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\mixins.py", line 682,
  in layers
      for frame in reversed(self.dataFrames):   File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\mixins.py", line 694,
  in dataFrames
      return map(convertArcObjectToPythonObject, self.pageLayout.dataFrames)   File "C:\Program Files
  (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\mixins.py", line 678,
  in pageLayout
      return convertArcObjectToPythonObject(self._mxd._arc_object.pageLayout)
  AttributeError: 'unicode' object has no attribute '_arc_object'

This is the code I am using :

import arcpy
import os

PATH2 = r"C:\Users\Daimon Nurse\Desktop\DFMPROJECT"
arcpy.env.workspace = PATH2
arcpy.env.overwriteOutput=True

for file in arcpy.ListFiles("*.mxd"):
    lyr = arcpy.mapping.ListLayers(file)
    print file


texts:
I have a form that appears when you start the plugin.How do I properly apply to the button on the form, so that when you click on the button performed "function".

import sys,os
import win32api
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from qgis.core import *
import ctypes
from PyQt4 import uic

class HelloWorld:
   def __init__(self, iface):
      self.iface = iface
      self.canvas = iface.mapCanvas()

   def initGui(self):
      pushButton=QPushButton("pushButton")
      self.action = QAction(QIcon(":/plugins/"), "&HelloWorld", self.iface.mainWindow())
      self.action.setWhatsThis("Configuration for test plugin")
      self.action.setStatusTip("This is status tip")
      QObject.connect(self.action, SIGNAL("activated()"), self.hello_world)
      QObject.connect(pushButton, SIGNAL("clicked()"),self.function)

      self.iface.addPluginToMenu("HelloWorld", self.action)

   def unload(self):
      self.iface.removePluginMenu("HelloWorld",self.action)
      self.iface.removeToolBarIcon(self.action)

   def function(self):
      QMessageBox.information(self.iface.mainWindow(), QCoreApplication.translate('HelloWorld', "HelloWorld"), QCoreApplication.translate('HelloWorld', "HelloWorld"))
      return

   def hello_world(self):
      path = os.path.dirname( os.path.abspath( __file__ ) )
      self.optionsDialog = uic.loadUi(os.path.join(path,"untitled.ui"))
      self.optionsDialog.show()

if __name__ == "__main__":
   pass


texts: Measuring averages of a seperate layer with kernel Density overlay

texts:
How can I get an average of another layer in a kernel density plot? I have bathymetry underlying my kernel density plot and need to know how to gain an average of bathymetry for a 80% kernel. Does any one have any ideas?

I am using Arcmap 10.1


texts: Usage of QGIS Dissolve geoalgorithm in QGIS Graphical Modeler (2.18.19 LTR)

texts:
When I use QGIS Dissolve geoalgorithm as a standalone tool from the Processing Toolbox, the GUI looks like shown below. By selecting the Input layer I am able to chose from its attributes on wich to dissolve.

NOTE that the Input layer is an output of another geoprocessing algorithm, in this case Intersection. This takes two input layers and combines the attributes of them. In the Dissolve algorithm I need to select one (key)attribute of each of this input layers:

Now I would like to combine Intersection and Dissolve in the Graphical Modeler, sth. like

... but I struggle with the configuration of the Dissolve alg. Herein its GUI looks slightly different:

Intuitivly I would guess that the dropdown Unique ID fields should by populated with the attribute names of the selected Input layer in order to select the desired attributes to dissolve on, but it doesn't (wich is
clear at a second look, because during creating the model the input attributes are unknown since input layers are not yet selected)

Therefore I tried entering a comma separated list of the attribute names (prior known to me, here id, name), but this is causing an error

Error executing algorithm Dissolve 'NoneType' object has no attribute 'split' See log for more details

...wich usually happens with unchecked Dissolve all and no attributes provided.

Question: How to select the attributes to dissolve on when using Dissolve algorithm in Modeler with another algorithms output as input? Am I missing something or am I using this in an inappropriate way or is this worth raising an issue?


texts:
http://geojsonlint.com/ I get error

 Polygons and MultiPolygons should follow the right-hand rule

I used it for past 3 years without any problem with my old geojson file.
Now geojsonlint enforce the right hand rule, how to fix the problem.


texts: I have a netcdf file which I converted using Make NetCDF Raster. Unfortunately, the x and y are not, I think, properly define. One way to solve this is by correcting the extent (I am not sure here) but I would like to ask your suggestions to fit the extent of the raster to my shapefile. Since it is global, the coordinates would be -90 to 90 and 0 to 360. I used  ArcMap 10.2 for the processing.


texts: How to calculate mean for each band in raster using GDAL and Python 3

texts:
I have a raster with 6 bands and I need to calculate the mean for all bands in the raster without value 0

I have this script but it works for one band only:

import os
from osgeo import gdal
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import ogr

raster = gdal.Open("D:/script/NDVI2015.tif")
bands = raster.RasterCount
bands
6

geotransform = raster.GetGeoTransform()
proj= raster.GetProjection()
data = raster.GetRasterBand(2).ReadAsArray().astype('float')
meandata(2) = np.mean(data[data != 0])#calcul mean without value 0

I'm very new with Python and GDAL.


texts:
What are the commands to apply all types of zoom (full, on selected layer, etc.) in python console?
I'm searching both on pyqgis cookbook and API documentantion, but I'm not finding anything interesting.


texts: Choosing web mapping API to use with MySQL for making map of one country?

texts:
I hope this question isn't too general, but I'm new to using maps, I'd like to make a map of one country on which I can plot points according to their geocodes from my mysql database, and to have the administrative districts outlined, like on google maps api, except I have read that google maps doesn't allow you to show just one country, and also, I'd like to use a free api if possible.

Would anyone be able to point me in the right direction?


texts:
map.events.register('click', map, fucntion(e){alert('on')} );
    map.events.unregister('click', map, fucntion(e){alert('off')} );

Looks easy enough but un-registering just won't trigger. I try nesting unregistering inside register function call back but still nothing.

Here is how I created my map..

    var bounds = new OpenLayers.Bounds(
            146501.328125, 2420230.75,
            352670.46875, 2801126.25
    );
    var options = {
            controls: [],
            maxExtent: bounds,
            maxResolution: 1487.873046875,
            projection: "EPSG:3826",
            unit: 'm'
    };
    format = "image/png";
    map = new OpenLayers.Map( 'MapPage_map-canvas2', options );

    //SETUP MAP EVENT
    event = map.events.register('move', map, function (evt) {
            document.getElementById('map-url').innerHTML = map.getCenter();
    });

    var county = new OpenLayers.Layer.WMS(
            "AllenProject:county",
            "http://localhost:8080/......./wms",
            {
                    LAYERS: 'AllenProject:county',
                    STYLES: 'AllenProject_BlackBorder_GreyBackground',
                    format: format,
                    tiled: true,
                    transparent: true,
                    //tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom
            },
            {
                    buffer: 0,
                    //displayOutsideMaxExtent: true,
                    transitionEffect: null, //'resize',
                    isBaseLayer: true
            }
    );
    map.addLayer(county);

    map.events.register('click', map, function (evt) {
            alert('on');
    });

    map.events.unregister('click', map, function (evt) {
            alert('off');
    });

I don't understand this.


texts:
I have ETGeo Wizard license and I would like to run the functions via ArcPy instead of running them in ArcMap.
However, the functions works in ArcMap but not  in a script.
one of the example is finding a center line of a polygon. I have got an error whenever run it in script. The error doesn’t make any sense because the function can take 6 arguments.
I have used even different names for the function as it used by other users.
 but still it doesn’t work.
I have ArcMap 11.6, Python 2.7 and ETGeo Wizard 11.6

Any suggestions?

BufferOutput = r'D:/Result/Segmented_Buffer.shp'
CenterLine =   r'D:/Result/Segmented_CenterLine.shp'
MAX_width = 1.0
MIN_width = 0.5
centerlines_type = "Inside"
smooth_centerlines = True
arcpy.ET_GPCreateCenterlines(BufferOutput, CenterLine, MAX_width, MIN_width, centerlines_type, smooth_centerlines)

Error:
Traceback (most recent call last):
  File "...../Convert Segment to Line.py", line 7, in <module>
arcpy.ET_GPCreateCenterlines(BufferOutput, CenterLine, MAX_width, MIN_width, centerlines_type, smooth_centerlines)
TypeError: ET_GPCreateCenterlines() takes no arguments (6 given)
Process finished with exit code 1

arcpy.CreateCenterlines(BufferOutput, CenterLine, MAX_width, MIN_width, centerlines_type, smooth_centerlines)

Error:
    Traceback (most recent call last):
  File ".../Convert Segment to Line.py", line 7, in <module>
arcpy.CreateCenterlines(BufferOutput, CenterLine, MAX_width, MIN_width, centerlines_type, smooth_centerlines)
AttributeError: 'module' object has no attribute 'CreateCenterlines'
Process finished with exit code 1


texts:
The identify features tool returns the wrong selection when I try to select multiple features. In the image, I am trying to select the orange region, but QGIS is identifying the red region (located right above the popup window).

Note that clicking a single feature works correctly, only the "click-and-drag" works incorrectly.
I have tried the following:

Using GeoPandas to convert the shapefile (originally in ESRI:102003) to EPSG:4326 before loading into QGIS. This does not allow me to select any features at all with the "click-and-drag" method (even when the project CRS is EPSG:4326). This change in behvaior makes me think the issue is with some CRS setting.
Updating QGIS to 3.14.1


texts: ERROR 000800 when trying to snap points layer to line or buffer layer?

texts:
I am using ArcCatalog 10.0 and trying to snap a set of points to another layer that has roads in it.  The points represent 10th miles along the road.

Here are the general steps for what i am doing:

create a new local geodatabase
copy my points and road layers into new GDB via copy/paste.
double click the snap tool in toolbox -> Editing tools
enter points layer as "input features", and line layer as "Snap environment".

These steps result in this error:

  ERROR 000800 The value is not a member of END | VERTEX | EDGE.

I have googled all over and read all the docs I could find on the ESRI site, but i can't make sense of what this error is telling me to do.

Does anyone have any ideas?

I also tried to create a buffer layer from the line layer using toolbox -> Analysis tools -> Proximity -> buffer and using that in the "snap environment" paramater, but i get the exact same error.

I suspect my line layer is in the wrong format, but I am stumped on my next steps.


texts: Group adjacent polygons with similar (but not same) attributes

texts:
In ArcMap 10, I have a few dozen tiffs with cells that represent habitat area that has been burned. Each burned cell has a Julian date of the fire associated with it.

I want to end up with polygons that represent a single fire event each, defined as (8-way) contiguous groups of cells where no bordering burned cells differ by >1 Julian day; i.e., where burned cells differ by 2 or more days, these would be classed as separate fires.
If I convert the tiffs to shp files based on the date field, it groups all the contiguous cells for a single date.

How can I merge only the polygons that are both adjacent and differing by one day?


texts: Get editorWidgetV2 type and config from field index

texts:
I want to duplicate properties of fields (widget, type, lenght etc.)

I cannot figure out why when I try to get the widget value, I always get TextEdit widget type and no configuration. I changed it under layer properties but no change appear on log. How can I get the properties value I have set ?

from qgis.core import *
from qgis.gui import *
from qgis.utils import *
from PyQt4.QtCore import QVariant

##input_layer=vector
##field_to_duplicate=field input_layer

layer=QgsVectorLayer(input_layer, "tmpName", 'ogr')
pr = layer.dataProvider()
caps = pr.capabilities()

fields = layer.pendingFields()

for field in fields:
    if field.name() == field_to_duplicate:
        FieldIdx = fields.indexFromName(field.name())
        field_widget = layer.editorWidgetV2(FieldIdx)
        field_widgetConfig = layer.editorWidgetV2Config(FieldIdx)
        QgsMessageLog.logMessage(str(FieldIdx)+str(field_widget)+str(field_widgetConfig), tag="Processing", level=QgsMessageLog.INFO)

here the message log output :

5TextEdit{}


texts: Is there a way to shift data in an attribute table so that all attributes are moved to a different coordinate?

texts:
I have several shapefiles where the attribute table is composed of timestamped data that is appended to the coordinates. Because of the nature of my data, I need to apply a time lag so that the data from a given time are placed a few minutes before. In other words, in Excel I would just delete the desired number of cells and have everything shifted up to the new coordinates.

The reason I do not do it in Excel is that I need to perform 'trial and error' until I find the right time lag to apply and it would be a lot faster if I could do it straight in QGIS where I can visually explore my data.


texts: Drag and Drop Custom Tools into Modelbuilder using ArcGIS Pro 1.0

texts: I am having trouble dragging and dropping python scripts from a custom 10.3 toolbox into a modelbuilder model in ArcGIS Pro 1.0.  Is there a way to activate this capability?


texts:
I am trying to create and show a context menu for arcmap desktop 10.2. I have followed the steps in the link provided by esri, which explains that I must override OnContextMenu. I am not sure if I am doing it right and need your help.

What I did was, I got the same code that is provided on the webpage and pasted it in my project, but nothing happens when I right click on the map. I am sure I am missing something.. do I have to register the context menu somewhere ?

I am a nooby it is obvious from my other questions, I do a lot of reading, but it gets very confusing, so I need someone to simplify things a bit.

Here is my understanding of what I should do, and correct me where I am wrong.
According to the link provided below, there are two ways to get a context menu to show. either by implementing the ITool.OnContextMenu in case I want the menu to show for a specific tool, or by implementing the IDocumentEvents.OnContextMenu, which for both cases the event OnContextMenu will automatically fire when the user right-clicks on the active view.

The implementation for the event is also provided in the link, which I copied and pasted into VStudio.. now comes the part where I am confused about. how do I get the event to fire ?.
When running the project arcmap starts, I right click on the active view, but no menu pops up. do I have to create the menu myself using windows forms?

http://help.arcgis.com/en/sdk/10.0/arcobjects_net/conceptualhelp/index.html#//0001000004p9000000

Update, here is a chunk of the code, I want to start listening to those events OnMouseDown and OnContextMenu in this part

    public class PTCExternalComponent : BaseTool, ISchematicXmlGenerate, ISchematicXmlUpdate{
    private Application _application;

    public void GenerateXmlData(string diagramName, string diagramClassName, ref   object xmlSource, ref bool cancel) {
               cancel = false;
        try {
            var app = NEAutomation2.Application.Instance().IApplication;
            var nameofActivetool = app.CurrentTool.Command.Name;
            var activeTool = (ITool)app.CurrentTool;
            var toolIndex = app.CurrentTool.Index;
            //((IToolbarControlEvents).OnItemClick(ss);
        //    activeTool.OnMouseDown(0, 0, 0, 0);

            var diagramGenerator = DiagramGenerationFactory.GetDiagramGenerator(
                diagramName, diagramClassName);
            if (diagramGenerator == null) {
                Logger.ShowMessageDialog("Unable to find a Diagram Generator for    diagram type [" + diagramClassName + "]", true);
            } else {
                bool canceled;
                var diagram = diagramGenerator.GenerateDiagram(out canceled);
                var sxg = new SchematicXmlGenerator(diagram, false); // for debugging
                if (diagram != null)
                    xmlSource = sxg.GenerateDiagramXml();
            }
        } catch (Exception e) {
            Logger.ShowMessageDialog(
                "An exception occurred while trying to generate diagram of type " +
                diagramClassName + "; Exception " + e.Message, true);
            ProgressTrackingUtility.HideProgressBar();
        }
    }

    public override void OnMouseDown(int button, int shift, int i, int i1) {
              // do stuff here
    }

    public override bool OnContextMenu(int x, int y) {
      //do stuff here
        throw new NotImplementedException();
    }

    object ISchematicXmlGenerate.ApplicationHook {
        get { return _application as AppRef; }
        set { _application = value as Application; }
    }
Rest of Code .....


texts: Calibration error for Sentinel 1 image in SNAP toolbox

texts:
I am working with a Sentinel 1 SLC IW image (VV+VH) and trying to calibrate the data in the SNAP toolbox. However, it keeps returning the error "cannot construct data buffer"

Does anyone have any idea why this might be happening?


texts: Down-sample raster map with average algorithm

texts:
I need to down-sample a map to new map with less resolution NOT for overview BUT to new map file with smaller size

I need to do that with gdal Utils


texts: Saving customized STYLES when upgrading from ArcMap 10.2 to 10.4

texts: In previous upgrades I have lost my personal styles used to create our atlas, and other labelling functions. Any suggestions how I can save these out and reinstall when we upgrade to Arcmap 10.4?


texts: How to filter image collection by date, excluding a date from a date range in Google Earth Engine

texts:
I am using air surface temp data from 2015 in Google Earth Engine but there is missing data for June 19, 2015 which is assigned the value 9.9621e+36.

So I need to create a date range from Jan 1 2015 to Dec 31 2015 which excludes June 19 2015. I know how to filter by date:

var AST2015 = ee.ImageCollection('NCEP_RE/surface_temp')
                .filterDate('2015-01-01', '2015-12-31');

But as long as that one June date is in their my mean and other stats are ruined. SOS


texts: 1-2 Pixel Gaps in NDVI raster function aligning with Mosaic Dataset footprint?

texts:
I am curious if anybody has seen a situation like this?

Using ModelBuilder in ArcGIS 10.2.2, I:

Create a FGDB > Create Mosaic Dataset > Add Rasters to Mosaic Dataset (800+ tiffs) > Edit Raster Function (NDVI and Apply ColorMap)

The area of coverage is an entire county, which for the vast majority looks just as I expect it to look.  The exceptions are 1 -2 pixel gaps which fall exactly around horizontal footprint lines in the NDVI temporary raster that is created.  The input tiffs are perfectly aligned, zero overlap and zero gaps.  I was able to break the county imagery into smaller sections and created FGDB for each section, then run the rest of my model on each subsection, and the NDVI rasters had no gaps.  This involved lots of trial and error.  Half county sections produced the same error, as did quarter county sections.  Finally, eighth county sections produced a usable product.  This was fine initially, but I this involves copying and recopying 100s of GBs of data (time expensive!) What's worse, is that there does not seem to be an exact data size that will/will not produce the errors.


texts:
I am using iGIS for iPAD
When I try importing one particular shapefile it gives me an error(see attached pic) saying I have the wrong projection.  It is the same one I use on my other 10shapefiles that load just fine.
I'm assuming it is something wrong with the shapefile since all the other ones work.  I use the same process and rechecked it many times on all, this is the only one that gives me the error.

iGIS support has went dark.  They are no help.
Does anyone that uses iGIS seen this error before and could they resolve the issue?


texts: How to make OpenLayers 3 behave like Google Maps when using mouse scroll

texts:
Google Maps API shows a message over the map when a user scrolls with mouse over the map.

The message advises the user to press the Control key while scrolling with the mouse over map. This is a very nice solution to preserve normal page scroll with the mouse.

Is this possible in OpenLayers 3?

Really there are two behaviors that we want to achieve:

How to detect that the user is doing scroll on the map with
the mouse and show an alert that you must press control key?
How can you make it so the zoom on the map can only be done by pressing
    control in addition to scrolling with the mouse?


texts: Error when trying to get a click event on wms layer

texts:
I'm trying to check if wms layer was clicked on, when i try to send the point that was clicked i get this message:

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE ServiceExceptionReport SYSTEM "http://x.x.x.x:x/geoserver/schemas/wms/1.1.1/WMS_exception_1_1_1.dtd"> <ServiceExceptionReport version="1.1.1" >   <ServiceException code="InvalidPoint">
      365, 315 not in dimensions of image: 1343, 0
</ServiceException></ServiceExceptionReport>

Why this happens?

The HTML code:

map.events.register('click', map, findFeaturesAtLocationOnClick);           // Register users click

function findFeaturesAtLocationOnClick(event) {

                mouseLocation = map.getLonLatFromPixel(event.xy);

                var url = events.getFullRequestString({

                                                                REQUEST: "GetFeatureInfo",

                                                                EXCEPTIONS: "application/vnd.ogc.se_xml",

                                                                BBOX: map.getExtent().toBBOX(),

                                                                X: event.xy.x,

                                                                Y: event.xy.y,

                                                                INFO_FORMAT: 'text/plain',

                                                                QUERY_LAYERS: 'events',

                                                                FEATURE_COUNT: 100,

                                                                WIDTH: map.size.w,

                                                                HEIGHT: map.size.h},

                                                                wmsURL);

                OpenLayers.loadURL(url, '', this, setPopupHTML);

}

function setPopupHTML(response) {

                // In this function, the response contains the exception I mentioned above

}


texts: Apply expression to synchronize multiple map extents in QGIS 3 layout using PyQGIS

texts:
I am using the following code to make a map with multiple map items. I would like to add the synchronization of the maps extents.
How do you apply an expression to the min/max extents of a map item on a layout using PyQGIS 3?
selectedLayers = iface.layerTreeView().selectedLayers()

mapCanvas = iface.mapCanvas()
mapThemesCollection = QgsProject.instance().mapThemeCollection()
mapThemes = mapThemesCollection.mapThemes()

mapRowCount = 2
mapColCount = 6

lrMargins = [10,10]   #set Left/Right Margins
tbMargins = [20,30]   #set Top/Bottom Margins

"""Create a new print layout"""
layoutName = "Multi Map {}x{}".format(mapRowCount,mapColCount)

project = QgsProject.instance()
manager = project.layoutManager()
layouts_list = manager.printLayouts()
for layout in layouts_list:
    if layout.name() == layoutName:
        manager.removeLayout(layout)

layout = QgsPrintLayout(project)
layout.initializeDefaults()
layout.setName(layoutName)
pc = layout.pageCollection()
pc.pages()[0].setPageSize('A3', QgsLayoutItemPage.Landscape)
manager.addLayout(layout)

iMapCanvas =0
mapOriginYMm = tbMargins[0]
mapOriginXMm = lrMargins[0]

for iRow in range(1,mapRowCount+1):
    for iCol in  range(1,mapColCount +1):
        #Remember 0,0 is Top Left..... TL to LR
        try:
            layer = selectedLayers[iMapCanvas]
            item_id = "{} - {}".format(iMapCanvas,layer.name())
            title = layer.name()

        except:
            layer=None
            item_id = str(iMapCanvas)
            title = 'Map {}'.format(iMapCanvas)

        map = QgsLayoutItemMap(layout)
        map.setRect(20, 20, 20, 20)

        map.setExtent(mapCanvas.extent())
        map.setBackgroundEnabled(False)
        map.attemptMove(QgsLayoutPoint(mapOriginXMm,mapOriginYMm,QgsUnitTypes.LayoutMillimeters))
        map.attemptResize(QgsLayoutSize(fraWidth,fraHeight,QgsUnitTypes.LayoutMillimeters))
        map.setId('Map {}'.format(item_id))
        layout.addLayoutItem(map)

        if iMapCanvas == 0:
            exp_ymin = QgsExpression("y_min(map_get( item_variables( {} ), 'map_extent'))".format( map.id()))
            exp_ymax = QgsExpression("y_max(map_get( item_variables( {} ), 'map_extent'))".format( map.id()))
            exp_xmin = QgsExpression("x_min(map_get( item_variables(  {} ), 'map_extent'))".format( map.id()))
            exp_xmax = QgsExpression("x_maxn(map_get( item_variables(  {} ), 'map_extent'))".format( map.id()))
        else:
            # How do I apply the expressions to the map item
            pass

        # add Title
        map_title ="Title - Map {}".format(iMapCanvas)

        if layer is not None:
            map_title = layer.name()
            if layer.name() in mapThemes:
                map.setFollowVisibilityPreset(True)
                map.setFollowVisibilityPresetName(layer.name())

        title = QgsLayoutItemLabel(layout)
        title.setText(map_title)
        title.setFont(QFont('Arial', 14,QFont.Bold))
        title.setId("Title - Map {}".format(iMapCanvas))
        title.adjustSizeToText()
        layout.addLayoutItem(title)
        title.attemptMove(QgsLayoutPoint(mapOriginXMm, mapOriginYMm, QgsUnitTypes.LayoutMillimeters))

        mapOriginXMm += fraWidth
        iMapCanvas += 1

    mapOriginYMm += fraHeight     # Add next row
    mapOriginXMm = lrMargins[0]              # reset to left edge of page

# open the layout
iface.openLayoutDesigner(layout)


texts: undecodableError: invalid start byte when processing SRTM data

texts:
Downloading SRTM-Data using the QGIS-SRTM-Downloader plugin works fine. I now do want to process this image data further by using the contours plugin within the extraction tools of raster data, but there's always an error message:

undecodableError: 'utf-8' codec can't decode byte 0x81 in position
154: invalid start byte

How to solve this problem?
Browsing the web told me that there was once an error with utf-8 related to imagery date, but this should have been solved with release 3.4 (I'm using 3.16).
The same error message also appears when trying to clip the SRTM-image into with a polygon to reduce its extent to a smaller area of interest.


texts:
How can you install the osgeo module in a virtualenv? I downloaded QGIS using KyngChaos (www.kyngchaos.com/software/qgis) following https://arset.gsfc.nasa.gov/sites/default/files/land/webinars/Advanced_Land_Classification/ARSET_Downloading_Installing_QGIS_Final.pdf (without the optional modules "GDAL Extras")

It seems to build all of the Python frameworks on my system's version of Python. I tried adding the path export PATH=/Library/Frameworks/GDAL.framework/Programs:$PATH to my bash profile but I still get ImportError: No module named osgeo.

I also tried following Install GDAL python package in virtualenv on mac but get this error when I try to python setup.py build:

extensions/gdal_wrap.cpp:3172:10: fatal error: 'cpl_vsi_error.h' file not found
#include "cpl_vsi_error.h"

The error persists after I modify the config.cfg file to my brew installed GDAL

[build_ext]
# gdal_config = ../../apps/gdal-config
gdal_config = /usr/local/bin/gdal-config

Any ideas?

I can't use my system version of python because I have OpenCV installed in a virtualenv.


texts: What is the difference between wms_scale_denominator and MaxScaleDenominator/MinScaleDenominator

texts:
I take my first steps in creating SLDs using the documentation.

For TextSymbolizer
I found this code snippet to achieve different views in different zoom levels - Zoom-based views.

   <CssParameter name="font-size">
     <ogc:Function name="Categorize">
       <ogc:Function name="env">
         <ogc:Literal>wms_scale_denominator</ogc:Literal>
       </ogc:Function>
       <ogc:Literal>12</ogc:Literal>
       <ogc:Literal>300</ogc:Literal>
       <ogc:Literal>10</ogc:Literal>
       <ogc:Literal>2500</ogc:Literal>
       <ogc:Literal>8</ogc:Literal>
     </ogc:Function>
   </CssParameter>

For PointSymbolizer
I found this code snipped to achieve different views in different zoom levels - Zoom-based views.

 <FeatureTypeStyle>
     <Rule>
       <Name>Large</Name>
       <MaxScaleDenominator>160000000</MaxScaleDenominator>
       <PointSymbolizer>
         <Graphic>
           <Mark>
             <WellKnownName>circle</WellKnownName>
             <Fill>
               <CssParameter name="fill">#CC3300</CssParameter>
             </Fill>
           </Mark>
           <Size>12</Size>
         </Graphic>
       </PointSymbolizer>
     </Rule>
     <Rule>
       <Name>Medium</Name>
       <MinScaleDenominator>160000000</MinScaleDenominator>
       <MaxScaleDenominator>320000000</MaxScaleDenominator>
       <PointSymbolizer>
         <Graphic>
           <Mark>
             <WellKnownName>circle</WellKnownName>
             <Fill>
               <CssParameter name="fill">#CC3300</CssParameter>
             </Fill>
           </Mark>
           <Size>8</Size>
         </Graphic>
       </PointSymbolizer>
     </Rule>
     <Rule>
       <Name>Small</Name>
       <MinScaleDenominator>320000000</MinScaleDenominator>
       <PointSymbolizer>
         <Graphic>
           <Mark>
             <WellKnownName>circle</WellKnownName>
             <Fill>
               <CssParameter name="fill">#CC3300</CssParameter>
             </Fill>
           </Mark>
           <Size>4</Size>
         </Graphic>
       </PointSymbolizer>
     </Rule>
   </FeatureTypeStyle>

So I wonder why there is a different syntax and what is the difference between <ogc:Literal>wms_scale_denominator</ogc:Literal> and MaxScaleDenominator/MinScaleDenominator


texts: Why does QGIS 2.0 and SQL Server say Data source name not found and no default driver specified?

texts:
I've just started using QGIS 2.0 after using 1.8 for sometime. However I'm having an issue getting a SQL Server connection, I'm using the same settings as as used in 1.8 but I keep gettting an error when I try to 'Test Connection' and I don't understand why.
Here's the error:

'[Microsoft][ODBC Driver Manager] Data source name not found and no default driver   specified QODBC3: Unable to connect'


texts:
How do I know if the DEM contains z-values?

I am looking at the DEM's layer properties and it does not mention the z values.

I then add it to ArcScene and tried to find it without success.

It only shows the x,y values.


texts:
I have been generating near tables for the nearest neighbour, for weeks now with the same files, but when I tried it today it would not work. Here is a snapshot of the error. I also have one input feature, and one near feature.

How do I fix this?

The only thing I have done differently on my laptop is change the folders around, but I have exported the data to Arcmap from these new folders.

I have also double checked and the attribute tables are not empty. Everything looks the way it should.


texts:
I currently have the transit data of my city in sqlite, following are the tables

(STOP TABLE)
STOPID STOP LATITUDE LONGITUDE

(ROUTE TABLE)
ROUTEID STOPID

(ROUTE SRC_DEST)
ROUTEID SRC DEST

(TIME TABLE)
ROUTEID STARTTIME ENDTIME ISUP

Are there tools to help converting non-standard formats to GTFS?


texts:
I have a set of rasters (NDVI001.tif...NDVI200.tif) and I want to correlate these with overlain time series observed soil moisture.

This link suggests to extract point from the raster and do it graphically in Excel:
I believe it can be done it R; I just do not know how.

library(raster)
library (gstat)
r<- raster ()

NDVI <- stack(list.files(path = userpath, pattern = 'NDVI*.*.tif',full.names = T))
Soil<-readOGR('C:\\somepath\\file.shp', 'file')
proj4string(Soil)=CRS("+init=epsg:4326")

I am stuck here. I do not know how to continue. The shp has field values similar to the dates of NDVI001...200.tif.

 NDVItemp<-values(NDVI)
corvalues,-vector (mode='numeric')

for (i in 1:dim(NDVI)[1]{
corValues[i] <- cor(x = NDVItemp[i,], y = Soil[i,], method = **'pearson'**)
}

correlationRaster <- setValues(NDVI[[1]], values = corValues)
plot(correlationRaster, xlab='latitude', ylab='longitude', main="NDVI vs Soil")


texts: Limit data by user data or role properties

texts:
I have a map of points in Belgium. Each point is linked to a specific user. The points are saved into a database. So I created a layer that loaded in all the points.

I want to create a map for each user that only contists of his own data. Is there a possibility to link data to a user, filter the points and generate the map? For security reason, I can't set the user data in the url. So can I create a map for each user without creating for each user a different layer, with a different sql view?


texts: Plotting distribution of two different species in R?

texts:
I have data for species distribution modelling of two different species. I need to plot the predicted distributions of the two species in the same raster plot to be able to find the areas where they occur in allopatry(alone) and sympatry(together).

How do I plot such a map in R?

My data is a point data used with other environmental for the species distribution model. I have done the distribution modelling and have the predicted raster layer for the two species in two different raster plots. But what I want is to plot the two rasters in the same plot, such that I could show areas where the two species occur together(sympatry), where they occur differently (allopatry) and where they do not occur at all.


texts: How to show cell values of raster in ArcGIS

texts: I would like to know if it is possible to display a raster cell value in the center of a cell with ArcGIS in the same way that SAGA-GIS does when you zoom in.


texts: Sample point elevation from a given contour

texts:
I need to sample the elevation at number of predefined location given in CSV format (but could convert to shapefile if needed). My input data is a shapefile of contour lines.

Is it possible to sample the elevation directly? Possibly having to converting the contour to a DEM or other sort of raster.

I've seen many questions regarding the opposite transformation (points to contour) but I can't seem to have been able to find this one.


texts: Zooming into landsat-8 produces pixellated view

texts: I am working on a project were I am using LANDSAT 8 images for remote sensing.  The issue that I have is that when I zoom into them the photo is pixellated.  I can not see a thing.  When I zoom out and view it from a distance it works, but I need to be able to view it closely.  What I need is to have a clear view at say a scale of 1:1,250.  Is this possible?  I have taken and looked at pan-sharpening the bands, is there anything else that I may be missing?  The program that I am using is ArcMap.


texts: How to replace values in rasters in directory 1 based on condition on other rasters in another directory?

texts:
Having 10 raster files in one directory and another 10 rasters in another directory and both have the same dimensions.

directory 1:

    files1 <- list.files("C:\\2010", "*.envi", full.names = TRUE)
    s <- stack(files1)

directory 2:

 files2 <- list.files("C:\\2012", "*.envi", full.names = TRUE)
 s1 <- stack(files2)

I would like to filter s based on s1.
I want to replace values in all layers in s by NA whenever corresponding layers in s1 have values greater than 0.6(corresponding pixels).


texts: Calculate distances between records in two tables

texts:
I need to identify the nearest 3 childminders (approx 500 records) to the nearest school (approx 120 records). Both the childminders and schools layers reside in PostGIS. Can anyone offer any assistance?

I do have FME at my disposal however this only returns the nearest childminder to each school using the NeighborFinder transformer.


texts: ArcGIS 10.2 Model Builder If no selection is made, then do not append to empty feature class

texts: I'm creating a model in model builder that is very easy to construct and understand. However, I ran into a slight problem. The logic of the model is that it will take user selected features from a layer and append those selected features to an empty feature class with the same schema and field definitions. The problem here is that by default, all feature rows are returned in the Append tool if no selection is made. Is there any way to tell model builder to not append any features if there is no selection made? The final output in the empty feature classes should only be user selected features. I want to keep this automated, so I am open to a python script workaround if such a statement in python exists.


texts: ArcGIS Overwrite hosted Feature Service- Allow_Exporting issue

texts:
I have a hosted feature service that I overwrite on a nightly basis, this all works fine however I am having issues setting the parameter for "allow_exporting"

I set the value to True however after the update when I go into ArcGIS Online under item details the box is unchecked for allowing others to export.

I even set the parameter as allow_exporting = True  but it still does not work. anyone see an issue?

arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, sd_fs_name, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS',"my folder name", True, True, True, allow_exporting=True)

and also

arcpy.mp.CreateWebLayerSDDraft(mp, sddraft, sd_fs_name, 'MY_HOSTED_SERVICES', 'FEATURE_ACCESS',"my folder name", True, True, True, True)

both with the same results.... the document for this function is HERE


texts: Computing Excess Green Vegetation Index (ExG) in QGIS

texts:
I have to process the image for Sugarcane row detection and extraction.
Sample image is accessible from the link: https://github.com/AndresHerrera/croprows_generator_pa_v2/tree/master/droneimages
I have to calculate Excess Green Vegetation Index (ExG) in QGIS to highlight green regions.
How to I compute ExG index using QGIS to have a result as in the following image:


texts: ModelBuilder: Using Parse Path in iterative model to include folder name in output file name

texts:
I have a simple model in ModelBuilder that does the following:

Iterate through a folder of rasters (these are outputs from Global
Climate Models)
Clip each raster to a study area (Egypt), using a polygon, and dump outputs into a Geodatabase
For each clipped raster use the Zonal Statistics as Table tool to calculate some basic statistics (i.e. mean, min, max) and dump the outputs into a folder

Problem: There are many input rasters, each with similar names (i.e. Temp1, Temp2, Precip1, Precip2 etc.). This means that when running the model the outputs are all subsequently named very similarly such that I am unable to know which GCM each output has come from.

What I would like to do: Each input raster is stored in a folder with a name that I would like to retain in the output file names. I would like to include this name in the output of each clipped raster (step 2 above) and in the output of each statistic table (step 3 above).

Current model: Below is a screenshot of my current model. I understand that I need to use the Parse Path and Calculate Value tools to retain the folder name and pass this into the output file names but I do not know how to do this. Help!

Progress:
Thus far I have the below. I can get it to include the originating folder name in the output files in the clipped raster but it's also including part of the parent folder too (i.e. ParentFolderName_FolderName rather than simply FolderName_%Name%_c).


texts:
How I can delete points along a line, with a distance tolerance?

As you can see in the figure, the points near the line should stay, the points between the lines should be deleted


texts: Difference between Geoparsing and Georeferencing

texts: Can anyone please tell the difference between Geoparsing and Georeferencing?


texts: Spatially matching Landsat images in ArcMap?

texts:
I'm trying to look at the desiccation of a lake over a number of years using images from different Landsats. However when I import the different years into arcmap they are completely unsynchronized. I have consider it might be a case of manually georeferencing, but i may be wrong.

What is the quickest way to align them?


texts: WGS84 expressed in meters - default projection in ArcMap

texts:
I am trying to identify the correct coordinate system for some data, with x and y expressed as (for example, data located roughly in the UAE):
6,220,199;  2,742,099

I haven't come across these 7-digit coordinate pairs before, however I note that when I use the identify tool to find coordinates in ArcMap or set the units for a data frame to meters, with the dataframe coordinate system in WGS84, I get similar coordinate pairs.

What projected coordinate system does ArcMap use to express WGS84 in meters when using these tools? As it seems like whatever this is, is the correct PCS for my data.


texts: How to keep an edited layer edited in graphical modeller QGIS?

texts:
I'm new to the graphical modeller of QGIS, and was wondering how to keep a line shapefile which has been edited and some of its parts deleted?
For example, I have a country polygon that I have changed into lines using the vector > geometry tools > polygons to lines. The country investigated being a coastal country, I edited the line layer, split it, keeping only the coast line.

Then I use the SAGA tool to convert lines to points. However, when running the model from the beginning, it will transform all the lines into points, including the ones I don't need. Is there a way to keep the newly edited line layer in the model and then run the lines to points tool on it?


texts: I have a simple question about corce(?) list class data into vector. I extract a tif file from polygon to achieve a list. Maybe the class of list is leaded by extract function. I check the list length is 1, but contained 135187 number. Now I need to change the list into integer or vector. I need to calculate this 135187 number.


texts: Using ST_Buffer on a geometry in SRID 3035 changes location

texts:
I'm trying to buffer a linestring using PostGIS and get very strange results. Using this SQL in QGIS:

SELECT row_number() over () AS id, * FROM (SELECT st_asewkt(ST_Buffer(geometrie,20)) AS geometrie FROM "erhaltung"."abschnitt" )
  AS _subq_1_

on a table that has a "geometrie" column storing a LineString in SRID 3035, the resulting buffer is not where the linestring is located (some place in Germany), but in Saudi Arabia. Does anyone have an explanation for this?


texts: Hyperlink Script to Open Shapefile in ArcMap?

texts:
I'm new to Python and need some help please.

I have a shapefile (Index.shp) that is used as an index for the world splitting it into 264 areas (polygon). I'm trying to create a Python script (for the ArcMap Hyperlink Script section of this Index.shp) that will add another shapefile to the current ArcMap project based on the polygon the user has clicked on with the hyperlink tool.  The Index.shp has an attribute field called File_Name with the shapefile name to be opened.

I was able to get some information online, but I still can't figure out how to get it to work.

Here's my code to far:

import arcpy

#get the current map document
mxd = arcpy.mapping.MapDocument("CURRENT")

#set the directory to bathy shapefiles
fc = "C:\GIS_Data\Bathymetry\Global"

#get the data frame
df = arcpy.mapping.ListDataFrames(mxd,"*")[0]

#create a new layer - [File_Name] = bathy shapefile name
bathy_file = (fc+ [File_Name] +'.shp')

newlayer = arcpy.mapping.Layer(bathy_file)

#add the layer to the map at the bottom of the TOC in data frame 0
arcpy.mapping.AddLayer(df, newlayer,"AUTO_ARRANGE")


texts:
I have a dataset with two layers: a Planned Projects polygon layer and Roads represented by lines. The lines intersect one another, the Planned Projects polygons overlap.
Using a spatial join that matched roads that are "within" the polygons, I got a copy of the
Roads dataset which includes columns for any overlapping Projects.
The problem is:
As the polygons overlap, some line segments are matched to multiple polygons.
In the image below, the red segments of the road are (correctly) not matched to any polygon; the green segments are (correctly) matched to one polygon, and the blue segments are incorrectly matched to two polygons and only include data for one of the two overlapping project polygons (in this case, they are matched to the horizontal polygon).

I would like for the vertical segments to be matched with the vertical polygons and horizontal segments matched with the horizontal polygon.
How would I do this using ArcGIS Pro?


texts: evt.layers undefined while trying to display Legend widget in Javascript API

texts:
I cannot get an ArcGIS Javascript API Legend widget to show up. An excerpt of my code is as follows. I believe I'm failing somewhere near the console.log that I call...undefined comes up in the console at this point. So for some reason evt.layers is not getting populated. Have I provided enough code? If you need more snippets I can copy/paste more.

        parser.parse();

        //initialize the map object
        map = new Map("map", {
            basemap:"gray",
            center: [-96.53, 38.374],
            zoom: 13
        });

        //access the hydro layer as a feature layer
        var hydro = new FeatureLayer("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/0", {
            mode: FeatureLayer.MODE_ONDEMAND,
            outFields: ["*"]
        });

        //add hydro to map
        map.on("layer-add-result", function (evt) {
            console.log(evt.layers);
            var layerInfo = arrayUtils.map(evt.layers, function (layer, index) {
                return {layer:layer.layer, title:layer.layer.name};
            });
            if (layerInfo.length > 0) {
                var legendDijit = new Legend({
                    map: map,
                    layerInfos: layerInfo
                }, "legendDiv");
                legendDijit.startup();
            }
        });
        map.addLayers([hydro]);
    });


texts: If I have two rasters, let's say x1 and x2, that are the same dimensions, how can I take the average of the two but only where both have data to have a third raster x3 that is a composite of the first two? For example, if the cell in row one column one for x1 has no data but x2 does then I want my final raster to just have the x2 value.  If both rasters have data in the cell from row one column 2 then I want the resulting raster to have an average in that cell.  I am sure this can easily be done in a for loop or perhaps an apply function but I am unsure how to set it up.


texts: Industry-based examples of using ArcPy in Python for Geoprocessing?

texts:
I was asked recently by some students what types of operations GIS Analyst/Developer are usually trying to automate by using Python with geoprocessing in ArcGIS and ArcPy site package. I guess it might be useful to know when searching for some exercises to do to be sure that what you create is relevant for the industry and might be re-used later already at the workplace.

The easiest answer would be "read the Esri help and go through the samples", but I was looking for more specific scenarios which are most common to implement. Thus, sharing workflows sush as "we are getting a .zip file with shapefiles, we use Python to unpack it, project them all to the X coordinate system, load into an ArcSDE geodatabase, grant users access to these data" are most welcome. Please feel comfortable to provide a concise description of the workflow, no extreme details are required.


texts:
I use google maps, php, mysql, and I want to create a buffer zone in line among some points.

Could someone tell me where can i find the algorithm (php library or the math in order to implement it) to achieve this?

In the forum I read a lot of similar questions based on postgis and the ST_BUFFER function, i want to implement this function in php or javascript with points of google maps.


texts: Address Fields in Canadian Municipal Data Model

texts:
I'm looking at the Postal address table in Esri's Canadian Municipal Data Model. There are some fields in there I don't understand, and wondered if anyone could help me out.

The fields are:

INTSTATE (String 5) The international state abbreviation
INTPSTLCD (String 10) The international postal code
PSTLSTATE (String 2) The two digit state abbreviation
PSTZIP5 (String 5) The postal zip 5
PSTZIP4 (String 4) The postal zip + 4

Given that this is a Canadian model (and I already have fields for Province) I'm assuming "state" means "country"? Or not? And what is the International Postal Code (which I've googled w/o finding)

The data is all in the city of Vancouver, BC.


texts: Sdo_Geom.Sdo_Intersection is not considering overlapping vertices

texts:
I'm using below package to get the number of intersecting vertices

Sdo_Util.Getnumvertices(Sdo_Geom.Sdo_Intersection(B.Geom,R.Geom,.00000000005))

It is returning only 1 when there are actually 15 vertices in B.Geom. I have validated this by using Sdo_Util.Getnumvertices(B.Geom) and is returning 15 vertices.

I'm a novice in Spatial database and not very sure if Sdo_Geom.Sdo_Intersection Will remove duplicates/overlapping vertices? I wnat to be able to consider all the overlapping vertices as well. Can anyone please let me know if i'm doing right thing here?

Please see below image of intersection where B.Geom is the point (has 15 overlapping vertices) & R.Geom is the polygon.


texts: How can I get a relation with multiple ways as members in addition to the members with Overpass QL?

texts:
There's a relation I'd like to export via the Overpass API that happens to contain two ways as members. However, I'd like to export the relation along with the two member ways. I haven't been able to figure out how to modify this query to do this though:

Overpass Query

[out:json][timeout:25];

(
  relation["type"="building"](41.240076, -73.1221787, 41.7183459, -72.832613);
);

out body;
>;
out skel qt;

This query just returns the two member ways, but not the relation. How can I modify this query to return both the member ways and the containing relation?


texts: Writing data into Esri *.mdb personal geodatabase using QGIS?

texts:
I have an empty *.mdb database that I have to fill with data.

The problem is that I cannot install ArcGIS for Desktop on Ubuntu, so I decided to do it using QGIS 2.0.1 with a Grass plugin.

However, I do not know how to import data into *.mdb using it.


texts: Is there a Log or Ln function in QGIS Field Calculator?

texts:
I can't seem to find any way to take the logarithm (natural or base 10) of a field in QGIS. I have gotten to the field calculator but there is not a button for log and I can't seem find any formula that works.

I'm using 1.4.0 on linux currently. I couldn't find anything in release notes about this being added since, but does anyone know if it's in a newer release?

Many thanks!


texts: Route Events Won't Interpolate Z Values On 3D Route?

texts:
I am trying to interpolate z values based on the example provided in this post on geonet. In it she has a set of know x,y,z locations that she turns into a Polyline Z and converts to a route (PolylineZM). Then she places (using Locate Features Along Routes) other points of interest with unknown z values on the route and uses Calculate Geometry in the attribute table to get the z values at those points. I would like to do the same, but am having issues because my 2D/x,y points won't locate themselves on my 3D/x,y,z route, or, if they are, they are refusing to calculate geometry relating to z values.

I created the route from points I had and tried to locate my route events on the route. I tried yet again after my initial post and they all showed up as route events, but they won't calculate the z geometry for my points of interest. My points are just Point M, while the geonet poster's points were PointZM. As a result, Z values aren't even an option in the Calculate Geometry menu. The only time I've been able to Calculate Geometry with z values was when I put some z values (from the route) into my route events before locating them on the route, but only those edited records would calculate geometry. I need to interpolate the unknown route event z values from the route, and it was somehow done in the above geonet post, so I'm hoping it really is possible.

Is there a way to make all of these route events into Point ZM without explicitly setting z values before locating them on the route?

I tested by putting some z values (from the known route z values) in the some of the rows of the route event table.

The selected points in the picture are those I assigned test/known z values to and they would generate values when I used Calculated Geometry, but I was trying to get z values for the dots without values which are yellow.

I tried adding NULL values to the z field in hopes of making clear it should be 3D and has unknown z values rather than a z value of 0, but the z values get removed when I run the Locate Events Along Route tool if there are only NULL z values, leaving me with just a PolylineM that won't interpolate z values from the route. If I try to add the z values back with Feature to 3D by Attribute, it will remove the event layer from the route and leave me with a PolylineZ. It will keep z values if there are some actual (non-zero, non-NULL) values, as when I ran my previously mentioned tests, but that still leaves me with a bad PolylineZM since, as previously mentioned, my points of interest don't have z values and so are omitted/can't have their z values interpolated from the route.


texts: QGIS does not show the Geometry Collection Polygons from JSON file

texts:
I'm trying to import a JSON file I got from a customer and convert it to a shapefile.  The JSON file appears to have two Geometry types (Polygon and GeometryCollection).  I can get the Polygons to import properly, however I cannot seem to get the GeometryCollection to import the Polygons they have in them.  I am running QGIS 2.18.7 which I believe can handle multiple types.

I've stored the file I am trying to import here:
Sample File

Is the file corrrupt or am I missing something?


texts: problem with open popup onclick marker in openlayers?

texts:
I am very new to openlayers. I have done showing map and whenever we click on the map it is showing marker. But i need to open the popup when i click on the marker.

The following code has some problem. When i click on marker popup is displaying but at the corner it is displaying. I want to display the popup on the marker it self


texts: Join the fields (column) into headers after geoprocessing

texts:
I am new on QGIS, I will try to be as specific as possible, but it seems quite hard to explain...
I am working with a first polygon vector: species' territories [In the attributes table: 50 lines, for every 50 territories]
My second vector-polygon is the land-use type in my region of interest [81 types of habitats in total, corresponding to 81 lines].
I want to know the composition of each territory, and the surface of each land-use type that lie in those territories. [e.g. : 1st territory composed of 10m² of forest, 40m² of grassland etc... 2nd territory composed of 22m² of forest, 0m² of grassland etc...]
First, I clipped both vectors, to have all my land-use types that lie within my territories of interest.
Second, I've calculated the surface of each "patch" of land-use.
Third, I used "Union", input=Territory, Output=Clipped.
My problem is that in the attribute table of this new vector, the result is shown as follows: [3 columns and too many rows !]
1st territory - Forest - 10m²
1st territory - Grassland - 40m² etc...
2nd territory - Forest - 22m²
2nd territory - Grassland - 0m² etc...

While I wanted to have the land-use type as a header, [with 50 lines for the 50 territories, and 82 columns (81 land-use types and 1 for the name of the territories)]:
Name of territory - Forest (m²) - Grassland (m²) - ...
1st territory     -   10        -    40          -  ...
2nd territory     -   22        -    0           -  ...

I can recreate by hand a table and reorganize my headers and fill the surface of each but it will take ages and I have a strong feeling that another solution is possible...
I don't know what I am doing wrong here, whether it comes from the geoprocessing tools, or if there is any other tool that I can use to transform the table faster, even with Excel or R.


texts:
I have Geoserver 2.9.4 and have a layer published in.
Now I do two pretty same requests:

To GWC

http://localhost:8080/geoserver/gwc/service/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=map_0041000003EA&SRS=EPSG%3A100000&TILED=true&WIDTH=256&HEIGHT=256&CRS=EPSG%3A100000&STYLES=&BBOX=1615955.2149769105%2C341138.45723674074%2C1616031.6520051956%2C341214.8942650259

To WMS

http://localhost:8080/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=map_0041000003EA&SRS=EPSG%3A100000&TILED=true&WIDTH=256&HEIGHT=256&CRS=EPSG%3A100000&STYLES=&BBOX=1615955.2149769105%2C341138.45723674074%2C1616031.6520051956%2C341214.8942650259

As you can see, the symbol on a GWC tile looks bigger. So I want to find explanation. Why does it look bigger?

UPDATE

After i updated Geoserver to 2.12.4, my GWC layers starts throw errors about resolution do not match. So i create new gridset based on resolution from error. And now i can get my gwc layer only on scales what declared in gridset.
This is new feature?

But my first probles solved. Now WMS and GWC layer on same scale looks the same.


texts: Shell/GRASS: Exit loop upon raster value

texts: I am running a loop from a shell script in GRASS GIS 7. Basically, values are subtracted from a raster in each step. I want the script to stop/exit if any of the raster values is 0 or less. Is there a simple if(,,) command to accomplish this?


texts: Visualisation using simple plotting routines or advanced GIS packages?

texts: When I have geographic data to be displayed, I usually use a plotting library to visualise the data, for example, combining matplotlib and basemap, or using the Matlab Mapping toolbox. For example, I have data gridded on a lat - lon grid, and to get them on a map, all I need is a projection and a bit of background map data (usually only coastlines). I am quite satisfied with the results of my visualisation. What does a full-fledged GIS package add that I'm currently missing?


texts:
I lost DVD that came with  Nikon NPL 322 Total Station.
What software and programs(and versions) do I need to have in order to download and upload data from  the Total Station(purchased in 2012)?


texts: QGIS plugin development environment variables?

texts:
I want to develop a plugin gor QGIS3. I downloaded Osgeo4w network installer 64Bit.  I created a bat file as following for set my environment variables;

@echo off
call "%~dp0\o4w_env.bat"
call qt5_env.bat
call py3_env.bat
@echo off
path %OSGEO4W_ROOT%\apps\qgis\bin;%PATH%
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis
set GDAL_FILENAME_IS_UTF8=YES
rem Set VSI cache to be used as buffer, see #6448
set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\qt5\plugins
start "QGIS" /B "%OSGEO4W_ROOT%\bin\qgis-bin.exe" %*
SET PYCHARM="C:\Program Files\JetBrains\PyCharm Community Edition
2018.2.5\bin\pycharm.exe"
start "PyCharm aware of QGIS" /B %PYCHARM% %*

But when I try to add interpreter to my project in pycharm it gives the following error:

What am I doing wrong? When I try sys.path from QGIS3 console it gives the path like this :

I read about this situation from other posts but they did not solve my problem.


texts: Making a for loop to count crimes within a certain distance

texts:
I'm working on a project that involves counting how many crimes of a certain type happen within 150 meters or 500 meters of a list of addresses. While I've been able to do this successfully without a for-loop, it's a bit cumbersome because of the different crime definitions I need to use, so I'm trying to shorten the process a bit.

Right now, here is the general structure of what I'm trying to do (edited):

function(input dataframe, distance, output){
 for (i in dataframe)
  1. create bounding box row i
  2. calculate number of intersections of boundingbox and file for two different files, based on the year the address is from
  3. return this count
}

countcrimes <- function(x, d, output){
  for (i in 1:dim(x)[1]){
    bbox150m <- st_buffer(x[i,"geometry"], dist = d)
    if (x[i,]$year == 1){
      vc150m <- st_intersection(x = bbox150m, y = crime1516_v)
      output[i,] <- vc150m %>%
        group_by()
      count()
    } else if(x[i,]$year == 2){
      vc150m <- st_intersection(x = bbox150m, y = crime1617_v)
      output[i,] <- vc150m %>%
        group_by() %>%
      count()
    }
  }
  return(output)
}

data_sf$vc150m <- countcrimes(data_sf, 150, vc150m)

The error I'm getting right now is

Error in .subset2(x, i, exact = exact) :
  attempt to select less than one element in get1index.

it looks like my function pretty much stops working at the state where I use st_buffer. If anyone has any ideas of how I could make a function to go through the dataframe that would be really helpful!

Error in .subset2(x, i, exact = exact) : attempt to select less than one element in get1index
9. (function(x, i, exact) if (is.matrix(i)) as.matrix(x)[[i]] else .subset2(x, i, exact = exact))(x, ..., exact = exact)
8. [[.data.frame(obj, attr(obj, "sf_column"))
7. obj[[attr(obj, "sf_column")]]
6. st_geometry.sf(x)
5. st_geometry(x)
4. [.sf(x, i, "geometry")
3. x[i, "geometry"]
2. st_buffer(x[i, "geometry"], dist = d)
1. countcrimes(data_sf, 150, vc150m) `

Edit: per @spacedman's suggestion I did some more debugging (which I stupidly didn't do before) and realized that some earlier issues with bind_rows on data_sf was compromising the object's geometry. Function doesn't yet work (facing the error Error in if (x[i, ]$year == 1) { : argument is of length zero) but problem solved for now.


texts:
I have a collection of tiles downloaded from the EDINA Digimap service, in asc format. I imported these into GRASS using the r.in.gdal function, and they appear in the display screen as expected.

I want to join these separate raster files together to create one continuous raster, however when I use the r.patch function, a map is created in the layer manager, and I get 100% completion, but nothing shows up in the display.

Any ideas how to correct this? Or a different function that is better suited?


texts:
I would like to use OpenLayers 3 to write GML features.

Here is my code:

proj4.defs("EPSG:25833", "+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs");

prjCrs.epsg25832 = ol.proj.get('EPSG:25832');
prjCrs.epsg4326 = 'EPSG:4326';

var features = digitizingVector.getSource().getFeatures();

var format = new ol.format.GML();
var out = format.writeFeatures(features, {
    dataProjection: prjCrs.epsg4326,
    featureProjection: prjCrs.epsg25832
});

However, this always spits out the following error message:

ol.js:357 Uncaught TypeError: Cannot read property 'undefined' of undefined

With ol-debug.js the following error message is returned:

I am using the exact same logic to write features in GeoJSON, KML, GPX, WKT and it works perfecty fine. Is there an issue with GML features in OpenLayers 3?

I am using version 3.19.1 of OpenLayers.


texts: Determining if Sentinel-1 orbit is ascending or descending from absolute orbit number?

texts:
The file name convention for the Sentinel-1 mission is
MMM_BB_TTTR_LFPP_YYYYMMDDTHHMMSS_YYYYMMDDTHHMMSS_OOOOOO_DDDDDD_CCCC, where

MMM: mission identifier (S1A, S1B)
BB: mode/beam (IE/EW/WV)
TTT:    product type (SLC, GRD, OCN)
R: resolution class ((F)ull, (H)igh,    (M)edium)
L: processing level (1,2)
F: product class ((S)tandard,    (A)nnotation)
PP: polarization (SH, SV, DH, DV)
YYYYMMDDTHHMMSS: start time / end time
OOOOOO: absolute orbit number
DDDDDD: mission data take ID
CCCC: unique product ID

Is there any way to quickly find out whether the orbit was ascending or descending from the absolute orbit number?


texts: WMS layer throws "IReadBlock failed at X offset 0, Y offset 1" error. Possible XML issues

texts:
I am working with a few WMS layers to try and see which one would work best with an application I'm developing out of QGIS 2.8. I need the CRS to be in EPSG 4326 but, as many of you know, most webmaps are in 3857. So far I have successfully reprojected an OpenStreetMap basemap from 3857 to 4326, but of course, it looks sort of pixelated and stretched, as the tiles are not meant for anything but 3857:

I have found via another post that there are a few WMS maps in native 4326. So, I tried to implement one of them by using the same method as the pixelated layer you see: I imported an XML as a raster layer. My XML looks as follows, but throws error IReadBlock failed at X offset 0, Y offset 1, as well as ERROR 1: GDALWMS: Unable to download block 0, 1:

<GDAL_WMS>
  <Service name="TMS">
  <ServerUrl>http://tilecache.osgeo.org/wms-c/tilecache.py/1.0.0/basic/5/32/23.png</ServerUrl>
  </Service>
  <DataWindow>
    <UpperLeftX>-180</UpperLeftX>
    <UpperLeftY>90</UpperLeftY>
    <LowerRightX>180</LowerRightX>
    <LowerRightY>-90</LowerRightY>
    <TileLevel>17</TileLevel>
    <TileCountX>1</TileCountX>
    <TileCountY>1</TileCountY>
    <YOrigin>top</YOrigin>
  </DataWindow>
  <Projection>EPSG:4326</Projection>
  <BlockSizeX>256</BlockSizeX>
  <BlockSizeY>256</BlockSizeY>
  <BandsCount>3</BandsCount>
  <Cache />
</GDAL_WMS>

My XML for the OpenStreetMap layer that does show is hardly different:

<GDAL_WMS>
  <Service name="TMS">
  <ServerUrl>http://tile.openstreetmap.org/${z}/${x}/${y}.png</ServerUrl>
  </Service>
  <DataWindow>
    <UpperLeftX>-20037508.3427892</UpperLeftX>
    <UpperLeftY>20037508.3427892</UpperLeftY>
    <LowerRightX>20037508.3427892</LowerRightX>
    <LowerRightY>-20037508.3427892</LowerRightY>
    <TileLevel>17</TileLevel>
    <TileCountX>1</TileCountX>
    <TileCountY>1</TileCountY>
    <YOrigin>top</YOrigin>
  </DataWindow>
  <Projection>EPSG:3857</Projection>
  <BlockSizeX>256</BlockSizeX>
  <BlockSizeY>256</BlockSizeY>
  <BandsCount>3</BandsCount>
  <Cache />
</GDAL_WMS>

Should I be changing something else in my broken XML? Or is there an overall better way to do what I'm trying to accomplish? All I'd like is an EPSG 4326 open-source streetmap in proper resolution, but all my attempts at getting this are just slightly off point.

I am developing a standalone application out of QGIS 2.8, coding in Python (PyQt4) and running on Ubuntu 14.04.


texts: Combining adjacent shapefiles and merging neighbor polygons currently divided by quad boundaries

texts:
The project I'm working on has been mapping ecological sites in ArcGIS on a quad-by-quad basis for the past 10 years.  When entered into GIS, each quad has its own shapefile and the sites are cut off at the quad boundary and start up again on the next quad shapefile.

As you can imagine, after 30 different quads have been mapped, it is a pain to view the project as a whole because all 30 shapefiles have to be added to the map individually.

Currently, I am working on combining all of the data into one shapefile. It's easy enough to copy all of the quads into one file, but now there are still quad boundaries on the map dividing what should be single polygons that are just on different quads.  Unfortunately, there are no unique values in the table to dissolve on.

How can I dissolve the boundaries between the adjacent shapefiles?


texts:
I would like to get only one feature from a MySQL database.

What am I currently doing?
I use the Add Vector Layer functionality in QGis to get the features (polygons) from the MySQL database. They are all displaying fine, but my problem is that I would like to get only one feature/polygon from the database, filtering by a MySQL query by example (it would be perfect).

Is there a way to do so ?

Thank you !


texts: Problem with sync of offline database editing in QGIS?

texts:
I'm using offline database editing and I have managed to to save the data that I want and edit as an SQLite file, but how do I enable to sync option?

It doesn't seem to work in both the offline and online versions.


texts: I would like to use open street map to show data from wkb file(wkb + some extended attributes). I have found out that wkb file is possible to read/query using spatialite. But i dont know how to combine spartilite with map library to show data as another layer. Is any existing android library MapForge, Mapbox, osmdroid, ... suitable for this? What steps should be performed?


texts: Adding several layers to table of contents in ArcMap using ArcPy

texts:
I am already able to add individual layers to ArcMap table of contents using the following codes:

# Adding the layer to the table of contents
mxd = arcpy.mapping.MapDocument("current")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
path = os.path.abspath(LayerName)
addLayer = arcpy.mapping.Layer(path)
arcpy.mapping.AddLayer(df, addLayer)
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
del mxd, addLayer

However I can't figure out how I can load multiple layers at the same time. For example the following codes don't work and only only of the layers gets added:

# Adding mulitple Layers to the table of contents
mxd = arcpy.mapping.MapDocument("current")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
path = os.path.abspath(FirstLayer)
path2 = os.path.abspath(SecondLayer)
path3 = os.path.abspath(ThirdLayer)
.
.
.
addLayer = arcpy.mapping.Layer(path)
addLayer = arcpy.mapping.Layer(path2)
addLayer = arcpy.mapping.Layer(path3)
.
.
.
arcpy.mapping.AddLayer(df, addLayer)
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
del mxd, addLayer