texts:
Is it possible to make a click event occur at a particular lat/lon on a leaflet map?

I would like to make a popup appear that is associated with a point at a particular location.

I have tried several combinations of map.fireEvent('click', latLon) and map.fire('click', latLon) but I can't find an examples or references describing this approach. Is this some thing that can be done?

One approach that I have tried (and which works) is to identify the object in the leaflet layer and to trigger a click event using layer[id].fireEvent('click'). However, this requires that I know the object ID and I would like to be able to just use a lat/lon to trigger this click.

I'd like to open a popup at the clicked location and I don't want to add a marker or add a new popup at this location. What I am trying to do is to fire a click event at a particular lat/lon where a point already exists and to trigger the popup that already exists.


texts:
Is there a way to do a random value calculation within a range in QGIS?  I have been able to do this within ArcMap Field Calculator with the following code:

Dim max, min
max=20
min=5
x=(Int((max-min+1)*Rnd+min))

__esri_field_calculator_splitter__
x

Thanks


texts:
I'm using plotrix in R to plot a state level map of the US. It has an excellent function floating.pie to put pie charts on each state.

I'm wondering if there are similar functions within the plotrix package to display bar charts in each state? (I took a look at the documentation and the functions that deal with bar charts don't seem to have this possibility, but I just wanted to be sure.) I prefer to work within the plotrix package if possible, but feel free to name other packages.

As an example, I would be interested in producing a map similar to this (but for the US):

For my US map, there would be 50 bar charts, one for each state.

I got this map from https://stackoverflow.com/questions/20465070/barplots-on-a-map, but it seems that ggsubplot doesn't work on my version of R (similar to what others have been saying on the post).


texts: Extract GPS track from TomTom Bandit videos

texts:
I would like to extract GPS tracks with a commandline-tool from videos recorded with a TomTom Bandit action cam .
There is the proprietary software of TomTom to extract the tracks but I need something that I can use from the commandline to use it inside a script.

I asked a question on TomTom discussions but seem no one has an idea yet:

https://discussions.tomtom.com/en/discussion/1040314/extract-gps-tracks-from-tomtom-bandit-videos-by-command-line#latest


texts: ModelBuilder not adding output feature class to Table of Contents?

texts:
I'm trying to create a tool in ModelBuilder that will take a new point from a user, create a feature class for this point and display it on a map.

What I've done is:

I've created a feature class for a point-like feature in ArcCatalog.
I've prepared a really simple model in ModelBuilder, that starts with a feature set variable (which takes the feature class as a schema and symbology file). The variable is marked as a parameter.
Next I'm using the Copy Features tool that takes the variable as input and saves it as a feature class in my scratch workspace.
The output feature class is marked as a parameter with the 'add to display' option.

After the module is run I get a shapefile in my scratch workspace. I can add it manually to TOC and it contains the selected point. However no matter what I do, I can't display it in TOC automatically after the model completes.

There is a known issue described in several places that doesn't allow to display newly created layers in TOC when model finishes with the 'add to display' option. However there's a quick workaround, which is to mark the output layer as parameter. In my case it doesn't work.

I'm using ArcGIS for Desktop 10.1 on Windows 7 x86_64.


texts: ArcGIS Select By Attribute with join returning extra, incorrect features?

texts:
I am attempting to run a simple Select by Attribute on a large File Geodatabase feature class (1,751,339 polygons) in ArcMap 10.6, but the query returns extra, incorrect records along with the features that have the attribute value I'm interested in. For example, when I search for soils in the Mollisol taxonomic order with component.taxorder='Mollisols' the query selects those features along with other, incorrect features that correspond to different soil types (e.g., Alfisols).

These are the NRCS SSURGO soil data, and the attribute in question was joined to the map unit polygons from the "component" table in the geodatabase. I have tried rebuilding the joined table from the original source data, but get the same results. Per DanC's suggestion, I also tried similar queries such as component.taxorder IN ('Mollisols') and component.taxorder LIKE 'Mollisols%', but those return the same errant search result.

Apparently some users experienced a similar problem when querying long integers in ArcMap 10.0, but that bug has supposedly been resolved. I can't find any reference to this problem in ArcMap 10.6.

If anyone else has experienced this, have you found any fixes or workarounds?


texts: How to make a shake animation adding feature on openlayers 3

texts:
Have you an idea of animate function to shake a feature when it's added to the map ?

I've found only this animation from openlayers 3 samples:
Animate feature example openlayers 3


texts: Maperitive won't open on my Mac: Unhandled Exception: System.TypeInitializationException

texts:
Is there anyone who can tell me what's going on here?  When I enter "mono Maperitive.exe" in the Terminal, I get this:

Unhandled Exception:
System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /Library/Frameworks/Mono.framework/Versions/3.12.1/lib/libgdiplus.dylib
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x00000] in :0
  --- End of inner exception stack trace ---
  at System.Drawing.KnownColors..cctor () [0x00000] in :0
  --- End of inner exception stack trace ---
  at System.Drawing.SystemColors.get_ControlLightLight () [0x00000] in :0
  at Deska.Theming.Theme..ctor () [0x00000] in :0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in :0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.KnownColors ---> System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus ---> System.DllNotFoundException: /Library/Frameworks/Mono.framework/Versions/3.12.1/lib/libgdiplus.dylib
  at (wrapper managed-to-native) System.Drawing.GDIPlus:GdiplusStartup (ulong&,System.Drawing.GdiplusStartupInput&,System.Drawing.GdiplusStartupOutput&)
  at System.Drawing.GDIPlus..cctor () [0x00000] in :0
  --- End of inner exception stack trace ---
  at System.Drawing.KnownColors..cctor () [0x00000] in :0
  --- End of inner exception stack trace ---
  at System.Drawing.SystemColors.get_ControlLightLight () [0x00000] in :0
  at Deska.Theming.Theme..ctor () [0x00000] in :0
  at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00000] in :0


texts:
I'm using Leaflet Marker Cluster and I need to show five different lines in a popup. But when I write this, they are all in the same line. Can someone help me to be one under another?

var a = addressPoints[i];
            var title = a[2];
            var univ = a[3];
            var direct = a[4];
            var city = a[5];
            var state = a[6];
            var marker = new L.Marker(new L.LatLng(a[0], a[1]), { title: title } );
            marker.bindPopup("Student: " + title + "University: " + univ + "Direction: " + direct + "City: " + city + "State: " + state);
            markers.addLayer(marker);
        }

    map.addLayer(markers);


texts: Sentinel-2A: Begin of operational period?

texts:
This also might be of interest here, as it is an important data source:

When does Sentinel-2A finally become operational and deliver images regularly?

I tried to find information on that, but somehow I did not find any date mentioned. Is it still unclear?


texts: How to get the geometries based on column values in postgis?

texts:
I have the following table in postgis

I want to group the species along with geometries based on column values of 'val' i.e

11,11,11,11,11,11,11-corresponding species
          6,6-corresponding species
          12,12-corresponding species

How to do this in postgis?


texts: Updating cells in Excel using FME SQLExecutor

texts:
In version 2013 FME reads and writes Excel worksheets with XLS_ADO. I have several working 2013-workbenches, which update individual cells in Excel worksheets using this SQLExecutor and this format specification. Since version 2014 XLS_ADO is denoted as deprecated, and substituted with XLSXR/XLSXW2.

I can use the new formats with my FME 2014 SP3/32bit instance on a Windows 7/64bit machine (MS Office 2013/64bit installed) for reading and writing. But in SQLExecutor the format is not available any more ("The specified format is not supported by this FME license" and not in the list of available formats). I am using FME ESRI Edition and it should be no license issue.

How to solve this problem? Is it a 32/64bit problem?


texts:
Since today, I cannot open the QuickOSM plugin in QGIS 3.4.

I tried to delete and reinstall - to no avail.

The XYZ OSM tile is still working as usual.

When I click on the magnifier -QuickOSM button, it starts to load but never finishes.....

Any ideas?


texts: How to create a bounding box around a point using postgis

texts: How to create a bounding box around a geom (POINT) and find all the intersecting geoms(POINTS) within that bounding box?


texts: Getting geodetic area from rgeos::gArea?

texts:
I need to get an area of different polygons at continental scale (like third of Africa etc.). Usual functions like rgeos::gArea work only in the projection units.

Is there any function which works correctly in real square meters on the geoid surface? I.e. real, geodetic area?
If not, what projection should I use to get the least distortion?

I need to measure 6 really huge areas (like third of Africa), so UTM or national projections are out of question.

Can I use a single one projection that has minimal distortion area-wise across the whole Africa?

Right now I am thinking of Mercator projection used by google maps (EPSG:3857), but I am not really sure.


texts: Subtracting rasters with different dimension, origin and extent in R

texts:
I have a large DEM raster from which I want to substract lots of smaller glacier rasters. Examples for the glacier rasters and a subset of the large DEM can be found here: https://drive.google.com/open?id=1ERFdsqDGLH1a_FbxwawE_gPm0Au0Q9vT

The smaller ones partially overlap, but only with their NA parts, so it should be possible to substract the glaciers from the DEM. When I just try substracting, I get the following:

filelocations <- list.files(pattern="*.tif", full.names=T) # many small rasters
HMA_DEM <- raster("/data/...") # one large raster

for (i in 1:length(filelocations)) {
   r = raster(filelocations[i])
   HMA_DEM <<- HMA_DEM - r
}

Error in setValues(r, values = methods::callGeneric(getValues(e1), getValues(e2))) :
  length(values) is not equal to ncell(x), or to 1
In addition: Warning messages:
1: In HMA_DEM - r :
  Raster objects have different extents. Result for their intersection is returned
2: In getValues(e1) - getValues(e2) :
  longer object length is not a multiple of shorter object length

(Side note: I want to set HMA_DEM as global variable so that the next iteration takes the result of the previous one. Sure there are more elegant ways to do this?)

I am not sure how to address the error. The CRS is the same for all the rasters, extent and dimension differ, naturally.
My approach would be to fill every one of the smaller rasters with NAs until the extents are equal to the large HMA_DEM? How could I do that?
If there are other suggestions, I am open for them.


texts: Independently zoom data view without zooming layout view

texts:
This is probably a really noob question.

How do I zoom in on the data view without it modifying my beautifully positioned layout view? I just want to be able to work with my data zoomed in, but still have the positioning maintained in layout view so I can quickly export again after changes.

I'm sorry if this has been answered before but I couldn't find it in a search.


texts: What do you call a map that shows the closest distance to a set of points?

texts:
This is one of those hard problems to Google since I don't know the right words to Google! I have a list of 6,000 retail locations in the US, and I want to know, for any given point, how far away one is from one of them.

I assumed this was a "proximity map," but that seems to mean a few different things. I THINK what I want is something like this McDonald's map from Reddit, but with an infinity decaying radius so that, even in large states where there are no locations, one gets a sense for the distance.

It seems to me there are two strategies:

Take the 6,000 points and run a sort of nearest neighbor algo that shows the radius expand from the nearest location, across the whole country.
Take a map of the country divided into the smallest possible intervals -- Census tracts or something -- and, for each tract, find the distance to the nearest location. This makes less computational sense, but I'm vague on how the first strategy would work.

In any event, I obviously didn't invent this concept, so if there's a name for it, I'm sure I can find a good QGIS tutorial!


texts: Ensuring SRID on geometry column in PostGIS

texts:
I am using a table that has a geometry type column called "wkt". Its definition in the table looks like this:

create table sometable (
   ...
   wkt geometry not null,
   ...
);

I want to change it to make sure that any geometry inserted will have an SRID of 4326. As a result, I want to do something like this to the "wkt" column:

wkt geometry(POINT, 4326) not null

But, this specifies that the geometry for the column is a POINT and I want the column to take any geometry as specified in the current definition.

How can I ensure that an SRID is applied to the column? Would I have to add a constraint to the "wkt" column such as "enforce_srid_the_geom" (as I gathered from the post How to change the SRID of exisisting data in PostGIS?) OR could I use some other form of the geometry type that I don't know about?


texts: Error importing raster into GRASS plugin in QGIS

texts:
I am trying to import a tiff raster file into GRASS however every time I do this the below error message comes up. I am using a custom CRS so I have tried changing it back to the default CRS but still the same message comes up.

Screenshot of GRASS shell:


texts: I'd like to know how I add a bookmark in Google Earth Engine. I need to add a marker to mark a certain area.


texts: add wkt representation of the geometry as field in qgis

texts:
I have the shapefile of boundaries loaded in qgis. I want to add a field in the file which is WKT representation of the feature.

Update

As Nathan W answered
I used geomToWKT( $geometry ) and got result. The thing is the coordinates are in lon lat format. I found out that that i need them in lat lon format. Is it possible to change the order of coordinates?


texts:
I have a lot of radar images that come with image coordinates (824x648). The projection should be Austria Lambert/ETRS89 (EPSG: 3416).

So to perform the georeferencing I need to convert ROW/COL to LAMBDA/PHI, right? I got 6 parameters that are apparently used for this purpose (v0 thru v5: 8.194 50.437 0 0 1018.18 1018.18), but how am I doing this? As I have around 1000 radar images, this should be done somehow automated, so I guess this is a affine transformation issue, right (e.g. 6-tuple geotransform in GDAL)? How do I figure out what is what for my 6 parameter transformation without having any additional informtion? There are different types of parameter order around apparently.


texts: incomplete netcdf files from OpenNex PlanetOS web

texts:
I've been trying to download netcdf files of the NASA NEX-GDDP downscaled GCMs dataset from http://opennex.planetos.com/ website. Right now I'm trying to download 7 GCMs historical/projected data for the RCP scenarios 4.5 and 8.5 of all Central America.

I've already run the docker from different local and cloud servers (no AWS yet), but it seems that all times the netcdf file I get is incomplete (~ 3.2 gb). I've checked the file by opening it in Panoply and mapping some of the variables but many of them don't show data.

Does anyone know if there is a better way in which I can check the integrity of a netcdf file?

In case someone wants to try, the command to download the data is:

curl -sS http://opennex.planetos.com/p/dZLAD | bash /dev/stdin -a -f nc


texts: Python: Run script when opening an MXD in ArcGIS 10

texts:
This post is related to
Running Python Script when opening MXD?

I would like a python script to run every time a .mxd is opened. However, the link above uses VBA to do it, which ESRI suggests migrating away from....

http://events.esri.com/uc/QandA/index.cfm?fuseaction=answer&conferenceId=2F6DC1A1-1422-2418-883C3868A9004888&questionId=3182

I am looking for way to do it with python.

Thoughts?


texts: Characters change to Chinese in ArcGIS Online

texts:
I am trying to add a shapefile to ArcGIS Online (as zip), but somehow the characters in the attribute table displays as Chinese.

This is what it looks like in ArcMap:

And this is the result in AGOL:

I'm sure there's a setting I'm missing, but which one? How do I get correct character encoding?

The CPG file contains this: ISO 885910, which, according to Wikipedia, corresponds to

  Western Europe with rationalised character set for Nordic languages,
  including complete Icelandic set

While I originally had nordic characters in the attribute table, this version of the shapefile does not.


texts:
I am doing a project where we are attempting to determine how many more buildings would flood if the FEMA flood plain increased by 1',2' and 5'. I have the elev of the flood plain rasters from lidar data, but I am having trouble figuring out how much more area will be inundated by the rises I described earlier. I'm using raster calc and I have a buffer for the flood plain that also has elevation data. Any thoughts?

Flood plain in the county with elevation data (raster)


texts: Break a shapely Linestring at multiple points

texts:
This code below was modified from the one I found here which splits a shapely Linestring into two segments at a point defined along the line. I have also checked other questions but they don't address my query directly. However I will like to extend it to split the line into multiple segments (at multiple points), all my attempts to do that so far has failed. How can it be modified to split the string into any given number of segments or at multiple points say ((4,5),(9,18) and (6,5)).

input:

line = LineString([(1,2),(8,7),(4,5),(2,4),(4,7),(8,5),(9,18),(1,2),(12,7),(4,5),(6,5),(4,9)])
       breakPoint = Point(2,4)

from shapely.geometry import Point,LineString

def make_line_segment(line_string, breakPoint):
    geoLoc = line_string.coords
    j = None
    for i in range(len(geoLoc) - 1):
        if LineString(geoLoc[i:i + 2]).intersects(breakPoint):
           j = i
           break
    assert j is not None
    # Make sure to always include the point in the first group
    if Point(geoLoc[j + 1:j + 2]).equals(breakPoint):
        return geoLoc[:j + 2], geoLoc[j + 1:]
    else:
        return geoLoc[:j + 1], geoLoc[j:]

line1,line2 = make_line_segment(line,breakPoint)
line1 = LineString(line1)
line2 = LineString(line2)
print line1, line2

output: `LINESTRING (1 2, 8 7, 4 5, 2 4) LINESTRING (2 4, 4 7, 8 5, 9 18, 1 2, 12 7, 4 5, 6 5, 4 9)`


texts: Can I use C# 4.0 with the target framework set to .NET 3.5 to develop an extension for ArcMap 9.3? Or does it have to be C# 3.0 or earlier?


texts:
Is there some way to "repair" rendering in ArcScene?

As you can see on the picture some of the polygons are not rendered correctly it's probably because polygons are overlapping each other. In arcmap i was able to set up "symbol levels" so there wasn't problem but i'm not able to set up "symbol levels" in arcscene. Polygons are at the same shapefile.


texts: How to get R to recognize a discrete raster layer

texts:
I am trying to work with discrete data on land use in Australia. I load up the file as follows:

library(raster)

dat<-raster("C:\\Users\\Douglas\\Desktop\\GIS Project\\LandUse\\Land use of Australia 2005-2006 - National Map - ESRI GRID - integer - Geographics\\luav4g9abll07811a02egigeo___\\lu05v4ag\\hdr.adf")

Here is more information about the raster file:

class       : RasterLayer
dimensions  : 3401, 4150, 14114150  (nrow, ncol, ncell)
resolution  : 0.01, 0.01  (x, y)
extent      : 112.505, 154.005, -44.005, -9.995  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=longlat +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +no_defs
data source : C:\Users\Douglas\Desktop\GIS Project\LandUse\Land use of Australia 2005-2006 - National Map - ESRI GRID - integer - Geographics\luav4g9abll07811a02egigeo___\lu05v4ag\hdr.adf
names       : hdr
values      : 1, 2329  (min, max)
attributes  :
         ID COUNT COMMODITIES                 COMMODITIES_DESC IRRIGATION                         IRRIGATION_DESC LU_CODE
 from:    1  3199          -1 Non-agricultural land or no data          0 Dryland agriculture, not ag. or no data     125
 to  : 2329     1          -1 Non-agricultural land or no data          0 Dryland agriculture, not ag. or no data     114
                               LU_DESC                    LU_DESC2                    LU_DESC3 T.CODE
 CONSERVATION AND NATURAL ENVIRONMENTS Managed resource protection Traditional indigenous uses  1.2.5
 CONSERVATION AND NATURAL ENVIRONMENTS         Nature conservation  Natural feature protection  1.1.4

and when I simply plot this map, it seems that R does not see the values as discrete, but rather continuous values.

plot(dat,"T.CODE")

How to get R to recognize the values as discrete and not continuous?


texts: Labels not appearing on any layer in ArcMap?

texts:
Not sure what the issue is, but I'm unable to get labels to display in ArcMap 10. The obvious things are accounted for (as far as I know). Labels are set in Properties, layers are checked to label in the TOC.

I've even restarted to see if that would work.

UPDATE: 3/3/2011

After trying all of the mentioned solutions, I was still unable to get labels to display. It wasn't specific to a single layer, but rather to any layer in the .mxd.

I opened a new document, added the layer I'd been trying to label, and was able to display labels just fine.

What may have caused the initial document to globally make labels not display?


texts: Problem installing PostGIS on Ubuntu Server 13.10

texts:
I've installed PostgreSQL 9.1 and postgis on Ubuntu Server 13.10 as follows:

sudo add-apt-repository-ppa:ubuntugis/ubuntugis-unstable
apt-get update
apt-get install postgresql-9.1-postgis

then I tried creating some special columns allowed by postgis like a geometry column but that doesn't exist. I did some search and found this https://stackoverflow.com/questions/8459361/postgis-install

so I tried:

CREATE EXTENSION postgis;
CREATE EXTENSION postgis_topology;

but I got this error: could not open extension control file "usr/share/postgresql"


texts: How to quickly visualize polyline direction?

texts:
I am wondering if there is a quick method with arcgis desktop to view the edited direction of a large group of polylines?

I'm essentially wondering if anyone knows of a way to achieve the Editor > Construct Parallel view of one line, but instead for groups of lines?

ArcGIS v10.1 ArcInfo License

Apologies if this question has already been asked, agreed it is a bonehead question. All the best!


texts: Uploading data to trimble via pathfinder

texts:
I was sent via email many different file formats: .dd, .gic, .gip, .gis, .giw, .gix, .obs, .obx, .car

I need to upload this to my trimble to go out and complete a survey. How do you create one "waypoint" file from all of these different formats that can be transferred onto the trimble? Or would it be considered a "data file" when sending the data to the trimble in the data transfer process? Is this whole process completed in pathfinder?

I am new to this process.


texts: How to know if your script is executed in a QGis python console or a standard python console?

texts:
Is there any way to detect if a script is computed on QGIS python console or not?

Any attribute or test to assess it?


texts: Mosaicing rasters with GDAL package in Python

