texts: Problem while adding the store/layer in geoserver

texts:
I am new to geoserver..Yesterday I worked with that and added stores and layers. Its working fine.
But, Today I try to add a new store, i am getting this error message..

"Sorry, your session timed out...
It looks like you waited too long to make that last change.if this continues to happen, you should get in touch with your system administrator.
Go back to the home page and try again."

How to resolve this error..
Could u please help me out..
Thanks in advance


texts: How to query out multiple points from a single feature layer and display them?

texts:
I have a query that goes through and queries points from a single feature layer. the problem I'm having is that it is only grabbing a single point. How do I get it to grab and display all points with the same name? I am using ArcGIS API for JavaScript.

function getParkFeature(in_park_name) {
    var symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 10,        new SimpleLineSymbol(SimpleLineSymbol.STYLE_SOLID,
    new Color([255, 0, 0]), 1),
    new Color([0, 255, 0, 0.25]));
    var query = new Query();
        query.where = "COMMON='" + in_park_name + "'";
        query.outFields = ["COMMON","BOTANICAL", "CONDITION"];
        tree.queryFeatures(query, function (featureSet) {
            console.log(featureSet);
            selectedParkFeature = featureSet.features[0];
            selectedParkDisplayName = in_park_name;
            var graphic = selectedParkFeature;
            graphic.setSymbol(symbol);
            graphic.setInfoTemplate(treesInfoTemplate)
            map.graphics.add(graphic);

    var graphicsExtent = esri.graphicsExtent(map.graphics.graphics)
       if (graphicsExtent !== null) {
            map.setExtent(graphicsExtent);
            map.setExtent(graphicsExtent.expand(3))
       }
    });

}


texts: Create labels for ArcGIS online feature layer and display it in Geocortex Essentials?

texts:
How do i create labels for my feature layers (in arcgis online) and display them in Geocortex Essentials. I tried creating labels by adding layers in ArcGIS online map and saved the layer. Also changed symbology for each layer. But in Geocortex Essentials, only symbology for layers is reflected and no labels are drawn.

Any help?


texts: Is there an R alternative for ArcMap's linear directional mean tool?

texts: I'm writing an R package for trajectory analysis and need to determine the mean direction of lines. The only thing I found so far for this purpose is ArcMap's linear directional mean, but no alternatives. Is there any R implementation out there that maybe just goes under a different name?


texts: How do I fire a function after all features have been selected by a box in OpenLayers?

texts:
I have a map rendering with Polygons on a Vector layer set up as features.  I set up the features so they fire off a function when the feature is selected and this works fine.  The issue I'm having is when I try to allow users to select multiple features using a box.  This causes the function to fire for each feature that is selected.  I understand why this is, but what I really need is to have a function that fires once all of the features are selected so I can run a function using all selected features instead of having it run once for each.
Here is my selectFeature code:

window[mapName].addControl(control);
                        control.activate();
                        var selectCtrl = new OpenLayers.Control.SelectFeature(layerVector, {
                            clickout: true,
                            onSelect: onFeatureSelect,
                            onUnselect: onFeatureUnselect,
                            box: true
                        });
                        window[mapName].addControl(selectCtrl);
                        selectCtrl.activate();
                    }
                });

It looks like there's away to attach Handlers to Boxes but so far I've been unsuccessful.  Also, I'm afraid that if the function runs after the box selection is finished, it might not be getting the full list of selectedFeatures.

Any help would be GREATLY appreciated.
Thanks


texts: PC software that will plot a geotagged picture location on a Geotiff

texts:
Is there any PC software (hopefully Open Source) that will plot a geotagged picture's location (drop a pin with a label of some sort) on a custom geotiff file?

It would be nice if it directly loaded the geotagged pictures and the geotiff file.


texts:
I want to get multiple WFS features and edit

My Code

this.wfs = new OpenLayers.Layer.Vector("WFS-T" , {
        strategies: [new OpenLayers.Strategy.BBOX(), this.saveStrategy],
        projection:  new OpenLayers.Projection("EPSG:3857"),
        protocol:    new OpenLayers.Protocol.WFS({
            version:     "1.1.0",
            srsName:     "EPSG:3857",
            url:         "http://localhost:8080/geoserver/wfs",
            featureNS:   "http://localhost:8080/geoserver/mall",
            extractAttributes: true,
            featureType: ['stores' , 'store_point'],
            geometryName: 'geom'
        })

    });

But i can not edit features

Error Message :

<ows:ExceptionText>Feature type 'stores,store_point' is not available: </ows:ExceptionText>


texts: Pass sld env parameter with openlayers 3

texts:
Is there a way to pass sld env parameter with openlayers 3?
It works to pass the env parameter with a normal getmap-request. Doesn´t openlayers support the env parameter?
I used this example http://docs.geoserver.org/latest/en/user/styling/sld-extensions/substitution.html

The problem is that I have to style a wms based on features that occured within the last 24 hours and 4 days, so I have to pass the exact timestamps.


texts: Getting ERROR 000496 when trying to delete fields in ArcGIS Pro

texts:
In ArcGIS Pro 2.1, when I attempt to delete a field (via the attribute table, field view) or a feature class, my process fails and I get the following error message:

ERROR 000496: Table is being edited, failed to execute

but, the item I am working on is not being edited. The layer is checked off in the content pane and thus unchecked in the "list by editing". Yet, I keep getting this error message 000496 all the time. In ArcMap, we had the option of Stop Editing, but, this is no longer the case in ArcGIS Pro. The only way to stop editing is to uncheck the layer from Contents pane but this does not help me at all.