texts:
I'm new using python and I'm trying to create a Virtual Raster mosaicing 3 raster images of Landsat in a time series. So I'm trying with gdal.BuildVRT but it doesn't work? I'll show the code:

    from osgeo import gdal
    import os
    import glob

    #SET PATH
    path = 'D:\Imagery\L8 OLI TIRS'
    x = len(files))/3 #IN THE FILE I HAVE 3 TILES FOR EACH DATE
    """
    example with only one date
    NDVI
    """
    #subset route:
    in_subRoute = files[0]+'-'+files[0+x]+'-'+files[0+x*2] #string, every 'files' equals to a directory of a tile.
    subRoute = in_subRoute.split('-') #to list
    Dirmosaic = "D:\Results\mosaic.vrt"
    gdal.BuildVRT(Dirmosaic, subRoute)

but doesn't happen anything

What am I doing wrong?


texts:
I would like to develop a new plugin for QGIS. I'm new to python but good knowledge in other languages. I use "plugin builder" to create the bases of my plugin. Then i would like to add specifics librairies to my plugin (pyppeteer). But the paths are bads (error when loading QGIS).

Is the best practice to have one folder, with all librairies for my plugin ?


texts: Shapefile projections not matching up in QGIS?

texts:
To start off with, I'm very new to QGIS. I'm attempting to place a shapefile with locations for 3 substations on a map of Peniche, Portugal. The locations for the substations are given in latitude and longitude coordinates.

When I start off by importing the substation shapefile, I make sure that both the layer CRS and project CRS are set to EPSG:32629, which gives each substation point the correct coordinates, however the scale is at 1:1, which is not correct. As soon as I then add a raster map of the region or a shapefile of Portugal using the same CRS the position of the substations also becomes incorrect.

I'm sure there's a simple solution I'm not getting, but I've been trying for a while and have had no success. Here's a dropbox link to the files
https://www.dropbox.com/sh/53kcszzry8kekqx/AADsHaKMpkiCzmNWjSPapC1Ma?dl=0


texts: How to convert 4-channel PNG files to grayscale geoTIFFs?

texts:
I suspect that there exists a gdal tool (gdal_translate?) that will convert a 4-channel PNG (+ world file) to a 1-channel (gray-scale) geoTIFF.  From the gdal_translate man page, it appears simple to go in the other direction, i.e. to expand a monochrome raster to a 3 or 4-channel image, but I can't figure out how to go from many channels to one.

If not gdal (hardly conceivable), then another *nix command-line tool?


texts: Selecting Terrain Dataset by elevation in ArcGIS Pro

texts:
I have added the Terrain Dataset to my project in ArcGIS Pro. I would like to select the areas which have an elevation above some threshold.
Eventually, I want to use this selection as a clipping mask for some other raster.
Usually I would create the clipping mask through the "extract by attributes" tool, but I don't see any columns in the Terrain attributes table that look like an elevation number.


texts: Tiled Map Services from Geowebcache in QGIS?

texts:
Can QGIS consume Tile Map Services from GeoWebCache?

I know there is a article on the QGIS website which states that it does support tiled map services but it lists Tile Cache from Meta Carta labs and ArcGIS Tile Map Service. No mention of GeoWebCache, and unfortunately no luck so far in loading layers from GeoWebCache.

Does anyone know if GeoWebCache is an option or not for QGIS?

Thanks


texts: OpenLayers how to show long lat after click to map and make visible until next click to map?

texts:
I found this code for make visible long lat coordinate after moving the mouse over the map. And I rewrite to HTML page with newest OpenLayers version.

I would like to show this long lat coordinates after click to some place in map, not after move mouse on map as in the code.
And make visible last coordinate until someone click to next place, nothing. I don't want the coordinates to disappear right away as in code.

<!doctype html>

    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.3.0/css/ol.css" type="text/css">

    <title>OpenLayers example</title>

My Map


texts: Given a line find whether another line is along side, N,E,S,W or not

texts:
I have a shapefile representing roads (Black) and I need to know whether another line object (Red) is to the side of it. Including the orientation between them, to define whether the Red line lies to the North, East, South, West or if there is no line at all.

It is accurate enough to find whether for each segment it is on within the 90 degree range as the lines sometimes curve so the angle and orientation will change.

You can see in the images that some of the lines are complex, sometimes splitting and merging.

I have attempted adding points along the lines and then drawing lines to the nearest hub to then find the angle of the line but unless I draw a point every meter (not practical) the nearest points are not close enough and the angle doesn't take the shortest path.


texts: Grass r.out.gdal, wrong values when importing to QGis

texts:
I have a problem with export/import functionalities between Grass and QGis.

I create a raster file in Grass (with r.wind.sun, but that most likely does not matter)
It has the following properties:

1:

Important: Range of data min = 0.0[...] max= 100

I export that raster with:

r.out.gdal input=sample_input output=sample_output

The process decides to take float64 as datatype.
And exits without an error.
Beside the fact, that the color table cannot be written as described here.

When I import that file to QGIS, the absolute values have changed:

So the value range changed from approx. 0-100 to 0.00-2.9.

As the mean and stdev state already: It is not an option to use integers only.

I tried to multiply the data with 10,000 in Grass, but after exporting I also get a value range between 0-3 in QGis.

What can I change in the process to keep the original value range?


texts:
What I need to do is to get the bounding box polygon for all airports worldwide.  The only way I'm aware of do this, is by using esy.osm.pbf.  I've written the following code:
def get_airport_points(airport, file_path):
    osm = esy.osm.pbf.File(file_path)
    lat_lons = OrderedDict()
    index = 0
    print("There are " + str(len(airport.refs)) + " nodes to go through.")
    for ref in airport.refs:
        print(str(index))
        index = index + 1
        nodes = [entry for entry in osm if entry.id == ref]
        lonlat = nodes[0].lonlat
        print(lonlat)
        print(type(lonlat[1]))
        print(type(lonlat[0]))
        lat_lons[ref] = ([lonlat[1], lonlat[0]])
    return lat_lons

But it takes much too long to do this, that's just for a single airport, and I need to do it for all airports worldwide.  Is there a better way of fetching the latitudes and longitudes for the polygons for all airports worldwide?


texts: How to calculate sum for unique values in a model?

texts:
I have two layers. A layer represented by a fishnet and a layer represented by certain boat routes. After I intersect them I want to be able to calculate the sum and max value for certain characteristics like dead weight, gross tonnage and beam per each square from the fishnet per each track.
Here is an example of how my table looks like after I intersect the fishnet with the boat tracks:

FID_Sample  FID_FishGr  mmsi    Beam    Gross_Tonn  Deadweight
0   7017    440296000   8   764 394
1   7017    440296000   8   764 394
2   7017    440761000   12  812 588
3   7017    440761000   12  812 588
4   7017    440980000   10  788 391
5   7017    440980000   10  788 391
6   7017    441053000   10  811 455
7   7017    441053000   10  811 455

As you can see in each square(FID_FishGr), there are a certain number of tracks(mmsi) and each track has it's own characteristics of Beam, Gross_Tonn and Deadweight.
Now I have created a model, hoping that I have solved my problem nice and easy, but when I checked the math in excel it weren't the results I expected.

When I use the model posted above, and I want to calculate the SUM for Gross Tonnage in each FID_FishGr it gets me the sum of all boat tracks even if they are duplicate(more lines of the same track in a square).

OBJECTID    FID_FishGr  FREQUENCY   SUM_Gross_
1   7017    8   6350
2   7018    2   1576
3   7019    1   788
4   7183    8   6350
5   7184    8   6350
6   7185    5   3987
7   7186    3   2411
8   7349    8   6350
9   7350    8   6350

Lets take a clear example:
   - in the first table you can see the tracks in one entire square and if you add the gross tonnage for each track you will get 3175 but if I sum it up with summary statistic I get 6350, as you can see in the second table.

What I want to achieve, is to calculate a SUM for each unique square of the fishnet using only unique track boat and not to sum up all of them.

What tool should I use to do this and how?


texts: Formating a query in ArcPy- why the error?

texts:
I have the following Select Layer By Attribute statement throwing a 000358 invalid expression error using Python with ArcGIS 10.4.  The input feature layer is valid because I can select features using a select by location. When I try to remove some features from the selection the script fails.  There is an attribute in the feature dataset feature class called returned which stores data with a data type short.  Why is this line of code giving an error?

arcpy.SelectLayerByAttribute_management("inFC_lyr2", "REMOVE_FROM_SELECTION", "\"returned\" = 1")

Per the suggestions below I added these lines to the code and got the same error.

inFC2 = r"Z:\Data\Planning\Buildings\Housing.gdb\AdressesStructures\Households"
sql_exp = """{0} = {1}""".format(arcpy.AddFieldDelimiters(inFC2, "returned"), 1)
print sql_exp

Interestingly sql_exp printed
returned = 1 to the screen.  Shouldn't that be "returned" = 1?


texts: Getting survey data into predefined database

texts: I have some simple survey data for water lines that will be used to populate a predefined attribute table. I am a surveyor, not a GIS professional, and we have been asked by a client to deliver our survey data in a specific manner.  I do not know how to bring my data into their database so that it matches their format. I have the ArcGIS add on for Autodesk but I'm finding that is more for working with GIS data in CAD and less for prepping CAD files for GIS. At least I am not getting it.


texts: PyQGIS standalone app with pycharm : exit code -1073741819 (0xC0000005)

texts:
I try to run standalone PyQgis code with PyCharm, but I always have this result :

Process finished with exit code -1073741819 (0xC0000005)

I tried my code line by line, and this result appear after the last :

from PyQt5.QtWidgets import QApplication, QFrame, QGridLayout, QMainWindow
from qgis.gui import QgsMapCanvas
from qgis.core import QgsApplication, QgsProject, QgsVectorLayer

app = QApplication([])
QgsApplication.setPrefixPath("C:/OSGeo4W64/apps/qgis", True)
QgsApplication.initQgis()

I use PyCharm 2018.3.6 (Community Edition), because issues on 2019 version occured.
Qgis 3.6 with OSGeo4W.

My .cmd code :

@echo off
SET OSGEO4W_ROOT=C:\OSGeo4W64

@echo off
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
call "%OSGEO4W_ROOT%"\bin\qt5_env.bat
call "%OSGEO4W_ROOT%"\bin\py3_env.bat

@echo off
path %OSGEO4W_ROOT%\apps\qgis\bin;%PATH%
SET GDAL_FILENAME_IS_UTF8=YES

set VSI_CACHE=TRUE
set VSI_CACHE_SIZE=1000000
set QT_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\qgis\qtplugins;%OSGEO4W_ROOT%\apps\Qt5\plugins

SET PYCHARM="C:\Program Files\JetBrains\PyCharm Community Edition 2018.3.6\bin\pycharm64.exe"

set PYTHONPATH=%OSGEO4W_ROOT%\apps\qgis\python
set PYTHONHOME=%OSGEO4W_ROOT%\apps\Python37
set PYTHONPATH=%OSGEO4W_ROOT%\apps\Python37\Lib\site-packages;%PYTHONPATH%

set QT_QPA_PLATFORM_PLUGIN_PATH=%OSGEO4W_ROOT%\apps\Qt5\plugins\platforms
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT%\apps\qgis

start "PyCharm aware of QGIS" /B %PYCHARM%

Any ideas ?


texts:
I want to plot ships and its direction on the map using R Leaflet.

I tried to represent a ship as a circle and its direction with a line from the center as in the following picture.

The problem is that when zooming out the direction is lost (see picture below) because the circles maintain their size regardless of zoom but the lines do not.

For the circles I am using addCircleMarkers() function. For the lines I am using addPolylines(). addCircleMarkers() maintains its size regardless of zoom level but addPolylines() does not.

Are there any alternatives I could use to represent direction?.
I think about using an icon and rotating it using the addAwesomeMarkers() function. The problem with this approach is that it also adds a marker but I just want the icon.

The ideal solution would be to have a line (or arrow) with size not dependent on zoom level or to be able to use an icon and rotate it.

Here is a related question for rotating an icon but seems hacky and not sure if it can be extended to more icons (the example uses 1) with different angles each.


texts:
I have classified Landsat images into five classes - A variety of Palm, Water bodies, built-up/open area, other vegetation and miscellaneous. I used GRASS GIS for the process and the final classified maps use inappropriate colors. Now as I have to assign appropriate colors to these classes I was thinking about existence of internationally accepted standards for such purposes.

As palm which covers only 10% of total area is the class of my interest(shown in yellow in the following screenshot) I want it to be clearly distinguishable in my A4 size paper output. In the most unlikely event of absence of standards proper color suggestions are greatly welcome.


texts: Selected webmap does not contain any layers that can be used as data sources for ArcGIS Operations Dashboard?

texts:
I'm new to ESRI ArcGIS applications and at the moment I'm trying to learn the operations dashboard. I looked at their tutorial and it is fairly easy as they've provided data.

Now, I'm trying to use my own data. What I did was create a web map, I then pull and load my CSV files to create the layers. Everything looks nice and I saved the web map.

When I try to open it in the operations dashboard I get the selected webmap does not contain any layers that can be used as data sources at the data source tab.

What am I doing wrong?

Can someone guide me because I can't use the other widgets if I can't view the data sources.


texts: QGIS print composer won't export map with base layer

texts:
I have a map that when I try and export it from the print composer to a jpeg, I get the map but the base layer has tiles with "map data not yet available". If I print from composer, it prints correctly.

Any ideas? I'm stumped! I'm using the USGS scanned topos as the base layer and have had this work fine in the past, so I assume it is a setting somewhere I have changed.

QGIS 2.4


texts: Part of text missing in legend and text boxes

texts:
I have had issues lately when exporting to pdf from ArcMap 10.2. Parts of the text sometimes fall off and goes missing. Mostly it's been some lines in legends, but now also text boxes. The text is also missing in legends displayed in Arcmap, but not always.

This is not how the text in the textbox supposed to look, obviously.

This screenshot shows a legend, but some of the descriptions are missing.

In Arcmap the legend sometimes looks like this:

When it's supposed to look like this:

It happens that this gets solved when exporting a second (or third) time. Which is good, of course, but does not help me in trying to figure out why it's happening in the first place.

Has anyone else encountered this problem? Is there a solution? This is really starting to get on my nerves, and not even creating a new legend helps every time (which is very tideous in the first place).


texts: SLD vendor option "follow line" not working

texts:
I am creating an SLD in QGIS to be used in GeoServer.
I set up the style with color, thickness, etc in QGIS and then saved it out to an SLD.
QGIS doesn't preserve the label rules so I borrowed some from the SLD cookbook.
Everything except the following seems to be working:

<StyledLayerDescriptor version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd">
    <NamedLayer>
        <Name>Optimized and styled label</Name>
        <UserStyle>
            <Title>SLD Cook Book: Optimized and styled label</Title>
            <FeatureTypeStyle>
                <Rule>
                    <se:LineSymbolizer>
                        <se:Stroke>
                            <se:SvgParameter name="stroke">white</se:SvgParameter>
                            <se:SvgParameter name="stroke-width">3</se:SvgParameter>
                            <se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
                            <se:SvgParameter name="stroke-linecap">square</se:SvgParameter>
                        </se:Stroke>
                    </se:LineSymbolizer>
                    <TextSymbolizer>
                        <Label>
                            <ogc:PropertyName>ST_NAME</ogc:PropertyName>
                            <Font>
                                <CssParameter name="font-family">Arial</CssParameter>
                                <CssParameter name="font-size">6</CssParameter>
                                <CssParameter name="font-style">normal</CssParameter>
                                <CssParameter name="font-weight">bold</CssParameter>
                            </Font>
                            <LabelPlacement>
                                 <LinePlacement>
                                    0
                                 </LinePlacement>
                            </LabelPlacement>
                            <Fill>
                                <CssParameter name="fill">#383534</CssParameter>
                            </Fill>
                            <VendorOption name="followLine">true</VendorOption>
                            <VendorOption name="maxAngleDelta">30</VendorOption>
                            <VendorOption name="maxDisplacement">50</VendorOption>
                            <VendorOption name="group">yes</VendorOption>
                            <VendorOption name="spaceAround">30</VendorOption>
                            <VendorOption name="goodnessOfFit">.05</VendorOption>
                        </Label>
                    </TextSymbolizer>
                </Rule>
            </FeatureTypeStyle>
        </UserStyle>
    </NamedLayer>