texts: What is more effective? Storing Shapes as shape column (http://webhelp.esri.com/arcgisserver/9.3/java/index.htm#geodatabases/topology_basics.htm) in database? Or maybe store shapes in seperate tables and join them?


texts: RTKGPS+ : Could we use the mobile device as a rover?

texts:
Using an Android (version 9) based smartphone, I installed RTKGPS+ ( https://github.com/eltorio/RtkGps ) from the play store.

I wonder if it's possible to use the internal GPS chip of the smartphone itself as the rover in the "Enable rover" tab from the "Input streams" menu?

If yes, how to set up all options, like "antenna", "stream settings" and so on...?

If no, is it possible to directly plug an external antenna on the smartphone?


texts: GDAL make configure wrong:PROJ 6 symbols not found

texts:
err tip is :
checking for PROJ >= 6 library... checking for proj_create_from_wkt in -lproj... no
checking for proj_create_from_wkt in -lproj... no
checking for proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -lproj... no
checking for internal_proj_create_from_wkt in -linternalproj... no
checking for internal_proj_create_from_wkt in -linternalproj... (cached) no
configure: error: PROJ 6 symbols not found

The config detail info is:
configure:19168: result: no, consider installing GNU libiconv
configure:19414: Bash completions not requested
configure:19564: checking for PROJ >= 6 library
configure:19794: checking for proj_create_from_wkt in -lproj
configure:19819: arm-linux-androideabi-g++ -std=c++11 -o conftest -mthumb -fPIC -fvisibility=hidden  -march=armv7-a -Wl,--fix-cortex-a8 conftest.cpp -lproj  -L/usr/local//lib -lproj -lsqlite3   -lm -ldl -lsupc++ -lstdc++ >&5
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/local//lib/libproj.so while searching for proj
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lproj
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/local//lib/libproj.so while searching for proj
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lproj
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: warning: skipping incompatible /usr/local//lib/libsqlite3.so while searching for sqlite3
/home/tang/android-toolchain/arm/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lsqlite3
/tmp/ccC8sqRS.o:conftest.cpp:function main: error: undefined reference to 'proj_create_from_wkt'
collect2: error: ld returned 1 exit status

I am very confused that i hava install proj and sqlite3 already!
The proj info is below:
tang@tang-VirtualBox:~$ proj
Rel. 6.3.2, May 1st, 2020
usage: proj [-bdeEfiIlmorsStTvVwW [args]] [+opt[=arg] ...] [file ...]

besides,i am very sure that i have tried many times to test configure file,bellow:
CFLAGS="-mthumb" CXXFLAGS="-mthumb" LIBS="-lsupc++ -lstdc++" ./configure --prefix=/home/tang/gdal/Android --host=arm-linux-androideabi --with-proj=/usr/local/include --with-unix-stdio-64=no --with-ogr --with-geos --with-hide-internal-symbols --with-libz=internal --with-threads --without-bsb --without-cfitsio --without-cryptopp --without-curl --without-dwgdirect --without-ecw --without-expat --without-fme --without-freexl --without-gif --without-gif --without-gnm --without-grass --without-grib --without-hdf4 --without-hdf5 --without-idb --without-ingres --without-jasper --without-jp2mrsid --without-jpeg --without-kakadu --without-libgrass --without-libkml --without-libtool --without-mrf --without-mrsid --without-mysql --without-netcdf --without-odbc --without-ogdi --without-openjpeg --without-pcidsk --without-pcraster --without-pcre --without-perl --without-pg --without-php --without-png --without-python --without-qhull --without-sde --without-sqlite3 --without-webp --without-xerces --without-xml2


texts:
I'm trying to insert some xyz point data into a pc_point, I get the error ERROR:  array dimensions do not match schema dimensions of pcid = 1

running SELECT PC_MakePoint(1, ARRAY[-127, 45, 124.0, 4.0]); gives the same error. the pgpointcloud extension is working since I can get pointclouds in using pdal pipelines.

I'm trying to follow the example here http://s3.cleverelephant.ca/foss4gna2013-pointcloud.pdf

CREATE TABLE pointcloud_99_526.pcpoints (  id SERIAL PRIMARY KEY,  pt PcPoint(1) );
select * from pointcloud_99_526.pcpoints;

INSERT INTO pointcloud_99_526.pcpoints (pt)
SELECT PC_MakePoint(1, ARRAY[x,y,z,intensity])
FROM (
  SELECT
  -127+a/100.0 AS x,
    45+a/100.0 AS y,
         1.0*a AS z,
          a/10 AS intensity
  FROM generate_series(1,100) AS a
) AS values;


texts: ArcGIS Pro WMTS alignment problem can be a coordinate transformation problem?

texts:
In ArcGIS Pro version 1.2 I added a WMTS service and from this service I added a layer to the map. This layer that I added is not aligned with a vector layer I already have in the map (note that the coordinate system of the map, the vector layer and the service are the same Monte Mario / Italy zone 2 EPSG 3004). I tried with another famous GIS software and the same layers and coordinate system and the layers align properly.
Maybe the difference is because with ArcGIS Pro I added the WMTS layer in the map and AFTER I changed the coordinate system, otherwise with the other GIS software I could choose between different coordinate system BEFORE to add the WMTS layer to the map. Could this be the problem? In any case, is there a way to resolve this?


texts: Remove Image layer from GeoSpatial PDF using ogr2ogr

texts:
I'm trying to remove the orthoimage layer from a  USGS GeoSpatial pdf 7.5' topo quad. I can query the layer names:

ogrinfo NM_Canada_Ojitos_20110201_TM_geo_enabled.pdf -mdd LAYERS

Which produces this output:

INFO: Open of `NM_Canada_Ojitos_20110201_TM_geo_enabled.pdf'
      using driver `PDF' successful.
Metadata:
  CREATION_DATE=D:20110201173212Z
  CREATOR=ESRI ArcSOC 9.2.0.1324
  NEATLINE=POLYGON ((332090.904748664 4041071.96353292,331811.437879469 4027142.26667624,320584.088282388 4027367.51725229,320863.5
515158 4041297.21410897,332090.904748664 4041071.96353292))
Metadata (LAYERS):
  LAYER_00_NAME=Map_Collar
  LAYER_01_NAME=Map_Collar.Map_Elements
  LAYER_02_NAME=Map_Frame
  LAYER_03_NAME=Map_Frame.Projection_and_Grids
  LAYER_04_NAME=Map_Frame.Projection_and_Grids.Projection_Coordinate_Values
  LAYER_05_NAME=Map_Frame.Projection_and_Grids.Geographic_and_Grid_Ticks
  LAYER_06_NAME=Map_Frame.Projection_and_Grids.Projection_Line_Mask
  LAYER_07_NAME=Map_Frame.Projection_and_Grids.Grid_Lines
  LAYER_08_NAME=Map_Frame.Geographic_Names
  LAYER_09_NAME=Map_Frame.Geographic_Names.Geographic_Names
  LAYER_10_NAME=Map_Frame.Boundaries
  LAYER_11_NAME=Map_Frame.Boundaries.Boundary_Names
  LAYER_12_NAME=Map_Frame.Boundaries.Boundaries
  LAYER_13_NAME=Map_Frame.Transportation
  LAYER_14_NAME=Map_Frame.Transportation.Road_Names_and_Shields
  LAYER_15_NAME=Map_Frame.Transportation.Roads
  LAYER_16_NAME=Map_Frame.Transportation.Airport_Names
  LAYER_17_NAME=Map_Frame.Transportation.Airports
  LAYER_18_NAME=Map_Frame.Hydrography
  LAYER_19_NAME=Map_Frame.Hydrography.Hydrographic_Names
  LAYER_20_NAME=Map_Frame.Hydrography.Hydrographic_Features
  LAYER_21_NAME=Map_Frame.Contours
  LAYER_22_NAME=Map_Frame.Contours.Contour_Names
  LAYER_23_NAME=Map_Frame.Contours.Contour_Features
  LAYER_24_NAME=Images
  LAYER_25_NAME=Images.Orthoimage
1: Map_Collar_Map_Elements
2: Map_Frame_Projection_and_Grids_Geographic_and_Grid_Ticks
3: Map_Frame_Projection_and_Grids_Projection_Line_Mask
4: Map_Frame_Projection_and_Grids_Grid_Lines
5: Map_Frame_Geographic_Names_Geographic_Names
6: Map_Frame_Boundaries_Boundary_Names
7: Map_Frame_Boundaries_Boundaries
8: Map_Frame_Transportation_Road_Names_and_Shields
9: Map_Frame_Transportation_Roads
10: Map_Frame_Hydrography_Hydrographic_Names
11: Map_Frame_Hydrography_Hydrographic_Features
12: Map_Frame_Contours_Contour_Features

I then try to create a new map without the orthoimage layer using ogr2ogr:

D:\>ogr2ogr -f "PDF" map.pdf NM_Canada_Ojitos_20110201_TM_geo_enabled.pdf --config GDAL_PDF_LAYERS_OFF "Images.Orthoimage"

which produces this output:

Warning 1: Unknown layer 'Images.Orthoimage'

The resulting map is blank.

I've also tried creating a map using GDAL_PDF_LAYERS but nothing I type is recognized as a layer and I always get an empty map.

ogr2ogr --version reports 2.2.2

What am I doing wrong?


texts: sf::st_crs() compatibility across different versions of PROJ

texts:
I am supporting an package that serves {sf} objects using EPSG:4326 as default projection; I have little control over the setup my users have (some rely on defaults, others compile from source).

I have run into issue where EPSG:4326 as interpreted in context of PROJ 4.9.3 (the standard when using Windows binaries) looks differently from the same projection in context of higher versions of PROJ.

The PROJ 4.9.3 version of a crs object is

Coordinate Reference System:
  User input: EPSG:4326
  wkt:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0,
        AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
        AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4326"]]

while the PROJ 6.3.0 version is slightly different:

Coordinate Reference System:
  User input: EPSG:4326
  wkt:
GEOGCRS["WGS 84",
    DATUM["World Geodetic System 1984",
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    USAGE[
        SCOPE["unknown"],
        AREA["World"],
        BBOX[-90,-180,90,180]],
    ID["EPSG",4326]]

This creates all sort of inconveniences as the st_crs(x) == st_crs(y) is not TRUE check is prone to fail for an object imported from a different PROJ environment.

Is there a way to serve CRS in a way that would be interpreted reliably the same? I am wary of reprojecting everything due to performance reasons.


texts: How to apply v.transform on a set of vector layers (GRASS 6.4)?

texts:
I have 64 vector layers, all of them must be warped using the v.transform module; the pointsfile is the same for all vectors.

How can I apply the transformation recursively to all layers?

I'm not bind to use GRASS, but I don't want (for a bunch of reasons) to merge all layers into one and apply the transformation on the single file.

Thank you guys


texts: OpenLayers WMSGetFeatureInfo Windows Mobile

texts:
I have built an app using Phonegap build that uses OpenLayers 2.13.1 with WMS layers from GeoServer and I have a WMSGetFeatureInfo control set up. When I click a point on Windows phone 8, the error I get is "Unable to get property 'documentElement' of undefined or null reference" at line 1308.

I think it might be a cross-domain issue. Can anyone help me with this?


texts: Speeding up band math in R 'raster' package

texts:
I have some GeoTiff rasters with over 100 bands in total, but they are not huge: resolution is about 1200x600 and total size is less than 7 mb. I'm trying to do a simple NDVI calculation:

raster <- stack('path_to_raster_1', 'path_to_raster_2')
red <- 60 # red band number
NIR <- 75 # NIR band number
f_NDVI <- function(x){
  (x[NIR]-x[red])/(x[NIR]+x[red])
}
NDVI <- calc(raster, f_NDVI)

The calculation runs extremely slow and takes about 10 minuets.

Is there a way to optimise it and why is the calculation so slow in my case?


texts: What is the best hack for importing large datasets into PostGIS?

texts:
I have to import large Shapefiles (> 1 million records) into PostGIS, and I have been wondering about the best way to do it.

In my question I used the word "hack", instead of tool, on purpose because I think this is not so much a matter of which tool, but which set of steps, or configuration settings to use.
So far, I have tried the SPIT plugin (QGIS), the shp2pgsql Postgis tool and the GDAL ogr2ogr tool. You can view my full review on this post.
So far, I find all of them really unresponsive, when dealing with a large dataset. I was wondering if someone experienced a similar issue, and if you could share something about the approach.


texts: How to hide/show QGisVectorLayer from Python code?

texts:
Once created a layer, how can I hide/show it? I can enable/disable rendering of a specific layer by selecting the checkbox through QGIS, but I need to do it programmatically from python code.

How can I show/hide(not remove) a label from python code?

I'm looking for something like:

aLayer = self.addVectorLayer(uri.uri(), layerName, self.dbConn.getProviderName())
aLayer.Hide()
....
aLayer.Show()


texts: Masking an ImageCollection using another Image in Google Earth Engine

texts:
I want to mask all the layers in an ImageCollection (in the present case MOD44B) using the landcover (Globcover) values from another Image.
var MOD44B = ee.ImageCollection("MODIS/006/MOD44B"),
    Globcover = ee.Image("ESA/GLOBCOVER_L4_200901_200912_V2_3"),
    visualization = {"bands":["Percent_Tree_Cover"],"min":0,"max":100,"palette":["bbe029","0a9501","074b03"]};

var MOD44B = MOD44B.filterDate('2000-01-01', '2019-12-31')
var MOD44B = MOD44B.select('Percent_Tree_Cover')

var Globcover = Globcover.select('landcover')
var Globcover = Globcover.lte(30).or(Globcover.gte(190)).rename('Class');
print(Globcover)
Map.addLayer(Globcover)

//MOD44B = MOD44B.map(Globcover.eq(1)); //<------ This line is not working.
Map.addLayer(MOD44B, visualization, 'TC')

I want to mask all the white regions from Globcover (Image) in MOD44B (Imagecollection).


texts: How is Mapquest Nominatim Service's "routeWidth" search param implemented?

texts: I was looking at MapQuest's Nominatim service, and it seems like they have a non-standard search parameter (doesn't seem to exist in standard Nominatim's list of params) that is the routeWidth. Any guess how this is implemented in their service?


texts: QGIS Georeferencer and Coordinate Systems

texts:
I'm having an issue with Ubuntu and Windows versions of QGIS where the georeferencer does not properly assign the coordinate system to the output raster.

When I assign the output CRS to 'EPSG:900913 - Google Mercator', the output is set to "EPSG:3395 - WGS 84 / World Mercator"

Its not until i 'set layer CRS' of the newly georeferenced raster to 'EPSG:900913 - Google Mercator' that the raster draws correctly.

What am I doing wrong?

Thanks!


texts: Finding location of specific value in spatial TIFF file using R?

texts:
I want to find location of specific value in one spatial GIS TIFF file and then compare location to main file in order to find some information.
for example consider this image which is my main image.

For example, I want to find location of values greater than 255 in following image.
I read both image using raster library.
Edit:
by location I mean longitude and latitude.


texts: Debugging RuntimeError: Object: Error in getting parameter as text from arcpy.GetParameterAsText()?

texts:
I am trying to get this tool I've been writing for the past month operational. I think it should all work, but I'm getting caught up on the parameters of the code. Here is the start of the code that assigns the variables/parameters:

I commented out the report line, since it is for testing an idea(failed)

#importing arcpy, system, Tkinter as well as all of Tkinter's functionality
import arcpy, sys
from Tkinter import *
Convwks_fc = arcpy.GetParameterAsText(0)       #assigns the Feature Class to a variable based on user input for use in the tool
Convwks_lyr = arcpy.GetParameterAsText(1)      #assigns the Feature Layer to a variable based on user input for use in the tool
irrdist = arcpy.GetParameterAsText(3)
reportlocation = arcpy.GetParameterAsText(4)

#report = reportlocation + "\"" + irrdist + "Report.txt"
report = r"\\agcifs01\GroupShares\agletirr\BenFerence\Python\Work\ConvwksAttributeValidationB\SMPReport.txt"

desc = arcpy.Describe(Convwks_fc)
arcpy.env.workspace = desc.path

Here is the error I receive when I attempt to run the code. I had gotten this same error on both of these variables: irrdist = arcpy.GetParameterAsText(3) & reportlocation = arcpy.GetParameterAsText(4).

Executing: ValidateAttributesB \\agcifs01\GroupShares\agletirr\BenFerence\Python\Work\ConvwksAttributeValidationB\SMP2015TEST.mdb\Convwks Convwks SMP
Start Time: Mon Aug 24 14:42:46 2015
Running script ValidateAttributesB...

Traceback (most recent call last):
  File  "\\agcifs01\GroupShares\agletirr\BenFerence\Python\Work\ConvwksAttributeValidationB\Scripts\ConvwksAttributeValidationB.py", line 17, in <module>
irrdist = arcpy.GetParameterAsText(3)
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\__init__.py", line 598, in GetParameterAsText
return gp.getParameterAsText(index)
  File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\geoprocessing\_base.py", line 224, in getParameterAsText
self._gp.GetParameterAsText(*gp_fixargs(args, True)))
RuntimeError: Object: Error in getting parameter as text

Failed to execute (ValidateAttributesB).
Failed at Mon Aug 24 14:42:46 2015 (Elapsed Time: 0.00 seconds)

I am passing a simple string to the irrdist variable and a folder location to the reportlocation variable, I don't understand why this error is being raised... Have any of you guys run into a problem like this? What was causing it?


texts:
I am reading images (through Python) and do something. These images are placed in a temporary file, through:

tf = tempfile.mkdtemp(filename)

I use gdal to read the images (short part of code):

...
tif_image = gdal.Open(str(out_ROI))
x = tif_image.RasterXSize
y = tif_image.RasterYSize
geo = tif_image.GetGeoTransform()
band = tif_image.GetRasterBand(1)
Values = band.ReadAsArray(0,0,x,y)
...

In the end I want to delete the folder created with mkdtemp, through:

import shutil
shutil.rmtree(tf)

Before that I close the images just as I read in this posts:

band = None
Values = None
tif_image = None

But I always get the error:

  WindowsError: [Error 32] The process cannot access the file because it is being used by another process

What I am missing?


texts: QGIS 3x label wrap line expression for individual record

texts:
I want to set the text wrap for the one label only.
I prepared formula such this:
  CASE
  when "fid" = 12 then wordwrap (6)
  End

based on the thread here:
Labeling using 'wordwrap' and 'wrap on character' with mutiple fields in QGIS?
it doesn't work unfortunately.
I also made another attempt
    wordwrap(%Pschool%, 13)

It didn't work either. It was from the other thread below:
Creating multiline labels in QGIS

How can I set the text wrap for an individual record?


texts: Finding map icons for famous Paris landmarks?

texts:
Where can I find map icons for famous Paris landmarks?

I am looking for icons for famous landmarks in Paris, such as the Eiffel Tower, Arc de Triomphe, Louvre, Notre Dame. These should do. For other poi's I have general category-icons, but it would be nice to have special onces for the most well-known. (also from a ux-standpoint: i.e: 'getting your bearings' it would be great)

Anyone knows where to look?


texts:
I am using gdal_translate to clip raster data (using -srcwin and -projwin).
This works fine for me until I'm trying to run some concurrent processes of this command.

In this case I get random error massages of "Out Of Memory in InitBlockInfo()".
When profiling a single process it's seems that the memory usage is strongly increasing just before the end of the output file writing.

I have tried to change the GDAL_CACHEMAX config (both as environment variable and as --config parameter) but it seems to affect only the process until the last phase (if at all) in which its memory usage is highly increasing.

Is there a way to control this behavior?

Some Tech Details:
My version is 1.11.1 and I'm clipping wms xml layer to GTiff tiles (without compression or additional creation options).
The process memory size is reaching about 1.6gb at the last phase (also when I limit the GDAL_MAXCACHE to 64), when I clip a tiles of about 10,000 X 10,000 pixels (total mem size on my computer is 6GB)


texts: Building a custom, dynamic legend using ArcGis-server js and dynamicMapServiceLayer

texts:
I have a dynamicMapServiceLayer that I am using to build a map application.  There are about 10 layers in the mapservice that I am toggling using the setVisibleLayers action.

I would like to build my own custom, dynamic map legend.  When a layers' visiblity is toggled, the corresponding legend item would also hide() / show()

My mapServer has a url that links to a page with all the corresponding legend items like below except my legend's url has 10 legend items

http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer/legend

Is there a way I can access the individual legend items (Name and symbol) from a existing mapServer?  I am comfortable building the legend, I just need to know how to access the layers' symbols which I will then append to a legend dialog.

I should also mention that I am avoiding using DOJO and using pure javascript and jQuery.


texts: arcpy.Statistics_analysis for multivalue parameter

texts:
I made this script to calculate the sum for a selected field after a query definition is defined. I have some issues now, to do with a multivalue field. The code is:

import arcpy

Layer1 = arcpy.GetParameterAsText(0)
Tabela1 = arcpy.GetParameterAsText(1)
Estado = arcpy.GetParameterAsText(2)
Ano = arcpy.GetParameterAsText(3)
mxd = arcpy.mapping.MapDocument("CURRENT")
Saida = arcpy.GetParameterAsText(4)
stats = []

for lyr in arcpy.mapping.ListLayers(mxd):
    lyr.name = Layer1
    lyr.definitionQuery = """UF IN ({})""".format(Estado)

for field in arcpy.ListFields(Tabela1):
    if field.name in (Ano):
        stats.append([field.name, "SUM"])
        arcpy.Statistics_analysis(Layer1, Saida, stats, "")
arcpy.RefreshActiveView()
arcpy.RefreshTOC()

I entered a multivalue parameter but the output show me only one field sum. The other problem is even table do not exist the console show me this error:

Traceback (most recent call last):
  File "F:\AgroBD.gdb\M6a.py", line 18, in <module>
    arcpy.Statistics_analysis(Layer1, Saida, stats, "")
  File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\analysis.py", line      1160, in Statistics
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Table: Dataset F:\AgroBD.gdb\c1 already exists.
Failed to execute (Statistics).

Failed to execute (Consulta).


texts:
I am working on a mapping project on an embedded system (~1 Ghz, 512MB RAM, 2GB flash storage). It is not feasible to pre-render all of the tiles and setup a tile server. Instead, I was planning to use mapnik to dynamically generate images from a custom sqlite database.

Is this a reasonable plan or will I run into problems?

If so, is there a better design approach to take?


texts: Openlayers SelectControl add multiple Layers

texts:
Heres my code to add an SelectControl with Popup for an existing layer add startup

    map.addLayer(window.markerLayer);

window.markerLayer.events.on({

});

// Popup für Marker
window.selectControl = new OpenLayers.Control.SelectFeature([markerLayer]);
map.addControl(window.selectControl);

window.selectControl.activate();
    window.markerLayer.events.on({
    'featureselected' : onFeatureSelect,
    'featureunselected' : onFeatureUnselect
});

I skipping the code of "onFeatureSelect()" and "onFeatureUnselect()" ...

This is working very well.

Now i want to add additional new layers (OpenLayers.Marker as content) to show on the map (also working well) with the same functionality (showing popups...).

If I copy the code above and apply on the new layers the app is not working anymore...

Next try:

Adding the new Layer with setLayer() Method:

window.selectControl.setLayer(selectControl.layers.concat(newLayer));

But no success...

Thanks !


texts: Why does Accumulated cost fail with 'QgsVectorLayer' object has no attribute 'bandCount'?

texts:
When using the function Accumulated cost (isotropic) from the SAGA algorithms in QGIS i get the following error message:

  An error has occurred while executing Python code:

  AttributeError: 'QgsVectorLayer' object has no attribute 'bandCount'
  Traceback (most recent call last):   File
  "/usr/share/qgis/python/plugins/processing/gui/AlgorithmDialog.py",
  line 249, in accept
      msg = self.alg._checkParameterValuesBeforeExecuting()   File "/usr/share/qgis/python/plugins/processing/core/GeoAlgorithm.py", line
  233, in _checkParameterValuesBeforeExecuting
      return self.checkParameterValuesBeforeExecuting()   File "/usr/share/qgis/python/plugins/processing/algs/saga/SagaAlgorithm212.py",
  line 343, in checkParameterValuesBeforeExecuting
      if layer.bandCount() > 1: AttributeError: 'QgsVectorLayer' object has no attribute 'bandCount'

  Python version: 2.7.12 (default, Jul  1 2016, 15:12:24) [GCC 5.4.0
  20160609]  QGIS version: 2.18.0 Las Palmas, b7fe4bb2

I run QGIS on ubuntu. Any ideas on how to solve this? Should i file a bug report, if so where?


texts:
I have a line shapefile that I use as network. I connect a set of point to it using "v.net operation connect" command. .

My questions are:

(i) how can I get the list of neighbors for each "connected" point (or the adjacency matrix between all the points)? I mean a list like A-B, A-D, B-A, B-C, C-D, C-B, ...

(ii) how can I simplify the network by dissolving/merging unnecessary edges between my points? I mean merging edges 1-2, 3-4, 5-6 and so on.

It seems quite simple but I am not able to manage it...


texts: MapInfo Pro 12.5 SQL to find road network lines that don't intersect

texts: I am editing a road network on one layer, and am looking for a quick way to show the roads that don't intersect (don't meet or overlap). Is SQL the best way to do it?  If so I am looking for how to produce the correct code in the 'where Condition' step in the SQL Select Window.


texts: Preventing rotation of symbols in ArcGIS Map service export request?

texts:
I have a system (ArcGIS Server 10.5, ArcGIS JavaScript 4.3) whereby I'm allowing the user to rotate the map, and then request a PDF output of the map.

I need to ensure that the symbology is always oriented upwards - i.e. not rotated with the dataframe.

I've updated the following registry key, and this helps ensure that when viewed in the MXD, and created as PDF output, the icons are oriented correctly, i.e. towards top of page/screen.

HKEY_USERS\[USERID]\Software\ESRI\Server10.5\Symbology\Settings\RotateWithTransform

However, in my web client, when my app does a MapServer export with rotation, the symbology is always oriented North - e.g.:

Is this normal behaviour? Labels are oriented correctly - see further example, again rotated 15 degrees:

Is there something I can do to ensure that the icons are not rotated?

Note - this is also asked at https://geonet.esri.com/message/687825-prevent-rotation-of-symbols-in-map-service-export-request


texts: PostGIS - find vertices on polygons without partners

texts:
My goal is to ensure that a set of boundaries have vertices that are co-incident where they intersect by a tolerance of 5m. So I am looking for orphan vertices that are not on an external boundary.

I constructed the following query:-

WITH POINTS_DUMP AS (
    SELECT (ST_DUMPPOINTS(ST_COLLECT(wkb_geometry))).*
    FROM boundary_table
), NO_PROXIMITY_POINTS AS (

    SELECT distinct on (A.path)
           A.geom,
        count(*) OVER (PARTITION BY A.path)
    FROM POINTS_DUMP A
    LEFT JOIN POINTS_DUMP B
    ON ST_DWITHIN(A.geom::GEOGRAPHY,B.geom::GEOGRAPHY, 5,TRUE)
    AND A.path != B.path

)
SELECT row_number() OVER () as fid,
       geom AS wkb_geometry
FROM NO_PROXIMITY_POINTS
WHERE count = 1

I believe this should give me the external boundary points (I will remove those later and any point on a boundary internally that is more than 5 metres from another point.

However, this is giving me all internal points and not the external boundary points. Surely if the count is "1" then the point must be an orphan?

What am I doing wrong?


texts: How to run an exported QGIS program as a stand-alone application?

texts:
I have a research partner who exported their QGIS algorithm to a python script, and my job is to use that Python file to create a web application that provides access to that algorithm.
My eventual workflow would look like this:

The user gives me several files on which the algorithm should operate.
I run the algorithm with those files as input
I send the resulting data back to the user for display/download

1 and 3 aren't too bad, those are web development problems. The second part is the hard one.
I'm stuck on figuring out how to do a few things:

Import qgis.core so that I can run the algorithm
The algorithm takes in a number of external files (.shp files and whatnot) as data, and I can't tell how exactly I'm supposed to feed them into the algorithm.
How to actually call the algorithm from the command line.

This script was build with QGIS's graphical editor, so it wasn't even originally written in Python. This is an automated export of the workflow he built.
My guess is that the script is meant to be run in the QGIS Python console, and so getting it to run on it's own in the server will take considerable plumbing, none of which I know how to do.
Does anybody have any experience doing anything like this?
The exported Python code just inherits from the QgsProcessingAlgorithm class and then has it's own initAlgorithm and processAlgorithm methods. But none of them seem to describe where the file inputs should be coming from, and I don't know how to run the code.


texts: Getting coordinates from click or drag event in Google Maps API?

texts:
I have made a Google Version 3 Geocoder , I want to be able to pick up the coordinates of the marker when it is dragged or clicked. Below is my code:

<!DOCTYPE html>

<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Google Maps JavaScript API v3 Example: Geocoding Simple</title>
<link href="http://code.google.com/apis/maps/documentation/javascript/examples/default.css" rel="stylesheet" type="text/css" />

<input id="address" type="textbox" value="Sydney, NSW">

<input type="button" value="Geocode" onclick="codeAddress()">

I have tried to use the following code to do this but it does not seem to work.

       // Javascript//
       google.maps.event.addListener(marker, 'dragend', function(evt){
       document.getElementById('current').innerHTML = '
Marker dropped: Current Lat: ' + evt.latLng.lat().toFixed(3) + ' Current Lng: ' + evt.latLng.lng().toFixed(3) + '
';
       });

       google.maps.event.addListener(marker, 'dragstart', function(evt){
       document.getElementById('current').innerHTML = '
Currently dragging marker...
';
       });

 map.setCenter(marker.position);
 marker.setMap(map);

 //HTML//

Nothing yet...


texts: Convert GeoJSON object to bounding box using Python 3.6

texts:
Is there a library available in Python 3.6 using which I could convert a GeoJSON object (geometry) into a bounding box object?

Actually I am calling a WMS layer from GeoServer and I want to set the bounds of the map to the bounding box of the requested polygon (WMS layer) so the only method I could figure out to get bounds of an individual polygon from geometry is to get the geometry of the polygon using a getfeatureInfo request of WMS service and then converting that geojson to bounding box at the backend.

If there is any other method that I could do to get the bbox of an individual polygon from geoserver using WMS service then please suggest it?


texts: FME : Value of attribute could not be converted to type 'date'

texts:
I am unable to integrate new data into a PostGIS table with FME, I get this error message. Yet, the original data in the Shapefile is already in date type. Some of the values are just 00000000 (when date is unknown), while others are YYYYMMDD.

Value of attribute 'xxx' could not be converted to type 'date'.
Feature will be logged and skipped
Attribute(encoded: UTF-8)   : xxx has value `00000000'
Attribute(encoded: UTF-8)   : xxx has value '19880101'


texts: Dxf drawings displaying as points but i need lines

texts:
I have an autocad dwg. which i then saved as a dxf. I have way to many layers in it such as contours, buildings etc. All I need is the red and blue lines. I cannot delete the other lines as they contain the georeference I think.

when i add a vector layer it displays as points which cannot be edited.

What am I doing wrong.


texts: Python Mapping in Matplotlib Cartopy Color One Country

texts:
I have plotted a map of the world using matplotlib Cartopy. Now I want to select a specific country in the map in this case the United States and change the color. I think this is possible but not sure? I also, don't know how to filter the data for a 'country name' or other data that might be contained in the file.

import matplotlib.pyplot as plt
import cartopy
ax = plt.axes(projection=cartopy.crs.PlateCarree())
ax.add_feature(cartopy.feature.LAND)
ax.add_feature(cartopy.feature.OCEAN)
ax.add_feature(cartopy.feature.COASTLINE)
ax.add_feature(cartopy.feature.BORDERS, linestyle='-', alpha=.5)
ax.add_feature(cartopy.feature.LAKES, alpha=0.95)
#ax.add_feature(cartopy.feature.RIVERS)
ax.set_extent([-150, 60, -25, 60])

All I want is two colors one for the United States and one color for all other countries.
Thanks for the help since I'm new to mapping via python.


texts:
Is there a way to share (linked) a style form one project into other projects so that if I change the style in the "source" project, it's updated in the destination projects?  QLR would be great if it maintained a link and referenced the QLR file each time the project is reopened.

I'm going to be producing a number of maps with varying projections, and would like to be able to adjust the style in one place and see it update in several projects.


texts: How to update coordinates in a geodatabase with FME?

texts: I have an excel file of points which are resurveyed with updated Coordinates.Now I want to update my existing arcsde geodatabase. How can i update only coordinates in FME?


texts: Feature filter for shapefile doesn't work

texts:
I have a multiline shapefile with EPSG 25832 and want to use the feature filter in the layer properties source tab.
The query looks like this:"Abweichung" = 'Revier 1 zu Pflegebezirk 1' and "Abweichung" = 'Revier 1 zu Pflegebezirk 4'
I hope that only these two lines appear in the map. When I test this expression there is no result for the where clause.


texts: Usig QGIS. What i wan't to do is to calculate the mean value of the point layers attríbutes in an area of 100x100m. I created a grid with a size of 100x100 m but i need a method for extracting and calculate the values from the Point-layers and get them into the grid.


texts: Circle features missing in PostGIS after import from ArcGIS using ogr2ogr

texts:
I have a ArcGIS feature class of geometry type polygon. It was created as a convex hull with a 200 meter buffer on a point dataset, aggregating rows on a particular field. The number of points used to generate each polygon is variable, starting at 1. I use ogr2ogr to upload from a personal geodatabase (.MDB) to a remote PostGIS database, and MapServer 5.4 to display. All features are uploaded successfully, but those polygon features that were generated from a single point do not plot using MapServer. Based on how the polygons are generated, all those based on a single point ought to be circles with radii of 200 meters.

In the PostGIS table the geometry field is empty for all those features, and following a tip I found here I tried "select st_npoints(wkb_geometry) from merged_dist_areas;" and it appears all the "missing" polygon features have no points at all, which may explain why they do not plot.

What can I do to plot these circles?


texts:
I'm trying to georeference a TIFF in QGIS2.0, 32Bit. The problem appears when QGis adds the map in my project, the map transforms into a black square and it goes to the wrong place. In the next image you can see the configurations of the transformation and the final result. in the other image you can see the where it is without georeferencing and where i want to place it.

Do you know why this is happening? Or other alternative way to do this?


texts:
I already had a look at Rendering huge amount of points

My situation is, I have huge amount of points (about 1 million). I have to display these points on a map. I searched but I found ArcGIS solutions. I want an open source one.

I started of with Leaflet. In Leaflet, we can cluster the points, but I can't do that, because my points represent a trend on surface of the Earth, and cluster loses that information.

What are my options?


texts: What is the area that OGR extracts from the (geometry) shp files for polygons?

texts: The ESRI July 1998 technical documentation for polygon shapefiles at page 10 makes no mention of either area measures or length measures (apart from byte/record-layout matters). Yet OGR enables me to extract the area for each polygon in a shapefile, and (after converting from square feet to square meters) it agrees to four decimals with what the Tatuk Editor reports for the same polygons, even though the shapefile dbf contains no such info; it must have come strictly from the shp, not the dbf.  The Tatuk Editor also reports the length, presumably the perimeter.  The quick processing time for both OGR in Python and the TE, for a file of about a quarter million polygon records makes me think the reported numbers are being retrieved, not calculated on the fly, perhaps from the bounding box.  It's hard to believe they really pertain to the polygons.  Can someone enlighten me about where the data are coming from and what is being measured?  I'm puzzled about the polygon length (which I don't know how to retrieve via OGR/Python geometry functions), as well as the area measure, but I'd be happy to get just one question answered for now.


texts: Assigning land values within buffer using ArcGIS for Desktop?

texts:
I'm new to ArcGIS and having some trouble getting this done.

I have a layer consisting of points of bird nesting sites and I have created a multiple ring buffer around this site, with rings at 5 km and 10 km. What I need to do is assign a value of "1" the area within the 5 km inner buffer ring and a value of "2" to the 10 km outer buffer ring so I have two separate values for the buffer. Does anybody know how I can do this? I'm using version 10.2.


texts: How to input number range in QGIS numerical column

texts:
I am working on some spatial data in QGIS(2.14.6). The dataset i am working on has a column house-number which is for addresses and it is numerical. In some cases the address is a number range ie 2-6 because the development is on 3 plots 2,4 and 6. Also note numbering is such that odd numbers are on one side and even numbers are placed on the other.
Does anyone have an idea of how to set up a numerical column in QGIS such that it can take a number range. I have tried the option of using a text/string column type but i dont see how i would be able to perform numerical operations such as greater or less than.
Below is an image showing an example of the plot layouts and some plots that has house numbers that is a range ie 1:5, 2:6, 14:16


texts: How to modify current QGIS canvas from python script?

texts:
I want to zoom into the current active QGIS canvas from a standalone python script.

I tried the following but it doesn't impact the current QGIS canvas:

import qgis.utils
canvas = qgis.utils.iface.mapCanvas()
canvas.zoomIn()

Can I modify the QGIS app from a standalone python script (not from the QGIS Python console)? If so, how do I do that?


texts:
I tried to create triger in geopackage so one layer would get updated by data from the other, both in the same geopackage. It worked perfectly within deskop Qgis but I get this error message in Qfield:

Trigger i added to layer 1:

CREATE TRIGGER "insert_trigger" AFTER
INSERT
ON "layer1"
BEGIN
UPDATE "layer1" SET "grid" = (select "col1"
from  "layer2" where
st_intersects(new."geom","geom")) WHERE
new."fid" == "fid";
END

I used qfield sync plugin to package project using "copy" layer configuration.
When using "offline editing" configuration i get no errors, fields are updated on sync as expected.

Trigger should be ok since it works in desktop. Geopackage is "mini database" with triggers in it by default that do work in qfield so trigger support shouldnt be a problem. What else could be wrong.


texts: How to make a geoprocessing service return results in a specific spatial reference

texts: I have made a geoprocessing service which retrieves data from my enterprise geodatabase. My geometries are stored in wgs 84 srid (4326), but i need my data to be returned with a different spatial reference, since I want to use them in a graphics layer, and as I know graphics layer in not reprojected on the fly.


texts:
The following was marked as duplicate of the question here, but I disagree:

the answers to that question all involve modifying the geometry or making derived geometries, and they deal with shading and transparency rather than fill patterns.  The question below clearly says those options have already been explored and do not do the trick.  I'm looking for a way that does not involve modifying the geometry or making derived geometries - let's face it, we're talking about a style here, not about ways to modify geometry - and is generic to any fill type or transparency level.  If this is still deemed a duplicate question, then the answer must be "no you can't do that as a style".

I'm new to arcgis but have been using qgis for a while.  Question on polygon styles in arcgis:

is there a way to make an 'inside buffer' outline or border style?  I know you can use the buffer tool to make an actual feature that is buffered by a number of geographical distance units, but for this case it would be much better to have a style that has a buffer (or halo) of a certain number of pixels regardless of zoom level, something like this quick hackjob in gimp:

solid line for the boundary of the polygon
inside buffer or halo of a crosshatch pattern >>that does not rotate as a function of polygon outline angle at that point<< (I tried a marker line inside halo (offset by a negative number) and it looks fairly dorky due to rotation along the line)
the rest is transparent

Can it be done?  Seems like this isn't that unusual of a thing to do.  Boundaries of all sorts are drawn this way on paper maps and they look quite nice.

Thanks in advance


texts: DLL load error calling 64 bit arcpy from subprocess

texts:
I have script that imports arcpy, then calls a python subprocess which also imports arcpy:

call.py:

import arcpy
import subprocess

cmd = [r'C:\Python27\ArcGISx6410.4\python', 'test.py']
subprocess.check_call(cmd)

test.py:

import arcpy
print 'imported!'

When I run C:\Python27\ArcGISx6410.4\python call.py, I get an import error:
ImportError: DLL load failed: %1 is not a valid Win32 application.

The stack trace (full text below) suggests that the 32 bit version of ArcPy is being called. Is it possible to call a 64 bit subprocess that imports arcpy from a 64 bit process that also imports arcpy?

I'm able to run this successfully if the subprocess is called using 32 bit python. Any idea why this isn't possible using 64 bit?

Full stack trace:

      File "test.py", line 1, in
         import arcpy
       File "c:\program files (x86)\arcgis\desktop10.4\ArcPy\arcpy__init__.py", line 22, in
         from arcpy.geoprocessing import gp
       File "c:\program files (x86)\arcgis\desktop10.4\ArcPy\arcpy\geoprocessing__init__.py", line 14, in
         from _base import *
       File "c:\program files (x86)\arcgis\desktop10.4\ArcPy\arcpy\geoprocessing_b
      e.py", line 14, in
         import arcgisscripting
      ImportError: DLL load failed: %1 is not a valid Win32 application.
      Traceback (most recent call last):
       File "call.py", line 5, in
         subprocess.check_call(cmd)
       File "C:\Python27\ArcGISx6410.4\lib\subprocess.py", line 540, in check_call
         raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['C:\Python27\ArcGISx6410.4\python'
      'test.py']' returned non-zero exit status 1


texts: Search window in Desktop ArcGIS 10.3.1 not opening after Windows 10 update?

texts: My computer has been running Windows 10 for almost a year and I haven't noticed issues with ArcGIS until the most recent update. Now the search window in 10.3.1 is not opening when I click the icon. There is no indication that ArcGIS is doing anything or recognizing the action in any way.


texts: Define transparent color in singleband pseudocolor raster layer style

texts: Can I somehow define "transparent" color for values higher than 32000 in raster layer? See the style dialog:


texts: Spatial decision support tools for spatial planning, licensing, and permitting, alternative to FlexiCadastre?

texts: I'm tasked to design and develop an information management system, i.e. GIS-based spatial decision support system to guide, inform, evaluate, and monitor regulatory processes in spatial planning, licensing, and permitting (e.g. mining, plantation concession, palm oil, timber production, etc.). This system must be simple, light, affordable, and sustainable to support local governments where hardware, internet, funding, and capacity are very limited. An example will be like FlexiCadastre (http://www.spatialdimension.com/Products/FlexiCadastre-Overview)  but should be mostly open-source based and account for slow/unstable local internet and electricity. I'm exploring QGIS plug-ins and would like to get recommendations from our community on other platforms or software to use?


texts: How to process GeoJSON data and create hive table for spatial analysis

texts:
I am using the ESRI-GIS tool for hadoop for analyzing json data generated through ESRI products like ArcGIS. But I wanted to analyze spatial data from a PostGIS table for which I made geojson formatted data from QGIS. When I tried to create hive table using this data and using the ESRI GIS tool for hadoop, the data is not getting loaded.

I tried different ways but failed. Are there any other ways that I can follow and proceed?


texts: Is there a convenient way to uniformly partition the United States into "buckets?"

texts:
I'm not a GIS professional, it's just that my current project is heavily reliant on geospatial data.
I'm currently working on a project that has to do with transportation behavior. My hypothesis is that the specific behavior I'm interested in has a regional component to it. For example, agents moving through New York might display this behavior more heavily than agents moving through Texas.
What I'd like to do is have the United States partitioned into uniform clusters (imagine if the states were all the same size) such that for any given transportation route that an agent takes, I can track the clusters that it travels through. This linepath can then be used as input into my main model of interest.
I had considered Zip Codes, as they appear to be roughly uniform, but I have a fear that they are too small/too granular for my purposes. Zip Code Regions have the opposite problem: they are too big.
One other constraint I have is that I work with latitudes and longitudes exclusively. So if a system exists that can take a (lat,long) pair and map that to a cluster, that would be the most ideal solution.


texts: Numbering like values in new attribute table field using field calculator of ArcMap

texts:
I am using ArcMap 10.6.
In an attribute field, I have 1000s of records.
I am wondering if there is a way to use the field calculator to get this desired result:
Species | Label
A | 1
A | 1
D | 2
D | 2
F | 3
F | 3
I could use an if-elif statement, but I have 100s of unique values and would like to assign a number to them.


texts: "Merging" 2 layers of LineString with splits at intersections

texts:
I would like to "merge" 2 networks of lines and these lines need to be split when they intersect. With pictures it should be clearer :

What to do:

if a black line intersects a red line, they should be split
a line can be split in more than 2 parts
I would like to keep line IDs (for example, a red_line_001 can be split into red_line_001_01 + red_line_001_02 + red_line_001_03)

Restrictions:

each network may have more than 100000 lines
the algorithm should be efficient
I need to do it in Python
If possible, I would like to use Shapely, OGR-GDAL and/or Fiona
If possible, it should work with more than 2 networks

I already did this work with PostGIS and it was quite efficient (but not generic and worked only for 2 networks).
I do not want you to solve this problem for me, I just need some hints and advice about what is the best solution to my problem.


texts: Are there any attempts to replace the shapefile?

texts:
Recently I've been spending a lot of time converting perfectly good field names like "Percent of citizens age 25 and over with a bachelor's degree or higher" into things like "edbchogtr" to meet the DBF's 10 character field name limit.

In another thread (“Oddities” in the Shapefile technical specification), geospatialpython commented that "Despite the shapefile format's flaws, oddities, and limitations it persists stubbornly in and around the field of GIS. Every other attempt to replace it has been too bloated for simple vector storage or too proprietary."

This activity coupled with Mr. Lawhead's comment has me wondering:

have any explicit attempts ever been made to replace the shapefile as GIS's ubiquitous data storage and interchange format?
Are there any contenders?
If there have been competing formats, why have they failed?
Has Esri refused to support them, or is the story simply one of technological inertia?
If there haven't been attempts... why not?

It seems like we could do a little better for ourselves, both as GIS developers and users.


texts:
I have an ArcSDE geodatabase with different versions for each user.

How can I list each version using ArcPy?


texts: XML Error with exporting table from polyline shapefile

texts:
I am trying to export a selection from an attribute table to an output and am enountering the following error (currently working in South America, so it's in Spanish, but it just says there is an invalid character in the text).

Can anyone help with this? There doesn't seem to be an invalid characters and other similar tables export well.

Thanks for your help.


texts: Can i cache the result of a geoprocess on the ArcGIS server?

texts:
I have several geoprocessing services on my ArcGIS server:

baseGeoService
geoService1
geoService2

Services #2 and #3 take as input the output of baseGeoService, therefore i would like to be able to cache the result of baseGeoService on the server so the client won't have to send the result of baseGeoService to the server.

I access the services via the rest API.


texts: Does GRASS GIS work on latest Macs with M1 chip?

texts: Does GRASS GIS work on Macs with M1 chip?


texts: Complexity of US 5-Digit Zip Code Boundaries from Scratch?

texts:
Does anyone have any idea how difficult it would be to create 5-digit zip code boundaries from scratch?

Let's suppose you start with a good outline of the US. Where would you source the fundamental zip code routes (I cannot find it on USPS.com)?

How much time and computing power are required to transform this data into reasonable polygons (I'm not looking for the most accurate)? Are open-source tools up to the job or are specialist tools required e.g. ArcGIS? Maybe you'd need to tackle it State by State?  What sort of budget is required? Anyone got any insights?


texts: gdal/geopandas data object compatibility in python

texts:
Is it possible to convert an ogr datasource into a geopandas GeoDataFrame without writing the datasource first as a physical file and reading it back? I am referring to something like

import ogr, geopandas

drv = ogr.GetDriverByName('MEMORY')
source = drv.CreateDataSource('test')
gdf = geopandas.GeoDataFrame(source)

The above throws an error:

  Traceback (most recent call last):   File "", line 1, in
     File
  "C:\ProgramData\Anaconda2\envs\wps_env36\lib\site-packages\geopandas\geodataframe.py",
  line 47, in init
      super(GeoDataFrame, self).init(*args, **kwargs)   File "C:\ProgramData\Anaconda2\envs\wps_env36\lib\site-packages\pandas\core\frame.py",
  line 422, in init
      raise ValueError('DataFrame constructor not properly called!') ValueError: DataFrame constructor not properly called!

Which I get, no problem. However I find it hard to believe that you can't transfer data objects from ogr to geopandas and back without writing to physical files. What if you don't want to write a file because it is some part of an intermediate process you are trying to run?

Short of recreating the datasource feature by feature, geometry by geometry, field by field and, worst of all, transferring all the spatial reference data by writing custom wrapper functions, is there a way for ogr and geopandas to communicate?


texts: Get a pop up text note when opening a tab file

texts: I know this is possible as I have done it before but I need a text note (pop up) to open when a tab file is opened. I know it's a simple one-line in the .tab file but just can't recall what the line is and can't find any info on it.


texts:
I'm using the parcel fabric and I need to display the 'Distance' for each line of the drawing (it's a neighbourhood). I have to display only one value for each line of the block of lots, and so under 'Placement Properties' I have to select 'Remove duplicate labels'.

Another requirement is that the distance is set in meters, so I use the expression ´round([Distance],2)' - the result is 1.50, for example.

The problem is that some lots have lines that are not overlapping but they share a node (not the entire line) and simply do not appear. The reason I figured out is that when rounded they have the same 'value' and the ArcMap understands they are duplicate.

For other rounded values (x,xxx or 1,502, for example) it does not happen, but unfortunately I have to use the format 'x,xx'.

I'm using Arcmap 10.2.2.


texts: Calculate a polygon around a point - and conver to WKT

texts:
The use case I have is this: I want to take points (in my case a data.frame of lat/long coordinates) and calculate a polygon around each point of a given radius (in km, miles, whatever). To be clear, not a polygon around all points at once, but a polygon around each point separately. This seems like it would be straightforward, but how does one do this in R?

The next thing I want to do is take those polygons and get well-known text (WKT) polygons because the web API I am querying against wants WKT. I think I can get a WKT polygon using rgeos like

library(rgeos)
g3 <- readWKT("POLYGON((1 1,5 1,5 5,1 5,1 1),(2 2,2 3,3 3,3 2,2 2))")
writeWKT(g3)

[1] "POLYGON ((1.0000000000000000 1.0000000000000000, 1.0000000000000000 5.0000000000000000, 5.0000000000000000 5.0000000000000000, 5.0000000000000000 1.0000000000000000, 1.0000000000000000 1.0000000000000000), (2.0000000000000000 2.0000000000000000, 3.0000000000000000 2.0000000000000000, 3.0000000000000000 3.0000000000000000, 2.0000000000000000 3.0000000000000000, 2.0000000000000000 2.0000000000000000))"


texts: merge national hydrography dataset files

texts:
I'm having difficulty merging datafiles from the NHD while still keeping functionality as a geometric network. I'm using ArcGIS 10.1, so the USGS merge tool isn't an option.

Using the medium resolution staged NHD files, I've tried 1) merging the NHDFlowline files and then building a geometric network - results in a network with "Indeterminate Flow" and 1 type 12 error; and 2) putting two NHDFlowline files into a new Feature dataset inside of a file geodatabase, then constructing the geometric network - results in a network with "Indeterminate flow" also.

Not sure if I am mis-specifying the geometric network attributes, missing a step or something else.


texts: How to add Lat/Lon (decimal degree) values in Attribute table field in ArcGIS?

texts: I have a point shapefile (WGS 1984, GCS) with some random data points. I want to add the latitude and longitude in attribute field.


texts: Rotation angle is clockwise or counterclockwise?

texts:
Does QGIS use clockwise or counterclockwise angle?
In Esri Desktop, I can change rotation style from Geographic to Arithmetic.

In QGIS, is there any way to change the Rotation Style to make it use counterclockwise angles?


texts: How to create openlayers3 Popup with OpenLayers.Popup.FramedCloud UI design

texts: I want the look of popup in OpenLayers.Popup.FramedCloud to my openlayers3 popup , that makes my highlited feature more clearly and the information is shown in the popup as table form data.


texts: Polygon to polygon spatial join without double counting join features using ArcGIS Desktop

texts:
I am a new GIS user trying to aggregate local ward-level voting data up to a broader county-level using a Spatial Join.

Generally a given ward is within only one county, so a JOIN_ONE_TO_ONE for the join_operation with a sum Merge Rule and CONTAINS as the match_option should work. The problem is that the ward and county boundaries aren't always coincident, and some wards are partially within two adjacent counties.

In this case a CONTAINS Match Option results in undercounting because some wards aren't included anywhere in the out_feature_class. I tried using INTERSECT as the Match Option instead but this results in some double counting in the Output Feature Class.

Is there a simple way to ensure that a join feature is included in only one target feature?

Perhaps with a "if > 50% of the join feature is within the target feature" or similar expression.

I'm using ArcGIS Desktop 10.6.


texts: How does Leaflet layer ordering work with CartoDB layers?

texts:
All,

I'm trying to figure out how Leaflet layer ordering works when you have layers coming from CartoDB. I have a map with 1 polygon layer (cartodb), 3 point layers (cartodb), 1 basemap layer (mapbox) (and in the future hope to add tabletopJS or another google spreadsheet conduit...)

The Leaflet Layers example seems straight forward when using cloudmade layer URL's that end in the {z}/{x}/{y}.png format, which will work for Mapbox as well.

However, I can't see how to get the {z}/{x}/{y}.png format for a CartoDB layer, and wonder if the same interactivity will be supported (custom infowindows, etc.)

So far I have tried this to no avail:

function layersMap() {
    var voices = cartodb.createVis('map', 'http://opendetroit.cartodb.com/api/v2/viz/08140c18-8a05-11e3-ae46-0e49973114de/viz.json');
        devPoints = cartodb.createLayer('map', 'http://opendetroit.cartodb.com/api/v2/viz/62a64dd6-4d7d-11e3-b48c-db82dabd16be/viz.json');
    var points = L.layerGroup([voices, devPoints]);
    var map = new L.map('map', {
    center : [42.339926, -83.04137],
    zoom : 13,
    layers: [points]
    });

}

The problem with this attempt, however, is the 2nd layer doesn't draw, and there is actually two zoom controls displaying.

This is as close a solution as I can find by going through as much info on GIS.SE, Leaflet docs, CartoDB docs, etc.

So it seems I might be on the right track by getting 1 CartoDB layer to display...but not sure where to go from here...


texts: I want to georeference jpg map without any digitizing data

texts: I have only a jpg map but don't have any digital data for georeferencing that jpg.  So is there any way for georeferencing my map (like googlemaps)?


texts:
I found recently that strange thing is happening when I right click on selected script or layer in a table of content. Some items of pop-up menu are faded:

If I repeat right click 3 or more times, they become available. Another option is keyboard shortcut Shift+F10, which is far from ideal. It happens on a long lists, e.g. over 15 layers in the table of content.

I am using ArcGIS 10.5.1 and I have a suspicion that this is yet another windows update, the latest I have is "Feature update to Windows 10, version 1903", early September.

This is not happening in other applications, e.g. explorer. It seems specific to ArcGIS. It looks like a minor thing, but I found it very annoying.

Are you experiencing this behavior and hopefully know how to fix it?


texts: Citing old version of QGIS in bibliography of assignment?

texts:
I've used QGIS 2.4.0-Chugiak to create maps for my assignment.
I would like to know what is the correct way to reference QGIS in-text and in the bibliography.

I've looked up Citing QGIS in formal publications? and I found that I'm supposed to use this:

  QGIS Development Team (YEAR). QGIS Geographic Information System. Open
  Source Geospatial Foundation Project. http://qgis.osgeo.org

I've no idea what year I'm supposed to put in the parenthesis for the version I used and the link doesn't work for me. could someone please tell me in a clear way how I'm supposed to do it?


texts: Adding pop-up to GeoJSON layer in Leaflet

texts:
I'm new to working with the Leaflet API and am running into trouble with creating popups for a GeoJSON layer. I've looked at the following post as a reference and am still having difficulty:
binding nested arrays as geojson popups in leaflet

My GeoJson data looks like:

{
    "type": "FeatureCollection",
    "features": [
        {
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.97364044189453,
                    40.66893768310547
                ]
            },
            "type": "Feature",
            "properties": {
                "lon": -73.97364044189453,
                "lat": 40.66893768310547,
                "version": "1.1",
                "t": 1381167616,
                "device": "iPhone3,3",
                "alt": 67,
                "os": "6.1.3"
            }
        },
        {
            "geometry": {
                "type": "Point",
                "coordinates": [
                    -73.96121215820312,
                    40.66240692138672
                ]
            },
            "type": "Feature",
            "properties": {
                "lon": -73.96121215820312,
                "lat": 40.66240692138672,
                "version": "1.1",
                "t": 1381171200,
                "device": "iPhone3,3",
                "alt": 45,
                "os": "6.1.3"
            }
        }

    ]
}

My leaflet js is as follows:

// create a variable to load Stamen 'toner' tiles
var layer = new L.StamenTileLayer("toner");

// initialize and set map center and zoom
var map = L.map('map', {
    center: new L.LatLng(40.67, -73.94),
    zoom: 12
});

// create the map
map.addLayer(layer);

// on each feature use feature data to create a pop-up
function onEachFeature(feature, layer) {

    if (feature.properties) {

        var popupContent;
        popupContent = feature.properties.t;

        console.log(popupContent);
    }
    layer.bindPopup(popupContent);
}

// grab the processed GeoJSON through ajax call
var geojsonFeature = (function() {
        var json = null;
        $.ajax({
            'async': false,
            'global': false,
            'url': "/data/test_random.json",
            'dataType': "json",
            'success': function (data) {
                json = data;
            }
        });
        return json;
    })();

// create an object to store marker style properties
var geojsonMarkerOptions = {
    radius: 10,
    fillColor: "rgb(255,0,195)",
    color: "#000",
    weight: 0,
    opacity: 1,
    fillOpacity: 1
};

// load the geojson to the map with marker styling
L.geoJson(geojsonFeature, {

    style: function (feature) {
        return feature.properties && feature.properties.style;
    },

    onEachFeature: onEachFeature,

    pointToLayer: function (feature, latlng) {
        return L.circleMarker(latlng, geojsonMarkerOptions)
    }
}).addTo(map);

The console.log(popupContent); call within the onEachFeature function is returning data, however when I click on the GeoJSON points in the map I get the following error:
Uncaught NotFoundError: An attempt was made to reference a Node in a context where it does not exist.

I've tried looking into this with no success so far.


texts: Using ArcGIS.com map that is not shared with everyone from ArcGIS API for JavaScript?

texts:
I like to use the ArcGIS.com to create a map with operational layers on top of a baselayer. I would like to have the Content and Map as private but to show the map in an application built with JavaScript API. I tried using the new IdentityManager to make the application turn up a login dialog. It does, but I get: "Invalid username/password. Please try again."

I'm a newbie on ArcGIS.com and JS so might have mixed up something, does anyone know if it's possible to access maps that are not publicly shared? There is no problem to access the map using createmap as long as the map is share to everyone.


texts: Unicode encoding problem in ogo2ogr GeoJSON export from PostGIS

texts:
I have few tables those have some unicode value of different language. When I am trying to export the data from PostGIS to GeoJSON using ogr2ogr the returned GeoJSON showing wrong unicode language like this

  áƒ‘áƒáƒœáƒ’áƒšáƒáƒ“áƒ”áƒ¨áƒ

I am using the following command to the export job

ogr2ogr -f GeoJSON /opt//data.geojson PG:"host=localhost dbname=test user=postgres port=5432 password=12345678 tables=data" -t_srs EPSG:4326 -lco ENCODING=UTF-8


texts: Raster error 'TypeError: Can't multiply sequence by non-int of type 'float' when creating Arcmap script

texts:
I am writing an Arcpy script to use in ArcMap (ArcGIS 10.7.1) as a tool to interpolate existing soil points, and make a nutrient recommendation afterwards. However, I'm getting the TypeError: can't multiply sequence by non-int of type 'float' error, and I'm not sure what's going on. The funny thing is that this script will run as  a standalone script, but when I upload it into Arcmap to be used as a tool, it gives me this error. How can I fix the problem?

The code I have is shown below. I have commented out the Arcmap parameter type that I set each parameter as when I upload the script as a tool.

#Importing required modules
import arcpy
from arcpy import env
from arcpy.sa import *
from arcpy.da import *

#Environment settings
env.workspace = #Workspace parameter
env.overwriteOutput = True

#Set main field parameters
fieldBoundary = #Feature class
soilPoints = #Feature class (points to be interpolated)

crop = #String, indicating crop type
yieldGoal = #Long integer, such as 200
nField = #Field (of the soilPoints) indicating nitrogen levels at each point
organicMatter = #Field (of the soilPoints) indicating organic matter at each point
previousCrop = #String indicating previous crop grown

#Check out extensions
arcpy.CheckOutExtension("Spatial")
arcpy.CheckkOutExtensison("3d")

#Interpolate nitrogen soil points
field = nField
n_krig = Kriging(soilPoints, field, kModelOrdinary, cellSize, kRadius, outRaster)
nitrogenField = ExtractByMask(n_krig, fieldBoundary)

#Interpolate organic matter soil points
field = organicMatter
om_krig = Kriging(soilPoints, field, kModelOrdinary, cellSize, kRadius, outRaster)
organicMatterField = ExtractByMask(om_krig, fieldBoundary)

#Set previous crop adjustments, which will be based off of user selection in parameters
if previousCrop == "Corn":
           pca = int(0)
        elif previousCrop == "Wheat":
            pca = int(0)
        elif previousCrop == "Milo":
            pca = int(0)
        elif previousCrop == "Sunflowers":
            pca = int(0)
        elif previousCrop == "Soybeans":
            pca = int(40)
        elif previousCrop == "Alfalfa: >5 plants/square foot":
            pca = int(120)
        elif previousCrop == "Alfalfa: 2-5 plants/square foot":
            pca = int(80)
        elif previousCrop == "Alfalf: 2-3 plants/square foot":
            pca = int(40)
        elif previousCrop == "Alfalfa: <2 plants/square foot":
            pca = int(0)
        else:
            pca = int(0)

#Nitrogen needs equation. Produces a raster output
#ERROR OCCURS AFTER THIS LINE

nitrogen_recommendation = ((1.6 * yieldGoal) - (organicMatterField * 20) - (nitrogenField) - (pca))

Traceback (most recent call last):
  File "C:\script.py", line 125, in <module>
    nitrogen_recommendation = ((1.6 * yieldGoal) - (organicMatterField * 20) - (nitrogenField) - (pca))
TypeError: can't multiply sequence by non-int of type 'float'


texts: Creating Buffer Polygon following Elevations using ArcGIS Desktop?

texts:
What I'm looking to do is put a 100 m buffer on a polygon, but rather than the buffer being at a fixed width "as the crow flies" I want it to follow the slopes of my Lidar DEM.

I have ArcMap (with 3D Analyst). Sadly no Spatial or Network Analyst Extension with ArcMap.

I have kind of been all turned around by the internet looking into Proximity Analysis, Path Distance Analysis, and Anisotropic Cumulative Cost. It looks like I need to somehow make a time-cost grid and find out how long it would take to reach 100 m from the polygon, but that seems rather backward. The vast majority of these tools seem to be made to find the easiest route between two points.

Has anyone done this before?


texts:
I'm working on map series in ArcGIS Pro, where I'm generating 5129 maps using fixed layout, though till now I got output which is needed for my project, like using dynamic text but I'm facing one problem in data frame, where I want to show the location of active view in main data frame into another data frame, same as showing state into country map.

The problem is, in data frame I want to show only groups which share some specific relation in attribute, like suppose we have 50 states and we made groups with respect to geographic condition, and only those selected features should be displayed in data frame and one which is active in main data frame needs to be displayed with different color.

Above condition is applicable to 2nd data frame.

Edit for clarification

in 3rd image we can see the cluster number '500_ptv-2_02', i want to show in dataframe only the data which follow the condition and not the other values eg. '500_ptv-1_05' and the active feature should be displayed in highlighted form.


texts: Generating shapefiles from WKT format polygons using Arcpy?

texts:
I am working with a database containing a geography field representing the Admin1 boundaries of countries. I would like to draw a map of the Admin1 boundaries of Somalia:

params = urllib.quote_plus(...)
engine = sqlalchemy.create_engine("mssql+pyodbc:///?odbc_connect=%s" % params)
query = ("SELECT SimplifiedCoords.STAsText() FROM Adm1GeoBoundaries WHERE (Adm0Code = '226')")
df = pd.read_sql(query,engine)

this returns a list of the 18 subdivisions, e.g.:

0  POLYGON ((44.661 3.2516, 44.611 3.2715, 44.410...
1  POLYGON ((49.0611 9.571, 48.561 9.541, 48.061 ...
2  POLYGON ((44.2362 10.4724, 44.2021 10.5066, 44...

Each row is a pandas series instance.
My issue now is to convert these into json then shapefiles in order to map them (using arcpy). So far I have tried (I only focus on one polygon to test):

wkt = (df.loc[0]).to_string() # as loads() expects integer or string adress
g1 = loads(wkt)

But this throws :
"ParseException: Expected number but encountered word: '44.410...'
and the Error is "ReadingError: Could not create geometry because of errors while reading input.".

I also tried the following:

sr = arcpy.SpatialReference(4326)
g1 = arcpy.FromWKT(wkt,sr)

But this has not led me anywhere yet.


texts: Is there an existing library for converting ArcGIS Features to Json?

texts: Is there an existing library for converting ArcGIS IFeature types to and from Json/GeoJson?


texts: Cannot load postgis layer from sql string in pyqgis

texts:
I'm trying to load a layer using the following code in qgis python console:

sql = "(select the_geom, ID from mytable)"
uri = QgsDataSourceURI()
uri.setConnection("localhost","5432","mydb","postgres","XXXX")
uri.setDataSource("myschema",sql,"the_geom","","ID")
vlayer = QgsVectorLayer(uri.uri(),"LayerName","postgres")
QgsMapLayerRegistry.instance().addMapLayer(vlayer)

It doesn't add the layer but also doesn't return any error.

I'm using QGIS 2.4.0-Chugiak


texts: How calculate distance between nearest point in one layer

texts: I have points from polyline. I need to calculate distance between point to nearest pont. For example.  i have ponts with id 1-5 a need to calclulate distance between  1-2  2-3  3-4 4-5   because i need information about distance between point 5 and point 1. But not straight distance , i need curved distance.


texts:
I'm actually trying to merge one of my python program inside a QGIS 3 plugin.
But I'm unable to run my simulation without freezing UI.

I tried several methods, first just calling a function on click, then I tried using QThread but only found examples for Qt4, and GUI froze again.
Finally I tried to rewrite a QgsTask object following the PyQgis Cookbook.

But I always end with a frozen GUI, no matter how I write this class...
I tried:

An object inheriting from QgsTask only which run function is calling the run() function from my simulation
Multiple inheritance : a class inheriting both from my Simulation object and the QgsTask object, rewrote the run() with the one from my simulation...
I tested this double inheritance in a dummy class outside of gui and it is working all right, as my Simulation class.

I'm not sure but it looks like multiple mains() from QGIS and my own objects is kind of a mess. It's freezing but in facts simulation is not running and outputdir isn't created.

Here is my class:

class QGISimulationTask(QgsTask, Simulation):
    def __init__(self, params):
        desc = 'Simu ' + str(params.split()[2:5])
        Simulation.__init__(self, user_params=params, interface='qgis')
        QgsTask.__init__(self, description=desc, flags=QgsTask.CanCancel)

    def run(self):
        self.init_project()
        self.beginTime = time()
        preLog = 0
        c = 0
        for year in range(2015, self.finalYear + 1):
            ...

    def finished(self, success):
        if success:
            self.compute_results()
        else:
            QgsMessageLog.logMessage('Échec de la simulation', Qgis.Critical)

    def cancel(self):
        super(QgsTask, self).cancel()
        self.reset()
        QgsMessageLog.logMessage('Simulation annulée', Qgis.Info)

Other classes, in separated py files :

Ui
Widget inheriting Ui
Simulation
SimlationTask inheriting from QgsTask and Simulation
PluginClass with a start() method to create a SimulationTask object on click.

how I'm starting a task :

        self.task = QGISimlationTask(params, self.dockwidget.Simu_progressBar)
        # QgsApplication.taskManager().addTask(self.task)

Seems like it's freezing during init (before I add it to the manager...)

Any ideas ?


texts: CSV not exporting in decimal latitude and longitude as expected

texts:
The issue I'm having is that when I go to export the XY co-ordinates of point data to a CSV file, I'm getting metres in the columns instead of the decimal degrees I was expecting. I've tried all variations of setting both in the project preferences and the export pane, but still getting the same result.

I've looked around this forum, I've tried all the solutions offered on other posts, but I still get metres in my export, instead of decimal degrees. It used to work without any change to the default settings. I may have check a box somewhere, but I can't see it.

This is what I get on export

And here are the settings on the export:

The co-ordinates are displaying as decimal degrees in the main viewer window:

I've spent way too long trying to fix this.


texts:
I have one layer group glayer1 cached and I get the tiles from GWC. In glayer1, some layers are not queryable.

I have layer2 which is queryable and contains short information.

glayer1 is visible, layer2 is in the map but is not visible.

How can I use wmsgetfeatureinfo triggered in glayer1 but returning information from layer2 as an elegant solution?


texts: Reading Sentinel2 ROI using GDAL and vsizip without downloading the whole image

texts:
I would like to read Sentinel2 data from remote using GDAL and /vsizip so to access just a portion (let's say a square of about few hundreds meters) of each image, from which extract and display just the bands of interest on-the-fly, without downloading the whole, huge dataset from the server.

Do you think is feasible? Also, I would like to use python, and not Google Earth Engine.


texts: Control RasterAsPointCollection plotting granularity for the GeoServer in SDL file?

texts:
I  am using the geoserver to create windcharts. This works perfectly fine, except that the data is not plotted in a clean grid, i.e. the granularity of the wind barbs along the vertical axis is a lot higher than along the horizontal one:

My weather datasource is a GeoTiff in EPGS:4326, the windchart is in EPSG:4326 as well.
Is it somehow possible to control the granularity of the vertical axis and the horizontal axis separately?

The relevant section from my style sheet is:

....
<ogc:Function name="ras:RasterAsPointCollection">
    <ogc:Function name="parameter">
        <ogc:Literal>data</ogc:Literal>
    </ogc:Function>
    <!-- Activate the logic to recognize the emisphere -->
    <ogc:Function name="parameter">
        <ogc:Literal>emisphere</ogc:Literal>
        <ogc:Literal>True</ogc:Literal>
    </ogc:Function>
    <ogc:Function name="parameter">
        <ogc:Literal>interpolation</ogc:Literal>
        <ogc:Literal>InterpolationBilinear</ogc:Literal>
    </ogc:Function>
    <ogc:Function name="parameter">
        <ogc:Literal>scale</ogc:Literal>
        <ogc:Function name="Categorize">
            <ogc:Function name="env">
                <ogc:Literal>wms_scale_denominator</ogc:Literal>
            </ogc:Function>
            <ogc:Literal>64</ogc:Literal>
            <ogc:Literal>100000</ogc:Literal>

            <ogc:Literal>32</ogc:Literal>
            <ogc:Literal>500000</ogc:Literal>

            <ogc:Literal>8</ogc:Literal>
            <ogc:Literal>1000000</ogc:Literal>

            <ogc:Literal>4</ogc:Literal>
            <ogc:Literal>2500000</ogc:Literal>

            <ogc:Literal>2.0</ogc:Literal>
            <ogc:Literal>5000000</ogc:Literal>

            <ogc:Literal>0.8</ogc:Literal>
            <ogc:Literal>10000000</ogc:Literal>

            <ogc:Literal>0.4</ogc:Literal>
            <ogc:Literal>20000000</ogc:Literal>

            <ogc:Literal>0.3</ogc:Literal>
            <ogc:Literal>60000000</ogc:Literal>

            <ogc:Literal>0.1</ogc:Literal>
            <ogc:Literal>70000000</ogc:Literal>

            <ogc:Literal>0.07</ogc:Literal>
            <ogc:Literal>140000000</ogc:Literal>

            <ogc:Literal>0.05</ogc:Literal>

        </ogc:Function>
    </ogc:Function>
</ogc:Function>

If I use another projection (e.g. EPSG:3995) I end up with a completely unusable view at the poles:

How can I control the sampling of the raster source in a way that a regular grid of points is drawn in the target projection?

REMARK 2020-02-26
Apparently this issue only exists for GeoTiff stores. When I switch to Grib or NetCDF format, then scaling for the vertical axis works.
Unfortunately, with those formats another issue related to wrapping exists: Geoserver does not wrap GRIB raster points to coordinates where x < 0


texts: Creating geodatabase from CSV using python

texts:
I have a file with weather data (daily) for multiple weather stations for multiple years. I am looking for some python script to automate the database creation process and its interpolation on a daily basis. The weather data looks like this:

YEAR    MONTH   DAY     Date        STID    TMAX    TMIN    TAVG
2000    1       1       1/1/2000    WENT    72.63   44.02   58.27
2000    1       1       1/1/2000    DKOM    70.66   40.77   55.76
2000    1       1       1/1/2000    OLLU    73.15   33.47   51.67
2000    1       1       1/1/2000    LKNP    -999    -999    -999
2000    1       1       1/1/2000    OWNB    70.88   32.01   52.2
2000    1       1       1/1/2000    ANTL    71.85   31.13   51.66

There is a separate shapefile that is associate with the location of the weather stations. How do I create database using python script so that it can be used later for spatial interpolation? Thanks in advance.


texts: I have 6 images from Landsat 8 (Green,Red,NIR,SWIR1,SWIR2,NDVI). When I want to layerstack them with "Merge" I always get a result tif which is just black and white, however I can see that all 6 bands contain values. When I save them with "Virtual Raster" and the option "Seperate" i get the result I want. But when I want to save the virtual raster with "Save as" Gtiff I get just a data which contains 0 KB. Anyone has a idea how to fix this?


texts: How to share SVG styles with other users in QGIS projects

texts:
So I'm publishing a project with web layers so that other people can just download it and do their work

Problem is that even when I save the SVG path, when I go back to the project, the icon does not appear properly. On new machines it just shows up a ? instead of the pins

is there a way that these can be integrated onto a project, for example by using a shared folder?


texts: Time series analysis of NDVI using Google Earth Engine

texts:
I want to create a chart of annual NDVI for a specific region. The output should be one NDVI value for that region for each year.
I tried the following code and so far was able to get an image collection that consists of annual NDVI image. But I am not sure how can I chart OR export the data? The "chart" part of the code is showing error.

  //Importing image and geometry:
var l8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA"),
    geometry = /* color: #d63000 */ee.Geometry.Polygon(
        [[[-80.92489760146748, 25.433457120928352],
          [-80.64474623427998, 25.488013471687964],
          [-80.57882826552998, 25.710940372707608],
          [-81.02377455459248, 25.770317250349557],
          [-80.95236342177998, 25.552457242621447]]]);

//Filtering date, polygon, and cloudiness
    var image = l8.filterDate ('2014-01-01', '2018-12-31')
                .filterBounds (geometry)
                .filterMetadata ('CLOUD_COVER', 'less_than', 20);

    //NDVI calculation:
    var ndvi_func = function (i) {
      var ndvi = i.normalizedDifference (['B5', 'B4']).rename ('NDVI')
      return i.addBands(ndvi);
    }

    var image_ndvi = image.map(ndvi_func);

    //Calculating year wise NDVI
    var year = ee.List.sequence(2014,2018);
    var year_func = function(y){
      var range = ee.Filter.calendarRange (y, y, 'year');
      return image_ndvi.select('NDVI').filter(range).mean().set ('Year', y)
    };
    var yearwise_ndvi = ee.ImageCollection(year.map(year_func));
    print (yearwise_ndvi);
    Map.addLayer (yearwise_ndvi)

//Creating time-series chart:
        var chart = ui.Chart.image.series ({
          imageCollection: yearwise_ndvi,
          region: geometry,
          reducer: ee.Reducer.mean(),
          scale: 30
        }).setOptions ({title: "NDVI over time",
          hAxis: {title: 'Time of the year', format: 'year'}
        });

        print (chart);


texts: Dissolving closest area or area with biggest shared boarder

texts:
I am almost finished with a very large districting project but I'm having problems with this last step.

I am using ArcMap

I have made districts that needs to be larger than 150 residents. My last code has finished it all but I still have a few areas that does not quite hit the required goal. What I want to do, is to dissolve these few areas that are too small with either the area that is shares the biggest boarder with or the closest area if it is not connected directly. I have made a new field called "areasmall" that I coded 0 for correct size (larger than 150) and 1 for too small (smaller than 150). I need a way to automate the dissolve process so that areas that have 1 in areasmall are dissolved into an area with 0 in areasmall and sums up the resident count in the "residents"-field. I work with python, so code would be great! I have included a picture where the red areas are the big ones and the yellow are the small ones.


texts: Limiting search only for freight railway/road in overpass turbo?

texts:
The following Overpass Turbo query seems to work, but I want only railways and roads that can be used for freight transportation:

<osm-script output="xml">
<id-query {{nominatimArea:Nürnberg}} into="area"/>
<query type="way">
  <has-kv k="railway" regv="rail|freight|main|DB Netz"/>
  <area-query from="area"/>
</query>

<!-- added by auto repair -->
<union>
<item/>
<recurse type="down"/>
</union>
<!-- end of auto repair -->
<print mode="body" order="quadtile"/>
</osm-script>


texts: Which R package has basic map data of Europe embedded?

texts:
Where can I find open source map data for countries in Europe?
I need geographical data such as borders, rivers,elevation
and I need also statistical data (population, etc.)

Is there by chance an R package available, what would provide me basic data of european countries, which I could extract countrywise?


texts: I was trying to use gdalwarp inside a qgis 2.0 model via processing but I think that the implementation is not working properly. So I would like to know if anyone has encountered this problem?


texts: Batch Edit GeoJSON Markers with Mapbox.js

texts:
I cannot figure out how to style all feature points from a local GeoJson file at once using the Mapbox.js. My GeoJSON file has roughly 500 points. I could go through each point in the GeoJSON file and set their properties individually but that is impractical because of the number of points in my file. I'm able to display my points on my map with the code below but can't figure out what code is involved in styling all of these points with a certain color or symbol.

Here is what I have so far (my mapbox api key has been removed):

<!DOCTYPE html>

  <title>A leaflet map!</title>

  <link rel="stylesheet" href="/Users/zacharyrobinson1/Desktop/mapbox_tutorial/mapbox.css">

And here's a snippet of my GeoJSON file:

var rodents1 = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
   "type": "Point",
   "coordinates":  [ -71.1491,42.3419 ]
},
"properties": {
"FIELD3":"Rodent"
}
},


texts: Replacing Zero Values of a Field Using ArcMap

texts: In computing the velocity and time of the flow path, the slope is needed but there are values in the field that are zero. How can I replace those zero values into 0.0001 so that the output of the computation will not be zero?


texts: GeoTools ShapefileReader "Random Access not enabled" when trying to read files edited by QGIS 3.12?

texts:
I have some code where the relevant part looks like this:

private static List<GisShape> shapes(String shapefile) {
    DataStore dataStore;
    try {
        dataStore = getDataStore(GIS_BOUNDARIES + shapefile);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
    List<GisShape> shapes = new ArrayList<>();
    try {

        String typeName = dataStore.getTypeNames()[0];
        SimpleFeatureSource featureSource = dataStore.getFeatureSource(typeName);
        SimpleFeatureCollection features = featureSource.getFeatures();
        SimpleFeatureIterator iterator = features.features();

        while (iterator.hasNext()) {

Here's the code for getDataStore:

private static DataStore getDataStore(final String filename) throws IOException {
    Map<String, Object> params = new HashMap<String, Object>();
    final URL resource = GisBoundariesController.class.getClassLoader().getResource(filename);
    params.put("url", resource);
    logger.info(resource.toString());
    final DataStore dataStore = DataStoreFinder.getDataStore(params);
    if(dataStore == null) {
        throw new IOException(filename);
    }
    return dataStore;
}

Now here's the weird part... This code has worked fine for years, and still works in my master repo, but as soon as I try to use a file modified by QGIS 3.12, then the code fails with:

Caused by: java.lang.UnsupportedOperationException: Random Access not enabled
    at org.geotools.data.shapefile.shp.ShapefileReader.positionBufferForOffset(ShapefileReader.java:518)
    at org.geotools.data.shapefile.shp.ShapefileReader.hasNext(ShapefileReader.java:424)
    at org.geotools.data.shapefile.shp.ShapefileReader.hasNext(ShapefileReader.java:406)
    at org.geotools.data.shapefile.ShapefileFeatureReader.filesHaveMore(ShapefileFeatureReader.java:170)
    at org.geotools.data.shapefile.ShapefileFeatureReader.hasNext(ShapefileFeatureReader.java:183)
    at org.geotools.data.store.ContentFeatureCollection$WrappingFeatureIterator.hasNext(ContentFeatureCollection.java:138)

What could cause this? With the original shapefiles the code still works fine, but with the slightly modified shapefile, I get the above exception.

Java Geotools version is 22.0.

UPDATE

Other clues and things tried:

The log shows this just before the failure

  SEVERE: The following
      locker still has a lock: read on
      jar:file:/C:/Users/.../target/boundaries.jar!/gis_boundaries/schools/Schools.shp
      by org.geotools.data.shapefile.shp.ShapefileReader

Other files which were edited by QGIS 3.12 open just fine; I've narrowed the issue to just one shape file. I tried editing and
re-saving the shape file, no go. Reverting to the original file works, but I need the updates.
Adding params.put("CREATE_SPATIAL_INDEX", "true"); had no effect