</StyledLayerDescriptor>`

This comes out like so:

But I want it to look like this:

Are the vendor options not configured correctly?

I checked out GeoServer's site on curved lines and everything seems to be in order.


texts: Why does "Add Database Server" in Catalog 10 allow only ArcSDE Personal or Workgroup databases?

texts:
Arc Catalog 10 - ArcInfo - Database Severs - Add Database Server:
"Add an ArcSDE Personal or Workgroup database server by typing in the SQL Server Express instance you wish to connect to."

I want to connect to an MS SQL Server 2008 R2 Developer (like Enterprise) server on another machine, but it sounds like I cannot do that from here.  If I try it anyway I get the message, "Connections to this edition of the database server are not supported."

My keycodes file for licensing has "svrenterprise" in it, so I don't know why I cannot connect to this database server.  I want to make a direct connection to the database server, through the open port 1433, not 5151 SDE port.


texts: Restricting U-turns using ArcMap and Network Analyst

texts:
I am using ArcMap 10.7. I would like to calculated routing for my input data. I created a turn features (https://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/creating-a-turn-feature.htm) and also turn feature that represents a U-turn (https://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/creating-a-turn-feature-representing-u-turns.htm).
I created Network Dataset and made turn restriction attribute (Name: turn, usage: restriction, units: unknown, dataType: Boolean. In the Evaluators I used: Source: turn, element: turn, Type: constant, value: use restriction).
My network recognizes and uses all forbidden turns, except U - turns.  If I use the Network Identify, I can see that my network does not recognize the object which I drew as Utrun as forbidden (it says "Traversable" instead of "Prohibited").
Does anyone know why?
And also, in the properties of Network Dataset under travel mode I set: U-Turns at Junctions: Not Allowed.


texts:
I see from the WGS Wikipedia article:

  Currently, WGS 84 uses the EGM96 (Earth Gravitational Model 1996) geoid, revised in 2004.

I see there is an older EGM84 geoid but I couldn't find anything that states the WGS 72 standard uses it.

What geoid does WGS 72 use?


texts: gdal_translate producing tif with different colors as original


texts: Extracting shapefile attributes from raster colors using PyQGIS?

texts:
I have two layers:

a shapefile with states and counties (shp)
a raster file (with colors and some text and borders, but not a perfect map) (tiff)

I want to use the colors in the raster file to associate values to one of the attributes of the shapefile.  I've started to do so manually with qgis.  I overlayed the shapefile and the raster, and I read the color and fill in the value in the attribute editor:

I was wondering if this can be done programmatically.  The pseudocode would be something like:

for county in polygons_in_shapefile:
    center_of_polygon = county.center()
    color = raster_color(center_of_polygon.x, center_of_polygon.y)
    if color == blue:
       county.value = 1
    if color == red:
       county.value = 2
    ... etc ...

I am totally new when it comes to GIS, so maybe it's very obvious (and the code may be totally the wrong strategy).


texts: Leaflet extension: "this.callInitHooks is not a function"

texts:
I am trying to develop a leaflet function but I am getting this error which I am having trouble understanding. This is my plugin code thus far:

L.Spotlight = L.Class.extend({

    options: {
        width: 1,
        height: 1
    },

    initialize: function(name, options) {
        this.name = name;
        L.setOptions(this, options);
    }

});

And this is the code that calls it:

var mySpotlight = L.Spotlight("aaa", {
    width: 1,
    height: 1
});

I get this error when trying to initialize mySpotlight:

this.callInitHooks is not a function

I'm having a hard time understanding this because it seems like other plugin source code that I look at behaves the same way, for example, this one:

L.Ellipse = L.Path.extend({

    options: {
        fill: true,
        startAngle: 0,
        endAngle: 359.9
    },

    initialize: function (latlng, radii, tilt, options) {

        L.setOptions(this, options);
        this._latlng = L.latLng(latlng);

        if (tilt) {
            this._tiltDeg = tilt;
        } else {
            this._tiltDeg = 0;
        }

        if (radii) {
            this._mRadiusX = radii[0];
            this._mRadiusY = radii[1];
        }
    },

    ...

});


texts: I have a spline, but it turned out to be angular at the ends, is there a tool or how can I smooth the raster in ArcGIS?


texts: Is there a way to (helpfully) give feedback on QGIS Training Manual?

texts:
I'm just working my way through some of the current QGIS Training Manual:
  http://docs.qgis.org/2.6/en/docs/training_manual/

As I work through it I am coming across occasional things which are out-of-date with the current version or are clearly errors. Is there a place and a way to send feedback (that is in a useful form)? I'm not looking to take on the rather involved task of "contributing to this manual" as outlined in section 19 (Appendix) and don't really want to join a high-traffic documentation developer email list, but hoped that a bit of user feedback might be helpful.

As examples of the sort of feedback I have..

The official exercise data download already has many of the exercises completed, so it is difficult to do the exercise as written:
http://docs.qgis.org/2.6/en/docs/training_manual/foreword/preparing_data.html
In section 6.3.1 (Using QGIS’ Form Design Functionality), the "Open Feature Form" checkbox has moved to the "identify results" window after version 2.2. (The workflow suggested for this new implementation is discussed here: http://osgeo-org.1560.x6.nabble.com/Identify-results-form-vs-feature-form-td5158186.html )


texts: postgresql how not to show the first result returned st_distance

texts:
I have a query that calculates the distance away from a given point, however currently my query returns the point I am actually querying a distance for. How would I prevent site 1 from showing in my results?

Site 1 = 0.00km
site 2 = 0.15km
site 3 = 3.5km

st_distance(the_geom, st_geomfromtext($geomdistanceaway,27700))::numeric(10,2) AS distanceaway from distancetbl ORDER BY distanceaway asc limit 3


texts: Getting attribute information from layer in OpenLayers

texts:
I just want to add a layer that represents a city with its city districts. When the user clicks on a district, the site fires an alert presenting the population number. It looks like that:

However, it doesn't work. I also upload a picture of my javascript code:

Obviously, I missed something, but I don't find the problem. Can someone help me?
Here is also the GeoJSON file if it's useful.


texts: Calculate transform from oblique raster, shape and CRS

texts:
Given a simple jpg of an oblique aerial photography, the geometry and a CRS I am trying to determine its affine transform so I can convert it into a GeoTIFF.

import rasterio, rasterio.crs

raster = rasterio.open('oblique.jpg') as src:
raster.crs = rasterio.crs.CRS({'init': 'epsg:25832'})
geom = {
    'geometry': {
        'type': 'Polygon',
        'coordinates': [[(723104.0, 6181270.0), (723113.0, 6180450.0), (721842.0, 6180440.0), (721833.0, 6181250.0), (723104.0, 6181270.0)]]
    }
}

I am unsure how to proceed for here I think that this is wrong but including it so you may see the attempt

import rasterio.transform, shapely.geometry

left, bottom, right, top = shapely.geometry.shape(geom['geometry']).bounds
transform = rasterio.transform.from_bounds(left, bottom, right, top, raster.width, raster.height)

I notice that there are zeros so this transform is not accounting for the oblique angle.

>>> transform
Affine(0.09502598366740905, 0.0, 721833.0,
       0.0, -0.09573241061130335, 6181270.0)

What am I doing wrong? Besides the raster, geom, crs I also have following fields given but unsure what they code for: easting, northing, height, omega, phi, kappa, direction, estacc, height_eli, references, level, comment_co, comment_gs, gsd, hist_low, hist_high, drive, SunAngle


texts: What permissions needed to add an index with a protected version?

texts:
Using arcpy and ArcGIS 10.1 SP1 (Build 3143) against an Oracle 11g enterprise geodatabase, I am trying to add an index to an existing attribute in an existing feature class:

arcpy.AddIndex_management(feature_class,attribute_name,idx_name)

Running as the table owner:

  arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
  Operation only allowed by the owner of the version [SDE.DEFAULT]
  Failed to execute (AddIndex).

The default version is Protected.

Running as SDE:

  arcgisscripting.ExecuteError: ERROR 999999: Error executing function.
  Insufficient permissions Failed to execute (AddIndex).

As the feature class is owned by a different user than the version owner, what permissions are needed to add an index?

In ArcCatalog, the table owner can happily add an index.

As a workaround, is it possible to change the access of the default version via ArcPy?


texts:
I am trying to convert a .yaml style file to QGIS style file.

The yaml file has a sprite sheet for displaying icons. I did a little search on the Internet but couldn't find anything useful. Below image shows the sprite sheet

One way is to convert sprite sheet to separate icons but i don't want to do that. Is there a way to use sprite sheet as it is in QGIS?


texts: Is there a way to configure ArcMap to persist the HTML popup window size?

texts:
I'm specifically asking for when the "Display HTML formatting" is configured as "As a table of the visible fields.", but I think all options behave the same way.

My users click the HTML Popup tool, click the feature on the map to display the HTML popup window, and resize the window until the get the desired size.  If they close that window, and repeat the steps...the windows reverts back to the original size and they must resize each time.  They feel, and I agree with them, that the window should open up to be the same size as when it was closed.  Is this an ArcMap configuration?  Or is there a registry value?  Is there a way to affect window size if you format using an XSL template?


texts: ArcCatalog open sde geodb fails: "possibly sdehome/temp is full"

texts:
I'm trying to open a connection to an sde geodatabase with ArcCatalog 10.4.1 that was previously working. But now I get the error:

"possibly $SDEHOME/temp is full"

and ArcCatalog crashes.

Does anyone have any idea on what the issue could be?


texts: Putting ArcMap animated map into PowerPoint?

texts:
Goal: Put an animated map (by time) into a powerpoint presentation.

I have a map in ArcMap Desktop 10.5 that will animate by time. The points are barred owl observations by year in California.
I have the map and it will animate over time in ArcMap. I want to put this into a PowerPoint presentation.
What is the best way to accomplish this?

I can connect my PowerPoint to my ArcGIS Online account, but my map is in ArcMap not my Online account. I am not familiar with ArcGIS Online.


texts:
Been stuck on this one a while. Let me know if you can help.

In the application I am building, I am importing two GeoServer WFS vector layers and trying to set a different style to each of them. Here is what I have right now:

//Adding vector layer for show centers
var NVbuildings = new ol.layer.Vector({
    source: buildingSource,
    style: new ol.style.Style({
        image: new ol.style.Circle({
            radius: 5,
            fill: new ol.style.Fill({color: '#FFFFFF'}),
            stroke: new ol.style.Stroke({
                color: '#000000',
                width: 3
            })
        })
    })
});

//Adding vector layer for show centers
var centerlocations = new ol.layer.Vector({
    source: vectorSource,
    style: new ol.style.Style({
        image: new ol.style.RegularShape({
            points: 5,
            radius1: 10,
            radius2: 4,
            angle: 0,
            fill: new ol.style.Fill({color: '#000000'}),
            stroke: new ol.style.Stroke({
                color: '#000000',
                width: 3
            })
        })
    })
});

Currently, the application shows all points from both vectors, but they are both of the same style (the NVbuildings style). I've tried moving things around and changing the RegularShape to Circle, but all points always have the same style. Any suggestions?


texts: How to classify hyper spectral image using the spectral library and Spectral angle mapper classifier?

texts:
I am trying to classify the hyperspectral image using the spectral angle mapper classifier.for that i did like below.

from spectral import *
import gdal
d=ev.load_ENVI_spec_lib("D:\data\speclib.hdr")
img=gdal.Open("E:\data\subset74559_1maize")
img1=envi.open("E:\data\subset74559_1maize.hdr")
band1= img1.bands.centers
band1=np.array(band1)
band1=np.floor(band1)
b1=band1[0:194]
b2=band1[212:280]
b3=band1[316:425]
band1=np.hstack((b1,b2,b3))
M=img.ReadAsArray()
n1=d[1]
n2=d[0]
nt=np.transpose(n2)
wl=n1['wavelength']
wl=np.float64(wl)
wel=[i for i,item in enumerate(wl) if item in band1]
n2=nt[wel]
n2=np.transpose(n2)
M1=M[0:194,:,:]
M2=M[212:280,:,:]
M3=M[316:425,:,:]
M=np.vstack((M1,M2,M3))
M=np.moveaxis(M,0,2)
#spectral_angle is imported from spectral package.
**cla=spectral_angles(M,n2)
clmap=np.argmin(cla,2)
classes=(clmap+1)
v=spy.imshow(classes=(clmap+1))**

But it gives misclassified image means it classified entire image in given end member spectra even if it the end member spectra is not present.Means it does not show unclassified parts.Also i don't know how to set threshold.


texts: Fixed distance buffer missing in QGIS 3.0

texts:
I know its early adopter version, but anyone know why my regular buffer tool is missing?
Possibly others too.

Ps: I have already tried the other missing feature fix of deleting .qgis2 folder


texts:
I am planning to run ArcGIS Pro on my Mac through Parallels Desktop 16 Pro. I have run the System Requirements Lab test for ArcGIS Pro and received the following "Failure" results. I am wondering whether anyone has any experience with configuring Parallels to run ArcGIS Pro or how I may address the video card and Visual Runtime issues identified as problematic.
Video Card: You have Parallels Display Adapter, Minimum Required: 24-bit capable graphics accelerator with 64 MB of video memory, OpenGL version 2.0 runtime
Visual C Runtime Version: You Have [nothing], Minimum: Microsoft Visual C Runtime version 14.12.25810 or better


texts: ArcGIS Desktop, Attribute Table with drop down menus

texts:
Essentially, I have a dataset with drop down menus in one column, but I can't edit it or add new text.

I have managed to delete the original text classification in the field, but can't add 'Camel Race Track' to the DropDownMenu.


texts: Cluster networkx graph with sklearn produces unexpected results

texts:
I have an interconnected weighted graph. The graph is a representation of a Multilinestring connecting points. See the visualisation in QGIS:

So from each point I know how much it costs to go to every other point. This information I compute from a Shapefile called "CostShape" to a graph in networkx. I use then this command to produce a numpy array:

    matrix = nx.to_numpy_matrix(graph)

The result looks as follows:

[[0.00000000e+00 2.36988656e+01 1.67140574e+04 ... 5.42805416e+02
5.66551990e+02 2.80353597e+04]
[2.36988656e+01 0.00000000e+00 1.66903585e+04 ... 5.66504281e+02
5.90250855e+02 2.80590586e+04]
[1.67140574e+04 1.66903585e+04 0.00000000e+00 ... 1.72568628e+04
1.72806093e+04 4.47494171e+04]
...
[5.42805416e+02 5.66504281e+02 1.72568628e+04 ... 0.00000000e+00
2.37465741e+01 2.74925543e+04]
[5.66551990e+02 5.90250855e+02 1.72806093e+04 ... 2.37465741e+01
0.00000000e+00 2.74688077e+04]
[2.80353597e+04 2.80590586e+04 4.47494171e+04 ... 2.74925543e+04
2.74688077e+04 0.00000000e+00]]

What already is annoying that I am loosing the names of the node in the graph, but I assume that the order stays the same. I proceed then with the clustering of this Numpy matrix and feed the labels back into the "GraphShape":

labeler = KMeans()
labeler.fit(matrix)
for (row, label) in enumerate(labeler.labels_):
    GraphShape.at[row, 'costcluster'] = label
GraphShape.to_file('graphShape.geojson', driver='GeoJSON')

The result is the image below this text block and it is everything else but clusters. I tried many different cluster methods and none of them produce the things that I expect.

What am I doing wrong?


texts: QGIS 2.12 map composer issue with vectors

texts:
I am making a map that includes all kinds of vector layers; the map looks perfect in QGIS 2.12 Lyon as well as in map composer.
None of the layers have scale-dependent visibility.

I have the following issues when exporting as image (regardless the output format):

A4 format:
If I set the resolution to 200 dpi I get an image with all the layers displayed.
If I set the resolution to 250 dpi I don't get some vector layers in the output image (such as 25 meters contour lines and some land coverage).
When I save with 300 dpi resolution I only get a basic map excluding polygons and all the contour lines.

A3 format and more: similar to the above, but already at 200 dpi I only get few layers printed in the output raster file.

The same project printed in QGIS 2.8 doesn't have the same issues and all the vector layers are exported properly.


texts:
I think this might be a bug, but we've just installed QGIS 2.10 and the WFS seems to be working strangely. When you load a WFS which is not cached the system loads all the visible features as expected. However, when you pan or unzoom the map the system does not load any additional features.

Effectively you only get to see the uncached features that are loaded when you first make the request.

Has anyone else noticed this issue? It seems to be related to a QGIS bug

http://hub.qgis.org/issues/11968

You can replicate the bug with the BGS WFS:

http://ogc.bgs.ac.uk/cgi-bin/BGS_Bedrock_and_Superficial_Geology/wms?


texts: How to select layer attribute by attribute and make new layers out of them?

texts:
I'm not very experienced with ArcGIS, especially not with coding. Here's what I'm trying to do:

I have a .gdb of birds. The file is huge and, everytime I try to do anything, ArcMap either crashes or fails the operation. Therefore, I'd like to make individual layers based on the different bird "orders" (taxonomic groups). In other words, I want to split it into different separate layers based on an attribute.

As an extra, I also want to clip each of those with a shapefile of a country, so that I only have the birds of that country.


texts:
I am using ArcMap 10.5.

I'm trying to lock graphic elements (rectangle in my case) to prevent it from being selected and moved when I'm working in layout mode.

I looked up ESRI help and got this explanation bellow (Image 1), but when I right-click my graphic element in Layout mode I do not see any Lock Mode option (Image 2).

What am I doing wrong?

Image 1

Image 2


texts: Creating spatial database with many categories that have same set of values?

texts:
I am working on creating a spatial database of county agricultural data where each county has multiple crops (30+) and for every crop there are several production metrics (yield, harvested area, economic value, etc) which are the same for all crops. I also have this information over many years, going back to 1980.

What are your thoughts for a spatial database design to allow easy querying of a production metric for a particular crop by county?


texts: WFS layer using isWithinDistance function in SLD?

texts: I want to create a cector layer. After querying the layer, if any two of the features are within 300 meters distance, I want to join those two lines and give buffer around the line and display. Is this possible using Style or any other way? Please advise.


texts:
I would like to make an open file dialog to appear in a field in the attribute table of a vector layer. I guess I need to set widget type to 'Attachment' for that field and to check 'Display button to open file dialog'.

I also guess I should use the QgsEditorWidgetSetup class, but I am not sure how to set the configuration options. I wrote something like:

setup=QgsEditorWidgetSetup('Attachment',{???}) #What should I write in {}?
layer.setEditorWidgetSetup(2,setup)

I have found examples for Date/Time and Value Map types, but what about Attachment?


texts: Determine which field is being modified during OnChangeFeature event

texts: In the OnChangeFeature event is there a way to determine which field was just edited causing the event to fire?  I'm doing several tasks in OnChangeFeature that only need to happen when certain fields are edited, so being able to determine which field just changed would be helpful.  Any suggestions?


texts: Problem with WFS filters (BBOX, INTERSECTS)

texts:
I'm trying to get a feature/features from a small area using the BBOX (or INTERSECTS) filter in my WFS query. I should be expecting only a small set of features or a single feature and yet the query returns quite a handsome bunch of them.

I have GeoServer version 2.2.2 with an Oracle data store. I have disabled the 'loose bbox' selection so that shouldn't be the cause of the problem.

Here's the query with a BBOX filter:

<wfs:GetFeature
xmlns:wfs="http://www.opengis.net/wfs"
service="WFS"
version="1.1.0"
outputFormat="json"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <wfs:Query typeName="LiVi:LIIKENNE_ELEMENTTI" srsName="EPSG:3067" xmlns:LiVi="http://172.17.14.211:8080/LiVi">
    <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
      <ogc:BBOX>
        <ogc:PropertyName>GEOMETRY</ogc:PropertyName>
        <gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:3067">
          <gml:lowerCorner>316600 6838986</gml:lowerCorner>
          <gml:upperCorner>327696 6844298</gml:upperCorner>
        </gml:Envelope>
      </ogc:BBOX>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

The problem persists with the INTERSECTS filter. The size of the polygon is about 10 x 10 meters.

<wfs:GetFeature
xmlns:wfs="http://www.opengis.net/wfs"
service="WFS"
version="1.1.0"
outputFormat="json"
xsi:schemaLocation="http://www.opengis.net/wfs
http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <wfs:Query typeName="LiVi:LIIKENNE_ELEMENTTI" srsName="EPSG:3067" xmlns:LiVi="http://172.17.14.211:8080/LiVi">
    <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
      <ogc:Intersects>
        <ogc:PropertyName>GEOMETRY</ogc:PropertyName>
        <gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:3067">
          <gml:exterior>
            <gml:LinearRing>
              <gml:posList>308082.07106781186 6833724.928932188 308082.07106781186 6833739.071067812 308067.92893218814 6833739.071067812 308067.92893218814 6833724.928932188 308082.07106781186 6833724.928932188</gml:posList>
            </gml:LinearRing>
          </gml:exterior>
        </gml:Polygon>
      </ogc:Intersects>
    </ogc:Filter>
  </wfs:Query>
</wfs:GetFeature>

Edit:

Here's another request (this time a GET request):

  http://172.17.14.211:8080/geoserver/wfs?request=GetFeature&version=1.1.0&srsName=EPSG:3067&typeName=LiVi:LIIKENNE_ELEMENTTI&BBOX=316600,6838986,316605,6838991,EPSG:3067

Even though the BBOX area is quite small, I get 1263 features back, most of which don't even fall inside the bounds specified in the request. For instance, from one of the features in the response:

<gml:boundedBy>
  <gml:Envelope srsDimension="2" srsName="http://www.opengis.net/gml/srs/epsg.xml#3067">
    <gml:lowerCorner>317629.69841038 6841957.478078741</gml:lowerCorner>
    <gml:upperCorner>317902.64972173725 6841987.000123474</gml:upperCorner>
  </gml:Envelope>
</gml:boundedBy>


texts: Converting from lat/long to EPSG:2154, in C#?

texts:
I don't know much about GIS. I'm working in C#.
I'm receiving latitude/longitude data and need to convert them to EPSG:2154.

I've done some web search but I'm still not sure where to start.
Is there some kind of library or code examples I could use ?


texts: Why am I getting 'Error 000732 Raster does not exist'?

texts:
I am trying to apply symbology to a raster layer via kernel density analysis. When I run the Python script below in ArcMap, I am get the error message below. I have searched and tried the common suggestions but none seem to work. Any help would be great.

Runtime error Traceback (most recent call last):   File "<string>", line 42, in <module>
File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\management.py", line 5722,
in ApplySymbologyFromLayer
raise e ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Layer: Dataset C:\Users\cbriglia\Desktop\GIS\Python_Test\clip_raster
does not exist or is not supported Failed to execute (ApplySymbologyFromLayer).

#____________________________________________________________________________________________________
# testpy.py
# Created on: 2014-02-24 15:34:03.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")

# Local variables:
Input_Table = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\test.gdb\\test"
state_border_shp = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\state_border.shp"
Python_Test = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test"
xy_layer = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\xy_layer"
xy_output_shp = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\xy_output.shp"
Hot_Spot_Output = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\hot_spot1"
Hot_Spot_Raster = "C:\\Users\\cbriglia\\Desktop\\GIS\\Python_Test\\clip_raster"
symbologyLayer = "C:\\Users\\cbriglia\\Desktop\\GIS\\Shapefiles\\HotSpotSymbology.lyr"

mxd=arcpy.mapping.MapDocument("CURRENT")

# Process: Make XY Event Layer
arcpy.MakeXYEventLayer_management(Input_Table, "longitude", "latitude", xy_layer, "GEOGCS['GCS_North_American_1983_CSRS',DATUM['D_North_American_1983_CSRS',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]];-400 -400 1000000000;-100000 10000;-100000 10000;8.98315284119521E-09;0.001;0.001;IsHighPrecision", "")

# Process: Feature Class to Feature Class
arcpy.FeatureClassToFeatureClass_conversion(xy_layer, Python_Test, "xy_output.shp", "\"Time\" >= '0:00:00' AND \"Time\" <= '0:04:59'", "RowNumber \"RowNumber\" true true false 8 Double 0 0 ,First,#,,RowNumber,-1,-1;Date \"Date\" true true false 8 Date 0 0 ,First,#,,Date,-1,-1;Time \"Time\" true true false 255 Text 0 0 ,First,#,,Time,-1,-1;Day \"Day\" true true false 255 Text 0 0 ,First,#,,Day,-1,-1;Location \"Location\" true true false 255 Text 0 0 ,First,#,,Location,-1,-1;Actual_Cal \"Actual_Call_Type\" true true false 255 Text 0 0 ,First,#,,Actual_Call_Type,-1,-1;Sub_Type \"Sub_Type\" true true false 255 Text 0 0 ,First,#,,Sub_Type,-1,-1;Agency \"Agency\" true true false 255 Text 0 0 ,First,#,,Agency,-1,-1;District \"District\" true true false 255 Text 0 0 ,First,#,,District,-1,-1;Latitude \"Latitude\" true true false 8 Double 0 0 ,First,#,,Latitude,-1,-1;Longitude \"Longitude\" true true false 8 Double 0 0 ,First,#,,Longitude,-1,-1", "")

# Process: Kernel Density
arcpy.gp.KernelDensity_sa(xy_output_shp, "NONE", Hot_Spot_Output, "2.04744399999998E-03", "1.70620333333332E-02", "SQUARE_MAP_UNITS")

# Process: Clip
arcpy.Clip_management(Hot_Spot_Output, "-73.7275781441499 40.9867050023656 -71.7867901391991 42.0506901260974", Hot_Spot_Raster, state_border_shp, "-3.402823e+038", "ClippingGeometry")

# apply symbology
arcpy.ApplySymbologyFromLayer_management (Hot_Spot_Raster, symbologyLayer)


texts: How to save a newly created shapefile in PostGIS?

texts:
I am creating shapefile using shapefile.py and my database has records more that 65k which is the limit of the shapefile. How can I create shapefiles then?

Is it possible that somehow I am able to creat shapefile and store them directly into the PostGIS using shapefile.py?


texts: Select by attributes on PYQGIS 2.14 Essen

texts:
I'm trying to make a selection by attribute with python on QGIS Essen, but it looks like I am making a mistake on the script and I can not find it. Can somebody tell me what I have made wrong, or how can I select attributes without using the select by attribute algorithm?

This is my script:

pas14=processing.runalg('qgis:selectbyattribute',r'C:\Users\s.galan\Desktop\TFM_SORAYA\03_Model\Capes_script\polygonize1.shp','valor',0,3,r'C:\Users\s.galan\Desktop\TFM_SORAYA\03_Model\Capes_script\select1')
select1=QgsVectorLayer(r'C:\Users\s.galan\Desktop\TFM_SORAYA\03_Model\Capes_script\select1.shp','select1','ogr')
QgsMapLayerRegistry.instance().addMapLayer(select1)

And this is the error:

Error: Wrong number of parameters

ALGORITHM: Select by attribute

    INPUT <ParameterVector>
    FIELD <parameters from INPUT>
    OPERATOR <ParameterSelection>
    VALUE <ParameterString>
    OUTPUT <OutputVector>

OPERATOR(Operator)

    0 - =
    1 - !=
    2 - >
    3 - >=
    4 - <
    5 - <=
    6 - begins with
    7 - contains


texts:
I'm trying to write a batch command (Windows 10) that will copy an ArcGIS geodatabase to a new folder.  I know this may seem like bad practice but it is part of a much larger project creation process which also includes non-GIS elements.

I can get batch files to copy normal folders and files using the

copy [origin] [destination]

command but the .gdb suffix of the geodatabase appears to break this.

If I try to copy the folder and include the .gdb suffix (i.e. as the folder appears in windows explorer) it creates a single file (of .gdb extension) rather than a folder with geodatabase elements inside.

Any thoughts?

ArcGIS Desktop 10.3


texts: Using Add Join while iterating feature classes in ModelBuilder?

texts:
I am building a model that will iterate through feature classes, run the check geometry tool on each, and then join the check geometry output table back to the original feature class.  When the model reaches the join stage, it is adding the attributes of the first feature class to each subsequent feature class it iterates through rather than bringing in the attributes of each feature class as it is sent through the model.

For example:
Iterate Feature Class A
    -Join Layer A Attributes to Geometry Error A
Iterate Feature Class B
    -Join Layer A Attributes to Geometry Error B rather than Layer B attributes

Is there a way to clear the whatever Add Join is storing in memory each iteration?
Or am I simply going about this all wrong.  I hope this makes sense.

Here's the model diagram if that helps:


texts:
I'm running xampp in windows 7, apache is listening port 80.

I downloaded MS4W and installed the bundle under c:\ms4w and configured apache to listen on port 8080.

I'm running htt://localhost:8080/cgi-bin/mapserv.exe and I'm getting the following output

  No query information to decode. QUERY_STRING is set, but empty.

which according the instructions shows that mapserver is running. I also executed the following example htt://127.0.0.1:8080/quickmap.php which also run with no problems.

Then I copied all the cgi-bin from ms4w/apache to xampp/apache.
I also searched the ms4w httpd.conf, in the ms4w/appache/conf, for mapserver and transferred the following to xampp apache configuration.

## Alias for MapServer tmp directory
Alias /ms_tmp/ "C:/xampp/tmp/ms_tmp/"

# set environment vars necessary for MapServer
SetEnv PROJ_LIB "C:/xampp/ms4w/proj/nad/"
SetEnv PATH "C:/xampp/apache/cgi-bin/"

# uncomment the following lines to log MapServer errors to a file
#SetEnv MS_ERRORFILE "C:/xampp/tmp/ms_error.txt"
#SetEnv MS_DEBUGLEVEL 3

Restarting apache under xampp and executing http://localhost:80/cgi-bin/mapserv.exe and as a result I'm getting

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster.

Error 404

localhost
Apache/2.4.9 (Win32) OpenSSL/1.0.1g PHP/5.5.11

What am I doing wrong?


texts:
I've developed a plugin for QGIS 2.12 which uses data that is encoded in UTF-8. The plugin works fine for 2.12, but when I try to start it in QGIS 2.14 it throws me the following error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 4: ordinal not in range(128)

The code snippet which causes the exception is

value = QLabel(str(feature[field]).decode('utf-8')).

In former cases the error was thrown because I forgot to decode the characters, but I do convert them in that case. I already tried to remove the str() and  the .decode('utf-8') calls, but the exception still gets thrown.

Why does this work for QGIS Lyon but not for QGIS Essen?


texts:
I have a Raspberry Pi 3 moving around in my city. It shows information on a monitor via hdmi. Now it should also display a map of the current position. The Pi has no connection to the internet and will not get one.

I installed tilestache. The example is running fine but if I try to use a mbtiles map from openmaptiles, tilestache is complaining about the pbf format:

192.168.0.54 - - [16/Jun/2017 12:00:17] "GET /osm/10/168/398.png HTTP/1.1" 500 -
Error on request:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 209, in run_wsgi
    execute(self.server.app)
  File "/usr/local/lib/python2.7/dist-packages/werkzeug/serving.py", line 197, in execute
    application_iter = app(environ, start_response)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/__init__.py", line 413, in __call__
    status_code, headers, content = requestHandler2(self.config, path_info, query_string, script_name)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/__init__.py", line 286, in requestHandler2
    status_code, headers, content = layer.getTileResponse(coord, extension)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/Core.py", line 432, in getTileResponse
    tile = self.render(coord, format)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/Core.py", line 519, in render
    tile = provider.renderTile(width, height, srs, coord)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/MBTiles.py", line 217, in renderTile
    mime_type, content = get_tile(self.tileset, coord)
  File "/usr/local/lib/python2.7/dist-packages/TileStache/MBTiles.py", line 159, in get_tile
    mime_type = formats[format]
KeyError: 'pbf'

As far as I know, tilestache does not support pbf format in mbtiles. I also have map data in osm.pbf from Geofabrik but I did not found anything about how to use that with tilestache. Can I make tilestache to use osm.pbf?


texts: Graduated values in symbology based on specific attribute in QGIS

texts:
I'm trying to solve the problem I've raised in Copying graduated scale from polygon to point layer in QGIS?

I've rearranged the attribute table that looks like this:

Important to notice is that the field "gruppo" is composed by 2 unique attributes: "campione" and "controllo".

What'd like to do now is to create a graduated symbology based on an attribute (say "pcb_101") and use the quantile classification.

BUT I need that each class of the quantile classification is based only of the "campione" rows of the "gruppo" field.

I tried to use the rule renderer but I noticed that, even if I add the rule "gruppo" = 'campione' and add intervals to this rule, the calculation of the quantiles is made using the whole "pcb_101" field.


texts: Is there a plugin for calculating the walking time in QGIS 3

texts:
In the previous QGIS version there's this plugin:
Walking time but it's not compatible with QGIS 3. Is there another plugin doing the same thing?


texts: Calculate NDVI with converted canon sx260 hs

texts:
I have converted my canon sx260 hs so it can capture NIR part of specter. Can anyone tell me how can i calculate NDVI now? My guess is that on the blue channel is now NIR value and Green channel=(TRUE_GREEN + NIR) And Red channel =(TRUE_RED + NIR) So NDVI would be: NDVI= (NIR-TRUE_RED)/(NIR+TRUE_RED)
 Am i on the right tracks?
 Any hints?


texts: Creating polygons from points in Mapinfo

texts:
I have a huge number of points(co-ordinates), from which I am required to draw a polygon in Mapinfo.

This required polygon is a square of 200m size. All I have now is the left side lower end of the polygon.

Is there anyway that I can draw a square of 200m from this point automatically using MapInfo MBX files?


texts:
I have tried below code in python using the Spyder IDE to write data using GDAL but all I get is .tiff file named BnDSM with 0 bytes but when I restart my python kernel data appears.

driver = dsm.GetDriver()
outDataset = driver.Create("E:/PracticeData/BnDSM.tif", cols1,rows1, 1)
outBand = outDataset.GetRasterBand(1)
geoTransform = dsm.GetGeoTransform()
outDataset.SetGeoTransform(geoTransform )
outBand.WriteArray(BnDSM,0,0)
OutDataset=None
outBand =None


texts: How to retrieve all subtype codes from ISubtypes interface

texts: I'm trying to retrieve all subtypes for a given feature class.  ISubtypes.Subtypes give you an enumeration of all subtypes in the class.  However the IEnumSubtype.Next method requires the subtype code to retrieve the associated subtype.  But this obviously requires prior knowledge of all subtype codes.  There are no methods on ISubtypes that retrieve all subtype codes.  So, how do I obtain a list of both the subtype codes and subtype names associated with a feature class?  I must be missing something obvious here.


texts: Creating a small web-mapping/map-tiling service

texts:
I am looking for a small-scale and easy way to present one or more polygon shapefiles online (on a municipal website without any existing map-server infrastructure, to be precise). Right now, I'm doing all work with QGIS, and I would prefer to stay all open-source (there is no budget left for any big software investments).

Researching this topic resulted in a overwhelming number of possible approaches, and left me quite confused. What I am looking for is

being able to show categorized polygons in a thematic map
(- if possible, it would be nice to get popups or to be able to retrieve attribute information - but that's highly optional)
I would prefer to do most work (styling, etc) in QGIS
OSM as base map would be perfectly fine

So far, custom map tiles on an OSM base map look like the thing I'm looking for (or is there a better solution)? What would be the best way to create these tiles?


texts:
I'm trying to set up a demo that serves up live spatial data, but am having trouble finding any suitable example data sources.

Ideally I'm looking for something that updates every few seconds; either with a new position or maybe a fixed position but a new status.

So traffic congestion (for example) is out because it doesn't really update frequently enough. I was thinking that a live GPS feed would be ideal - but I just don't know of any.

Does anyone have any suggestions, or example feeds that are reliable and open?


texts: Showing Count of Features by Attribute in Arcade Popup

texts:
I have a survey that I'm running through Survey123. I want to display the results in a web map that clusters points. In the popup for each cluster, I would like it to display how many features from each submitter are within the cluster. How do I enter that into an Arcade expression to get the popup to display correctly?
The field is installed_by, which has a string for the name of the installer, and the output should look like:
Total - 23
Al - 5
Bill - 10
Cindy - 8


texts: How to contour irregular point data for overlay on Google maps?

texts:
I am having some serious trouble finding a solution to fit my current needs.  I am attempting to create contour maps from irregularly spaced point-data on the fly to overlay on a Google map.  I have looked at almost everything I can find, but I haven't come across anything that seemed to do this.  I cannot generate the contours before use, as there are literally thousands of possible maps, and they change regularly.  If anyone knows of anything that might help me accomplish this, it would be extremely helpful.

EDIT: I am fairly new to all of this stuff, so there is a good chance I have missed something basic.  Please let me know if that is the case.


texts:
In QGIS you can input a set of raster or vectors using "##parameter_name=multiple raster" or "##parameter_name=multiple vector". Is it possible to do this with other acceptable parameter types, such as number? If not, is there another way to input a set of numbers (the exact number of which may change from run to run)?

The documentation showing you can use multiple raster and multiple vector (along with other types of input parameters) can be found here: https://docs.qgis.org/2.18/en/docs/user_manual/processing/console.html


texts:
I am current developing an GeoExt app which is up and running. Now I want to create maps then dump them in the app. I have been battling with mapServer for days now. Mapfile can generate raster type files without any hustle but i can not do the same with my shapefiles or any other file for that matter. What am I missing. Here is my mapfile code....

MAP
        IMAGETYPE PNG
        NAME "Mapfile"
        EXTENT 15.8278 -35.0547 52.2894 -21.929
        SIZE 2000 1700
    SHAPEPATH "/var/www/html/mapserver/mapfile"
        IMAGECOLOR 128 0 250

        WEB
        Template "/var/www/html/mapserver/mapfile/tamplate.html" #Do not mind the spelling
            IMAGEPATH "/var/www/html/mapserver/outputs/"
            IMAGEURL "../mapserver/outputs/"
        METADATA
                    "wms_title" "Moz_Floods_Before"
                    #"wms_onlineresource" "http://localhost/cgi-bin/mapserv?mode=map&map=/var/www/html/mapserver/mapfile/before.map&"
                    "wms_enable_request" "*"
                    "wms_srs" "EPSG:4326"
        END
        END
    LAYER
        NAME 'KML_File'  #KML file is the shapefile
        DATA KML_Shape
        STATUS ON
        TYPE POLYGON
        PROJECTION
                "proj=longlat"
                "ellps=WGS84"
                "datum=WGS84"
                "no_defs"
        END
    END
END

This can only display imagecolor..., I',m working on Linux


texts:
I have an issue while trying to add basemaps: the relevant button is inactive (take a look at the attached screenshot).
How can I solve this?

I am using the ArcGIS Desktop 10.7.1 on Windows 7 Ultimate SP1, have Microsoft .NET Framework 4.5.2 installed, and my pc is connected to the internet.
I have also run an ArcGIS Connection Test and the results are as follows:

Proxy Server Test - Failed    Reason Unknown.
Download Speed Test - Failed      Test site unreachable.
Network Latency Test - Undetermined   Reason Unknown.
Network Route Test - Failed   Reason Unknown.

I tried to connect ArcMap with arcgis.com but I receive the warning:

Unable to connect to the selected Portal for ArcGIS


texts: QGIS styles: How to reset default saved style in Local database

texts:
What do I have:

QGIS 2.16.2 / WIN7

I defined a style on a PostGIS layer which I saved as default in the Datasource database. This works quite nice!

What do I need:

Now I want to create the style from scratch but I have a hard time 'resetting' the style. After deleting the record in public.layer_styles the style still loads with the layer on my system, but not on other systems. Also does load with user login, but not with admin login. So I suspect I saved the style by accident in the Local database as well. Where to find this 'Local database' and how do I remove the style from it?

What have I tried:

Searched the QGIS settings.
Browsed to ....qgis2\ and viewed the SpatialLite databases with FME. No answers found.
Copy the table in PostGIS, add to QGIS, copy default style and paste to original table, save as default in local database. This works for me now but I still would like to know where the style is saved.


texts: Spatialite - update query for bounding polygon using WITHIN

texts:
I have 2 spatialite polygon layers which represent land parcels and municipalities. Each parcel is within or intersects 0, 1 or 2 municipalities. I am trying to update a field within the parcel layer with the name of the municipality when the centroid of parcel is within the municipality.

First I tried doing this within QGIS using the "Join attributes by location". It's very slow. I failed to make a proper test, and my attempt was for 1M parcels against 300 municipalities. It's about 2/3 done after 24 hrs and I'm afraid to stop it.

In the meantime I've been attempting it with a much smaller sample using SQL in the Spatialite-Gui application.

The following select query works:

Select qtrs.label, rm.rmname
from qtrs join rm on
within(centroid(qtrs.Geometry), rm.Geometry)

however I'm unable to convert it to a working update query. The following executes but puts all of the parcels into the same municipality

update qtrs
    set rmname=
(select rm.rmname
    from qtrs join rm where
    within(centroid(qtrs.Geometry), rm.Geometry));

Everything else I've tried fails with a syntax error


texts: Can we use FME translator for upgrading lower version GIS database into higher version GIS database

texts: I want to upgrdae our lower version GIS database into higher version GIS database.Is it possible to do so and suggest methods to do so.I am thinking of using FME.Is it possible to use FME or any other option will be suitable?Please suggest...


texts: Custom shapefile in Geoserver's ImageMosaic plugin being overwritten

texts:
I'm using GeoServer's ImageMosaic plugin and I would like to be able to assign my own sort order to my tiffs.

I have a store that links to a folder of GeoTiffs, and the folder also contains a .shp .prf, .shx and .dbf file. They all have the same name as the store and are in the folder containing the tiffs. I have generated the shapefile (and sidecar files) in FME where I am easily able to generate the shapefile and import the sort attributes from a database.

However, when I save the store, GeoServer automatically generates a shapefile index and overwrites the shapefile I've added (in doing so, getting rid of my "sort" attribute).

I have read that GeoServer should not overwrite a shapefile if one exists in the containing folder, so I'm at a loss.

Am I missing a properties file (and if so, what should it should look like)?


texts: What is the difference between ArcGIS Pro, ArcGIS Desktop and ArcGIS for Desktop

texts: I have purchased GIS for personal use. I am very new to GIS. I am confused with the products. Which one should I use?


texts: completing satellite imagery tiles when data coverage is less than 100%

texts:
I want to join several images (>=2) into one "best" image. Best is defined on low cloud cover and high data coverage. An example using free Sentinel satelite data follows.

See
http://sentinel-s2-l1c.s3.amazonaws.com/tiles/12/S/XB/2017/6/1/0/preview.jpg
and
http://sentinel-s2-l1c.s3.amazonaws.com/tiles/12/S/XB/2017/6/ for the source of images below.

Are there any algorithms or processes for completing satellite imagery tiles that don't have 100% data coverage in order to generate a full tile?

See visualizations below for examples of what I mean.

I'm not too familiar with the literature, and don't know what the terminology that I should be looking out for is.

Example:

Example:


texts:
I have come across in my textbook ,that the longitudinal extent of Asia is about 25 degree East to 170 degree East. However , looking at the map of Asia , I think that it should be 170 degree West . I googled this several times but some said it's East and some said West.

Please tell the correct one.


texts: how to make buffer around shapefile in R

texts:
I've read a similar post but couldn't apply the solution. Namely, I have a polygon of France's boundary and want to buffer it as follows:
fra_bound <- readOGR(dsn = "data/FRA_adm", layer = "FRA_adm0")
fra_buf <- gBuffer(fra_bound, width = 1000, quadsegs = 10)

The problem is this executes too long and throws: Error in gBuffer(fra_bound, width = 1000, quadsegs = 10) : std::bad_alloc
The projection of this shape is:

proj4string(fra_bound)
[1] "+proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"

What am I doing wrong? Maybe I should use another way but I need it in R.


texts: QGIS 3 - QSettings().value(r"[...]")[0:2] error - 'NoneType' object is not subscriptable

texts:
I'm trying to find a solution to launch a plugin from outside the QGIS console

I've succeeded to call the plugin from the python console in the QGIS software but I'm now trying to do it outside of QGIS when it's already opened

for QGIS plugin in python console the following works to launch the plugin:

import sys
sys.path.append(r"path/to/plugin")
from plugin_name_folder import plugin_name
execute = plugin_name.plugin_class(iface)
execute.initGui()
execute.run()

in order to launch the plugin, here's the beginning of the code pre-made by the plugin builder :

from PyQt5.QtCore import QSettings, QTranslator, qVersion, QCoreApplication
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QAction

from .resources import *
from .zoom_snap_dialog import zoom_snapDialog
import os.path

class zoom_snap:
    def __init__(self, iface):
        self.iface = iface
        self.plugin_dir = os.path.dirname(__file__)
        locale = QSettings().value('locale/userLocale')[0:2]
        locale_path = os.path.join(
            self.plugin_dir,
            'i18n',
            'zoom_snap_{}.qm'.format(locale))

        if os.path.exists(locale_path):
            self.translator = QTranslator()
            self.translator.load(locale_path)

            if qVersion() > '4.3.3':
                QCoreApplication.installTranslator(self.translator)

        self.actions = []
        self.menu = self.tr(u'&(name)')

        # Check if plugin was started the first time in current QGIS session
        # Must be set in initGui() to survive plugin reloads
        self.first_start = None

When I try to launch my plugin with plugin_name.plugin_class(iface) I'm hitting the following error :

"locale_path=os.path.join("
TypeError: 'NoneType' object is not subscriptable

I've seen that another line before generates the same TypeError when launched separately in window command line :

QSettings().value('locale/userLocale')[0:2]
TypeError: 'NoneType' object is not subscriptable

My questions will be :

1- Where is QSettings().value([path])[0:2] extracting values from ? I can't see where locale/userLocale folder is and how is it taking its values

2- I've seen a lot of posts about the 'NoneType' TypeError posts but here I don't know if anybody had any clue about solving this type of error


texts: Getting grayscale heightmap from Terrarium map

texts:
I'm downloading Terrarium maps from AWS S3 and I'm unable to generate a gray heightmap out of it. Does someone know the formula to translate the pixel RGB values into the grayscale (0, 255) heightmap?

The following image represents the area I'm working with

If I only use the RED pixel to generate image, I get this

You can see there some features of the mountains but it doesn't look like it should and the generated mesh looks almost flat in my 3d software.


texts: Routing from user location to POI in pgRouting?

texts:
I have roads(edge) table and hospitals(point of interest) table in pgRouting database.

Now I want to take user location or any point location that user inputs as a starting node and ending node must be a hospital location

How can I do this?


texts: Geoserver cql filter, closing single quote in URL is not read

texts:
I got a very strange behavior when using CQL filter. Here's the URL result when using AJAX
http://localhost/geoserver/visualization/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=visualization:pothole,visualization:HPMS&outputFormat=text/javascript&format_options=callback:loadFeatures&srsname=EPSG:3857&cql_filter=branchCode='N00225' AND direction='S'

Now look at below image, it is the above URL displayed in console log.

Notice that the URL breaks after cql_filter=branchCode='N00225 , it doesn't read the closing '. If I click on the URL it will give me this error :
<ows:ExceptionText>Could not parse CQL filter list. Lexical error at line 1, column 19. Encountered: <EOF> after : "\'N00225" Parsing : branchCode='N00225.</ows:ExceptionText>

Here's my javascript code to produce the branchCode above
"branchCode='"+val+"'";

What is the reason behind this and how to solve it?


texts: Seeking Open Source alternatives to ArcGIS Aggregate and Extract Value to Points?

texts:
I am looking for some kind of Open source GIS library which can perform spatial analytic functions same as ArcGIS.

My use case is : I am processing GeoTIFF file provided by USGS and performing Aggregate and Extract Values to Points functions from ArcGIS. Once I have result in GeoDatabase I create Text File out of that, that's all I do. Instead of using Aggregate and Extract Value to Points function from ArcGIS I want to use some open source.

Any thought?


texts: How to calculate "stop points" from a set of GPS tracklogs?

texts:
I have a set of GPS tracks pertaining to a cycling event that happened in the same day. I don't have much geographical information about the event itself, except for the tracklogs I downloaded from a site as GPX.

Along the route, there were some predefined stops that can be clearly seen at the map. These stops have some characteristics spatial and temporal properties (points of speed near zero, segments at random directions, large gaps in the time/distance plot), and is very easy to spot those points visually.

What I like to devise is a way to "detect" those points algorithmically having only the GPX files as input.

Below there is a sample stop point, plotted using Python:

Also included is a very interesting picture taken from 22.2.5 Mining for Movement Patterns in 22.2 Scientiﬁc Fundamentals of Computational Movement Analysis in Springer Handbook of Geographic Information. What I am looking for is the "meeting place" pattern. The book just mentions the conceptual framework for that, not how to extract it algorithmically. It is important to note, though, that although every cyclist stopped at the meeting places, the didn't do so necessarily at the same time, so the meeting place is spatial mostly, instead of spatio-temporal.