texts:
I have the following code:

For the layers I used:

var layer_wms_lote_rural = new ol.layer.Tile({
          preload: Infinity,
          visible: true,
              source: new ol.source.TileWMS(({
                url: 'http://localhost:8080/geoserver/municipio/ows',params: {'LAYERS': 'municipio:lote_rural',
                                                                              'TILED': true,
                                                                              'VERSION': '1.1.1',
                                                                              'FORMAT': 'image/png8'
                                                                             },
                serverType: 'geoserver'
              })),
          name:'lote_rural'
        });
        //Declara un layer vector WMS
        var layer_wms_lote_urbano = new ol.layer.Tile({
          preload: Infinity,
          visible: true,
              source: new ol.source.TileWMS(({
                url: 'http://localhost:8080/geoserver/municipio/ows',params: {'LAYERS': 'municipio:lote_urbano',
                                                                              'TILED': true,
                                                                              'VERSION': '1.1.1',
                                                                              'FORMAT': 'image/png8'
                                                                             },
                serverType: 'geoserver'
              })),
           name:'lote_urbano'
        });

For the click over layer:

    map.on('singleclick', function(evt) {
        var layers = map.getLayers();
        var num_length = layers.getLength();
        var coordinate = evt.coordinate;
        var viewResolution = (vista_inicial.getResolution());

    var q=1;
    //for(var q=1;q<num_length;q++){

            var url_info = layers.item(q).getSource().getGetFeatureInfoUrl(coordinate, viewResolution, projection_srid,{'INFO_FORMAT': 'text/html'});
            var url_feature_query = layers.item(q).getSource().getGetFeatureInfoUrl(coordinate, viewResolution, projection_srid,{'INFO_FORMAT': 'application/json'});
            var newLayer = new ol.layer.Vector({
                                source: new ol.source.Vector({
                                                        format: new ol.format.GeoJSON(),
                                                        url: url_feature_query
                                        }),
                                style: new ol.style.Style({
                                                        stroke: new ol.style.Stroke({color: '#00FFFF',width: 4})
                                                        }),
                                name: 'temporal'
            });

        var quanty=newLayer.getSource().getFeatures().length;
        map.addLayer(newLayer);
        content.innerHTML = '
Informacion
';
        overlay.setPosition(coordinate);
        map.removeLayer(vectorial);
        vectorial = newLayer;

        //}//FOR
    });

but only get one layer, in this case el number "q", and want to select any layer when click on map to show popup but the "for" not works because when I count the number features of the newLayer is ZERO!!!!but in the map draw a poly.

Somebody have idea what is the problem?

I use OL3.


texts: I have a raster file with two bands and a vector shapefile. I used raster extraction by mask and created the desired area. Now I want to calculate the number of pixels for Band 1 and Band 2 of the new clipped mask file. What would be the best way to do that?


texts: How to connect OpenLayers to PostGIS data?

texts:
I have read in OpenLayers how to load KML, GeoJSON etc. vector files in OpenLayers. But how can I connect to PostGIS data. If not, why should I upload my data to PostGIS then instead of directly putting my data using WebServices. Am I missing anything?

And I want to load this vector data so that one can see the attributes by clicking on the features.
I need PostGIS because in future I want to enable queries. I think it's only possible by maintaining a database like PostGIS. But how using OpenLayers?

I have read OpenLayers Beginner's Guide, but nowhere it is mentioned. Please help!!


texts: Looking for world maritime boundaries in Geojson

texts: I would like to use leaflet in order to display the world maritime boundaries (12 nm and 24 nm). Is there a reliable geojson source that I could use? If no geojson data is available, I am ready to use any other data format as long as I can convert it to geojson.


texts: Adding descriptions to feature class in geodatabase using ArcPy?

texts:
I am trying to populate the properties of a feature class in a geodatabase using arcpy. In the past I have been given geodatabases with features classes that already have their property descriptions filled in.

How do you populate the description of a feature class using ArcPy?

I cannot seem to locate the information. Below is an example of what I am trying to achieve. This feature class "Wetland Protection Area" comes from a .gdb and its description has already been populated.


texts: Find Layer name by click on features in OpenLayers5

texts:
I have two vector layers showed but want to differentiate features show for layer1 and layer2. I have this code:

var feature = map.forEachFeatureAtPixel(evt.pixel,
    function(feature, layer) {
        return feature;
    });
if (feature) {
    var geometry = feature.getGeometry();
    var coord = geometry.getCoordinates();

How can I now add another if clause, something like:

    if (feature.layer == 'layer1') { ...


texts: I'm using QGIS 3.14 on Ubuntu and I'm confused why, for example, when I write some rules in Symbology/Rule-based location, and then, since I'm learning, I may go to the drop-down and select Symbology/Single symbol,do something there, and then go back to the Rule-based location and everything is gone.  My rules have disappeared.  Is that normal?


texts:
I generated a mbtiles file with tippecanoe and extracted it with mbutil to filesystem. (It named them all .png)

Anyhow, what format are these tiles in? I tried parsing them with a vector tile parser but it gave me an exception using the C# mapbox-vector-tile project.


texts: Identifying Features With a Relationship Class

texts:
I have a feature class which represents points where vegetation clearing has occurred.  I also have a table which has a list of vegetation species which were cleared at each location and the amount of vegetation which was in the sampled area.  I have a relationship class in the geodatabase which links the two based on a Clearing_ID field.

When the user clicks on a point with the Identify tool, they can drill down to see the list of plant species present.  However, the list appears as numbers which is the OBJECTID.  Ideally, I'd like the user to see the list of species present as the default field instead of the object ID.

Is there a way to do this?


texts: Joining 2 vector pieces of one country into one vector polygon using QGIS?

texts:
How to eliminate seam on meridian 168W. Seam is on Russia and Antarctica?

I have done my projection in this way:

QGIS display world country shape files centered on pacific ocean using Robinson, Miller Cylindrical or other projection


texts:
I am trying to find the closest road segment to a point that I have and return an attribute from the closest segment to the given points. How should I do that? Any suggestions?

Can i use a marker and then show attribute-data from another layer in the markers popup?

Any suggestions?


texts: Keeping the z-statistic while kriging within ArcGIS Model Builder

texts:
I am creating a model that accepts in a .csv file and plots the XY points on a calculated field. The preferred interpolation method is kriging, and when I try to update the z-value field, the parameter will not stick (just goes blank).

Is there anything I am doing wrong? I want to keep the z-value static as it will never change, but the model builder will not keep the static z-value input.

Any ideas???


texts: ERROR 000539: Error running expression_NameError: name 'shape title' is not defined

texts:
I'm trying to get the title of the shapefiles or feature classes that are in a workspace (folder or GDB), into the field as a Name in python. I know this is easier in modelbuilder by adding %Name% in field calculator. But what I'm after is to crack it in python since it gives more option to handle it further. Here's the script:

InWS = arcpy.GetParameterAsText(0)
Wildcard = arcpy.GetParameterAsText(1)
Feature_Type = arcpy.GetParameterAsText(2)
arcpy.env.workspace = InWS
lists=arcpy.arcpy.ListFeatureClasses(Wildcard,Feature_Type)
for FC in lists:
    arcpy.AddField_management(FC, "Name", "TEXT", "", "", "100", "", "NULLABLE", "NON_REQUIRED", "")
    arcpy.CalculateField_management(FC, "Name", FC, "PYTHON", "")

Any help?


texts: GIS Consulting - How to Get a Foot in the Door?

texts:
I currently work for a very large company as a GIS developer, and while I am happy in my position for the most part, I can't help but wonder what life as a GIS consultant (i.e. working for myself) would be like...

I know there are many excellent GIS consultants on this site, and I am wondering on how they got their start.  Are there any good sites where companies and/or organizations post GIS related requests?  Can they offer any strategies on how they market themselves to companies/organizations?  Any other tips to test the waters per say?

I'd also be interested in hearing about life as a GIS consultant.  Any experiences or thoughts welcome.


texts: Polygon getting clipped in export to PDF at one scale but not another using ArcGIS Desktop?

texts:
This is what the screen view looks like when scale is set to 120 (1"=10')

This is what comes out in the PDF. Note the clipping in the upper left portion of the curved "path" at the 1:120 scale.

This is what comes out in the PDF when the scale is adjusted to 1:180 (1"=15')

The sheet is 11x17". All data are in a file geodatabase. The data is rotated 90 degrees. I have exported that single polygon to a different feature class with the same results. The results are also the same if I import that single polygon feature class into a fresh map document.

I'm completely befuddled. I plan to try a shapefile, but in the meantime I wonder if anyone else has any ideas as to why this is happening and what can be done.

Converting the shape to a shapefile fixed the situation, but doesn't satisfy my need to know what happened and why.


texts: How to link a script to a button in startup.py

texts:
I created a startup.py file in order to customize my toolbar.
In particular, I would like to create buttons that could launch my various scripts that I created.
So I defined an icon to display it on my toolbar (it works!)
ExportMap = QAction(QIcon("ExportAsPNG.png"), "ExportLayoutAsPNG", iface.mainWindow())
ExportMap.setCheckable(False)
iface.addToolBarIcon(ExportMap)

But I cannot link my script to the icon
I tried to import it with this command :
import profiles/default/processing/scripts/ExportMapPNG.py as script
And I added this at the end of creating the icon :
action.triggered.connect(script)
But it doesn't seem to work.
How I can link my icon to my script ?


texts: How to create tiles with points from MongoDB?

texts:
I have a (potentially) large data set stored in MongoDB. Each record is just lat, lon and some float-point value. Each pair of lat and lon is unique, but the whole set is not covering the Earth, there may be regions with no data at all (so they're not stored).

I need to draw my own tiles based on this data, where mentioned value displayed with respective color (say, from black for minimal values to white for maximal). My dataset is changing in time, so I have to re-render tiles periodically.

I've installed GDAL but I can't find a way to fetch the data.

I've tried to export points to XYZ format, but got no luck: gdal2tiles.py doesn't want to work with it (I think the cause is that my coords are not sequential: I found a sample XYZ data set in Internet, and it was converted OK, and the only difference is that file had a value for each node in grid). Maybe it will work if I populate my database with some initial values for each possible coords pair, but it will cost much time, disk space and DB performance, so it's the last resort.

How can I make this stuff work? What am I doing wrong? Is there something to read that will help me?


texts: Polygon coordinates Format in Openlayers?

texts:
I am new to Openlayers and I am moving my application from Google Map to Openlayers. And also successfully displaying Polygons (coordinates captured via Google Map in Decimal Degrees - default for Google Maps), When I am drawing the polygon on a layer and on onFeaturesAdded Event, while getting co-ordinates of added feature like this

 var tArr = event.features[0].geometry.getVertices();

output comes out  like

[POINT(-919690.32419922 -5068080.7227148),POINT(1780677.0106836 -6868325.6126367),POINT(1819812.7691602 -6868325.6126367)

But, while I am drawing this feature back to OpenLayers displays NOTHING.
Questions are :
1). Google Uses Decimal Degrees Notions to give points of Geometry, Openlayers give in which GIS notation ? (searched on web found nothing)
2). When I am saving co-ordinates in same Projection and redrawing it back, give nothing to me, why ?
thanks for any help.


texts:
I have added excel files to ArcMap numerous times without any problem and then joined them to shapefiles, but, for some reason, today I am getting an error I have never seen before.

The error reads:

  Could not add the specified data object to the map. AN underlying
  error occurred. Class not registered.

Has anyone else ever had this issue and managed to resolve it?


texts: Moving object of fixed dimension without distortion

texts:
I am trying to move a polygon object in a shapefile to a new location.  I will perform an offset so that the process can be automated by shifting the object to a new geographic coordinate or moved by some defined distance from the current position.  If the methods are different, let's focus on the shifting my rigid box to a new coordinate.

The object has defined dimensions (say 10m x 10m) but the reference coordinate system is a geographic coordinate system.  As such the dimensions change when I move it far from its current location.

Facts to consider in the solution:

ArcPy solutions will work
Using ArcGIS Desktop 10.1
A movement of the centroid would be acceptable, because it is the offset from the initial position that the object will be moved; alternatively it could be moved from any arbitrary point as long as the point is known
The coordinate system is also arbitrary.  The solutions can specify or be general in that regard.
The process needs to be repeated 100s of times


texts: How to make sense of multi-band global radiation output raster from area solar radiation tool

texts:
So I'm running the area solar radiation tool using the time configuration and other parameters as seen here:

By selecting the "Create outputs for each interval" checkbox, the global radiation raster that is output contains 12 bands. My questions are:
1. How do I know which bands correspond to which hours of the day?
2. How do I separate the 12 bands into their own individual rasters?

I've browsed ESRI's geonet forum on the topic but couldn't find anything helpful


texts: Erase pixels in a Polygon in a Huge Raster Dataset in ArcMap

texts:
I've a huge raster dataset and I have to replace a small portion with new data. I tried several things to remove related area to upload new raster but I couldn't have any success.

I'll try ArcPy solutions if there will be any.

Things I have tried are:

First run Math > "Greater than" tool with specific extent to find a extract area. Then Set Null to extract this raster from original, but somehow I can't get whole raster, just the area I'm working on with "NoData".
I tried to read all data in Python with arcpy.RasterToNumPyArray() but the size of data was a problem. I tried to work with the area related, but again converting array to raster is the same area instead of the whole raster.


texts: ArcGIS / ArcMap problem with tiff file and projection

texts:
I have a raster in ArcMap .

The projection is WGS 1984 UTM 22.

When I look the details of the projection I can see that the "scale factor" is 0.9996

When I save this raster in a in tif file and the scale factor become 1
When I save this raster in a in img file and the scale factor  stay 0.9996.

This is anoying me because when I open the file in others softwares they do not recognize the  projection.

My version is Armap 10.0 Build 2414

Does anyone already has this problem and have a solution ?


texts: Combine digital elevation model (DEM) with point layer (QGIS)

texts:
I have two layers:
The first one is a digital elevation model (DEM) as GeoTiff. The second is a point vector layer (start and end of street segments).

What I want to do:
Add elevation information to the point layer (as the new attribut hight) from the raster DEM.

My first plan:
Convert DEM to vektor and than intersect with point layer. Problem here: Conversion to vektor takes extremely long time, as its a 30x30m resolution.

Do you have any other ideas?


texts: QGIS 3.6.2 with GRASS - Can't find the GRASS command path parameter

texts:
I have QGIS 3.6.2 with GRASS 7.6.1 installed. Following the advise of this post GRASS Processing not working on QGIS? I want to work with GRASS 7.7 but I don't have the parameter to set the path to the GRASS folder as I've seen in some screenshots.

How can I change where QGIS looks for GRASS commands folder?


texts: Displaying Vector Tiles (WMTS/TMS) in QGIS 3.14

texts:
I am testing Vector Tiles display in QGIS 3.14 which is the first QGIS version to natively support this layer format. WMTS/TMS comes from GeoServer/GeoWebCache and is already tiled in Mapbox Vector Tile (.pbf) format. The tiled layer preview with OpenLayers displays the features just fine. However, QGIS seems to have trouble displaying them correctly. The features are severely misplaced/misscaled on the map. I have tried the following approaches (both specify CRS in url):

Adding WMTS:

http://localhost:8080/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=leo:layer_1&TILEMATRIX=EPSG:2180:{z}&TILEMATRIXSET=EPSG:2180&FORMAT=application/vnd.mapbox-vector-tile&TILECOL={x}&TILEROW={y}

Adding TMS:

http://localhost:8080/geoserver/gwc/service/tms/1.0.0/leo:layer_1@EPSG:2180@pbf/{z}/{x}/{-y}.pbf
Result is the same in both cases. I can pan and zoom and the tiles load correctly but the objects are significantly misplaced and misscaled. Their extent should be more or less similar to the polygon shown in the upper left corner.
How do I display Vector Tiled TMS/WMTS correctly in QGIS 3.14? Did I do something wrong or perhaps this QGIS feature is not fully functional yet? The CRS is EPSG:2180.

EDIT:
user30184 suggested to serve it in EPSG:3857. I tested tiles served in EPSG:3857, EPSG:4326 and my desired CRS - EPSG:2180. EPSG:3857 is the only one properly displayed in QGIS.


texts: In R, abstract data from SpatialPolygonsDataFrame but got NA

texts:
I tried to extract data from a SpatialPolygonsDataFrame, but got all NA.

 slot(nc,"data")[c("Northampton","Clay","Macon","Graham","Yancey","Mitchell","Avery"),]

The data show as:

     SP_ID CNTY_ID east north L_id M_id names AREA PERIMETER CNTY_ NAME FIPS
NA    <NA>      NA   NA    NA   NA   NA  <NA>   NA        NA    NA <NA> <NA>
NA.1  <NA>      NA   NA    NA   NA   NA  <NA>   NA        NA    NA <NA> <NA>
NA.2  <NA>      NA   NA    NA   NA   NA  <NA>   NA        NA    NA <NA> <NA>
NA.3  <NA>      NA   NA    NA   NA   NA  <NA>   NA        NA    NA <NA> <NA>
NA.4  <NA>      NA   NA    NA   NA   NA  <NA>   NA        NA    NA <NA> <NA>
NA.5  <NA>      NA   NA    NA   NA   NA  <NA>   NA        NA    NA <NA> <NA>
NA.6  <NA>      NA   NA    NA   NA   NA  <NA>   NA        NA    NA <NA> <NA>

Can anyone tell me what I should do?


texts: How to optimize this query for (OpenStreetMap) map tiles rendering?


texts: Associating 9.3 geodatabase domains to a SDE feature class' field in ArcCatalog 10.1 fails

texts:
I have succesfully created Domains into a 9.3 geodatabase based on Oracle (SDE) by using ArcCatalog (ArcGIS 10.1). Proof: If I open the table GDB_DOMAINS in Oracle the new domains are listed. Furthermore, I have been able to populate these Domains with values by extracting the coded values from non-spatial tables in Oracle, fine. However, in the last step, after I associate these domains to the corresponding feature classes' fields in ArcCatalog by clicking onto the feature class properties, and press Apply,OK. The following happens:

When I open an editing session in ArcMap, and click on the field the coded values don't show up. The domains are not there.
If I close ArcCatalog, therefore close the SDE connection to the database, and open it again the associated domains to the feature classes' fields are gone, so you see the domain textbox empty in the feature class properties.

I don't know what I am doing wrong in associating the created domains to the feature classes' fields.


texts: How to use gdal to convert HDF multi-band file to a single GeoTiff file?

texts:
I have a multi-band HDF file that I want to convert to a single GeoTiff file, using free tools, preferably gdal.  I'm trying to use gdal_translate, but I either get back multiple output .tif files, or I get "subdatasets" errors.

When I use the -b flag to specify bands:

gdal_translate -b 1 -b 2 -of GTiff input_image.hdf output_image.tif

I get "subdatasets" errors:  "Input file contains subdatasets. Please, select one of them for reading."

And when I use the sds flag:

gdal_translate -sds -of GTiff input_file.hdf output_file.tif

I get back separate .tif files, one for each band in the input file.

How can I convert an HDF file into a single GeoTiff file using gdal?


texts:
i'm using the Modelbuilder in ArcGIS 10.1 to calculate pixels depending on their slope and distance from the road. The third necessary task is to find out, if the pixel is upwards the road or downwards. Is there any fast solution to do this. The question sounds simple but in ArcGIS i have no idea to that.

My first steps are:
Do Cost allocation from roadpoints and slope, getting areas which would be accessable from the roadpoint, then interpolating z value to each area, calculating the mean height and compare it to the height of the streetpoint value! This is a really dirty way to do so and i would be thankful for any help


texts: Geometries associated to attribute table features not displayed (QGIS 3.4)

texts:
I'm having this problem with some data downloaded from a Brazilian prefecture, and don't understand why this is happening. When uploaded to the platform, QGIS displays the undefined CRS message. After that I reprojected the layers to the right CRS with the "Reproject Layer" tool in Vector menu, but even so the geometries are not shown.
That said, my question is: is it possible to have a polygon layer associated with no geometry, just the attribute table? Did I try all paths to solve this situation?
edit: I heard about a change right on the .prj file that I could do, but don't understand the difference would have between this and the reprojection at the Vector menu


texts: How do I use Proj4Leaflet projections correctly?

texts:
I'm loading data layers from a WMS server into a Leaflet map, and I need to give the user a choice of projections. For the WMS server requests, I just need to change the CRS parameter to a different string (the server definitely supports the projection I am using). However, when trying to change the projection of the Leaflet map object (by change, I mean remove and then re-initialise with the new projection), the map does not seem to update correctly, leaving the zoom levels and location completely out of sync with the WMS layers.

I'm using Proj4Leaflet, and I'm focussing on the EPSG:27700 (British National Grid) projection right now. The code I'm currently using is:

context.EPSG27700 = new L.Proj.CRS( 'EPSG:27700',
        '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000' +
        '+ellps=airy +datum=OSGB36 +units=m +no_defs',
        {
        resolutions: [2800, 1400, 700, 350, 175, 84, 42, 21, 11.2, 5.6, 2.8, 1.4, 0.7, 0.35, 0.14, 0.07],
        });

When I set EPSG27700 as the CRS property of the map, I have to zoom far out to see the WMS layer and the origin moves away from the coordinates I set using the Leaflet setView method.

How do I go about using custom projections like these, and does anyone know of some working examples for this particular projection?


texts:
Multipart points, lines, and polygons are implemented in nearly every GIS, but what benefits, if any, do they provide?

In a relational database attributes shared by different features can be stored once, and IDs used to link them to separate geometry records. So are multipart features a legacy of flat file data storage?


texts: Merge geopackages keeping layer structure

texts:
I have a bunch of geopackages for each state, and all have the same layer structure (same name and type). I'd like to merge the state level gpkg into a single gpkg, keeping the same layer structure, i.e. have one layer named munic with all the municipalities form the other layers.

I'm trying to do this using ogrmerge.py but somehow I can't figure out the parameters to use. Is it possible to do what I want with ogrmerge.py? Or should I use some other tool?

Here is what I tried and the results I'm getting:

ogrinfo of the two input layers

ogrinfo sp.gpkg
INFO: Open of `sp.gpkg'
      using driver `GPKG' successful.
1: munic (Multi Polygon)
2: uf (Multi Polygon)

ogrinfo pr.gpkg
INFO: Open of `pr.gpkg'
      using driver `GPKG' successful.
1: munic (Multi Polygon)
2: uf (Multi Polygon)

My desired output would be a GPKG with two layers, munic and uf, that contains the data from both pr.gpkg and sp.gpkg files

ogrmerge without any parameters - The layers for each state are separated. Not what I want

ogrmerge.py -f GPKG -o br.gpkg pr.gpkg sp.gpkg

ogrinfo br.gpkg
INFO: Open of `br.gpkg'
      using driver `GPKG' successful.
1: pr_munic (Multi Polygon)
2: pr_uf (Multi Polygon)
3: sp_munic (Multi Polygon)
4: sp_uf (Multi Polygon)

with -single parameter. All layers are merged into one. Not what I want

ogrmerge.py -f GPKG -single -o br.gpkg pr.gpkg sp.gpkg

ogrinfo br.gpkg
INFO: Open of `br.gpkg'
      using driver `GPKG' successful.
1: merged (Multi Polygon)

Using layer template option with -single. An empty br.gpkg is created

ogrmerge.py -f GPKG -single -nln {LAYER_NAME} -o br.gpkg pr.gpkg sp.gpkg
ERROR 1: The layer name may not contain special characters or spaces
ERROR 1: Terminating translation prematurely after failed
translation of layer {LAYER_NAME} (use -skipfailures to skip errors)

Using layer template WITHOUT -single flag. An empty output is created

ogrmerge.py -f GPKG  -nln {LAYER_NAME} -o br.gpkg pr.gpkg sp.gpkg
ERROR 1: Layer munic already exists, and -append not specified.
        Consider using -append, or -overwrite.
ERROR 1: Terminating translation prematurely after failed
translation of layer munic (use -skipfailures to skip errors)
ERROR 1: sqlite3_exec(CREATE TRIGGER "trigger_insert_feature_count_munic" AFTER INSERT ON "munic" BEGIN UPDATE gpkg_ogr_contents SET feature_count = feature_count + 1 WHERE lower(table_name) = lower('munic'); END;) failed: no such table: main.munic
ERROR 1: sqlite3_exec(CREATE TRIGGER "trigger_delete_feature_count_munic" AFTER DELETE ON "munic" BEGIN UPDATE gpkg_ogr_contents SET feature_count = feature_count - 1 WHERE lower(table_name) = lower('munic'); END;) failed: no such table: main.munic
ERROR 1: sqlite3_exec(CREATE TRIGGER "trigger_insert_feature_count_uf" AFTER INSERT ON "uf" BEGIN UPDATE gpkg_ogr_contents SET feature_count = feature_count + 1 WHERE lower(table_name) = lower('uf'); END;) failed: no such table: main.uf
ERROR 1: sqlite3_exec(CREATE TRIGGER "trigger_delete_feature_count_uf" AFTER DELETE ON "uf" BEGIN UPDATE gpkg_ogr_contents SET feature_count = feature_count - 1 WHERE lower(table_name) = lower('uf'); END;) failed: no such table: main.uf

Using layer template with -append. Same error apears with -update

ogrmerge.py -f GPKG  -nln {LAYER_NAME} -append -o br.gpkg pr.gpkg sp.gpkg
ERROR: -f incompatible with -update


texts:
I'm processing BUFR products from Eumetsat and I would like to ask for your help about the following descriptors:

002028 SEGMENT SIZE AT NADIR IN X DIRECTION
002029 SEGMENT SIZE AT NADIR IN Y DIRECTION

My problem is that I don't know how to interpret their values.

For example in ASR (All sky radiance) product from MSG, I have this subset in the first message of the bufr file:

:Subset 1
:
:     1  001007               57  SATELLITE IDENTIFIER [CODE TABLE]
:     2  001031              254  IDENTIFICATION OF ORIGINATING/GENERATING CENTRE: [CODE TABLE]
:     3  002020              333  SATELLITE CLASSIFICATION [CODE TABLE]
:
     4  002028            48000  SEGMENT SIZE AT NADIR IN X-DIRECTION [M]
:     5  002029            48000  SEGMENT SIZE AT NADIR IN Y-DIRECTION [M]
:     6  004001             2015  YEAR [A]
:     7  004002                2  MONTH [MON]
:     8  004003               27  DAY [D]
:     9  004004               20  HOUR [H]
:    10  004005               45  MINUTE [MIN]
:    11  004006                0  SECOND [S]
:    12  005001         23.46664  LATITUDE (HIGH ACCURACY) [DEG]
:    13  006001         -59.6647  LONGITUDE (HIGH ACCURACY) [DEG]
:    14  030021             3712  NUMBER OF PIXELS PER ROW [NUMERIC]
:    15  030022             3712  NUMBER OF PIXELS PER COLUMN [NUMERIC]
:    16  010002          missing  HEIGHT [M]
:    17  020082               62  AMOUNT SEGMENT CLOUD FREE [%]
:    18  008012                1  LAND/SEA QUALIFIER [CODE TABLE]
:    19  020082                0  AMOUNT SEGMENT CLOUD FREE [%]
:    20  008012          missing  LAND/SEA QUALIFIER [CODE TABLE]
:    21  020081               38  CLOUD AMOUNT IN SEGMENT [%]
:    22  008003                8  VERTICAL SIGNIFICANCE (SATELLITE OBSERVATIONS) :[CODE TABLE]
:    23  020081               38  CLOUD AMOUNT IN SEGMENT [%]
:    24  008003                9  VERTICAL SIGNIFICANCE (SATELLITE OBSERVATIONS) :[CODE TABLE]
:    25  020081                0  CLOUD AMOUNT IN SEGMENT [%]

As you can see, in this subset we have a single point with a LATITUDE and LONGITUDE. I interpret a subset as a description of a single segment and as above this segment has a single coordinates and a single value for a certain data type.
So I get that segment = pixel. And so pixel has a dimension of 48000m x 48000m as written in the subset. Is this right? Why I read also:

:    14  030021             3712  NUMBER OF PIXELS PER ROW [NUMERIC]
:    15  030022             3712  NUMBER OF PIXELS PER COLUMN [NUMERIC]

If a pixel has the dimension above we can't have an image size of 3712 x 3712. Also I know that MSG has a pixel resolution of 3km x 3km and 1km x 1km not 48km x 48km.

Any ideas please?


texts:
I'm using ArcGis 10.4 and it crashes when I pan Bing Maps.
Zooming in and out is working. Esri Imagery works as well.

Does anyone have experience with that and know what is the problem?


texts: How to convert from a local coordinate system to UTM (and vice versa) using mathematical expression

texts:
I have two coordinate systems- UTM Zone 23S and a local one with the following conversion from UTM to Local:

  EASTING:  SQRT( (UTM_EAST-296787.355)^2 +UTM_NORTH-8095123.271)^2)
  *COS(ATAN((UTM_NORTH-8095123.271)/(UTM_EAST-296787.355))-0.0109372521874868)+6000

  NORTHING: SQRT( (UTM_EAST-296787.355)^2+(UTM_NORTH-8095123.271)^2)
  *SIN(ATAN((UTM_NORTH-8095123.271)/(UTM_EAST-296787.355))-0.0109372521874868)+8000

I've spent a lot of time trying to get this to convert in proj4 code with QGIS, and the closest I can get is this:

  +proj=omerc +y_0=8766  +x_0=6027.776 +alpha=-0.0109372521874868 +lat_0=-17.21294 +lonc=-46.91099472326864 +gamma=0 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

which gets me within a few meters. But it is not perfect. The shapes do not align perfectly. Theres some rotation that I cannot figure out.

My question is this: is it possible to write a proj4 script to convert from one to the other using the above mathematical expressions?


texts: Creating GeoTIFF raster via GDAL results in raster with 255 bands

texts:
I am trying to create a GeoTIFF raster with GDAL from data stored in numpy matrices. The data is one band, consisting of 0 and 1 values. The zero values are my nodata values. The problem is, the raster it outputs has 255 bands when viewed in ArcGIS. The one band I care about is present and visible, but I'd like to get rid of the other bands, if possible. I think it might have to do with the eType param for driver.Create() but I'm not sure.
Here is my Python GDAL code:
raster = driver.Create(rasterPath, results.shape[1], results.shape[0], 1, gdal.GDT_Byte)

raster.SetProjection(projection)
raster.SetGeoTransform(geotransform)
output_band = raster.GetRasterBand(1)
output_band.SetNoDataValue(0)

colors = gdal.ColorTable()
colors.SetColorEntry(1, (255, 0, 0))

output_band.SetRasterColorTable(colors)
output_band.SetRasterColorInterpretation(gdal.GCI_PaletteIndex)

output_band.WriteArray(results)
output_band.FlushCache()
output_band.ComputeStatistics(False)

output_band = None
raster = None

Here is a screenshot of the extra bands I'm talking about in ArcGIS:

The extra, black bands go all the way to 255. Any ideas?


texts: Accessing Attributes of Individual FeatureLayer Points with ArcGIS API for JavaScript

texts:
I have been struggling for some time with selecting points from a featureLayer which is stored on an ArcGIS webserver.  Each of these point graphics contains information such as an ObjectID, SiteName, City, County, etc.  I have created an infoTemplate for the points and all of this data is shown when each graphic point is clicked.  However, when trying to access the values of the graphic, such as the value of ObjectID, I cannot seem to find anything other than an empty object.

Here is what I have tried:

The console output is simply an empty array []

I know that information exists about the feature since it is stored and displayed in the infoTemplate.


texts: How to make variables output to user defined workspace

texts:
I am running a script in ArcMap and I want to reference the user defined workspace as an output instead of hard coding it in.

I have the scratch output set as a user defined parameter. However, I cannot figure out how to reference that when declaring the variable.

Below is a section of my code:

import arcpy
from arcpy.sa import*
import sys
from arcpy.mapping import*

#Extension
arcpy.CheckOutExtension("3D")
arcpy.CheckOutExtension("spatial")
arcpy.OverwriteOutput = True

#Argument
arcpy.env.scratchWorkspace = arcpy.GetParameterAsText(0)

#Variable
Survey_Points = "E:\\URSP\\Final\\Output.gdb\\Survey_Points"

#Process
arcpy.MakeXYEventLayer_management(Survey_Data, Survey_X, Survey_Y, "Survey_Layer", spRef, Survey_Z)

arcpy.CopyFeatures_management("Survey_Layer", Survey_Points, "", "0", "0", "0")


texts: I have a rather large model that works fine with the exception of one part (See Figure 1).  What I can't seem to figure out is how to select all "NULLs" (for example) in a field and then perform a calculation on the NULLs selected, then move on to the next field listed in the "Field" variable.  It just runs through the first Field then stops.  Any ideas would be helpful.


texts:
I am looking for a method (plugin) to choose next feature of my vector layer really fast. I need to edit a lot of polygons and fast choosing next record is really necessary (using arrow or something similar).

I have found plugin like go2nextfeature but it works only with QGIS2. I use QGIS3.

Do you know any comfortable method (maybe keyboard shortcut) to do that?


texts: QGIS crash while delete duplicate geometry

texts:
I have a polygon shape with nearly 60 000 features (at around 3 000 square kilometres) in QGIS 2.12. I try to delete duplicate geometries from this layer and the algorithm runs until 99%. Then QGIS crashes (this also happens when I use version 2.8).

Any suggestions why this happens? Because of the mass of features? Computer capacity? Something else I have to think of?


texts: Dividing up vector grid and scoring cells using QGIS?

texts:
I have a map of an area, have created a vector grid over this, and want to score different areas of the map by risk (high risk, medium risk, low risk), by scoring each cell. I want to define these areas by drawing them in.

Is it possible to divide up a vector grid into different sections by defining them manually?

I am using QGIS version 2.18.24.


texts:
I'm currently trying to parse a shapefile (http://www.esri.com/library/whitepapers/pdfs/shapefile.pdf) with c++.
While I have no problems parsing all the data I need, there is a problem with the coordinates. I got a description file for the data, which states that the used projection is "ETRS89 (Ellipsoid: GRS80), UTM (Zone 33)".

I need all points to be in lon/lat format. I spent the whole day googling around to find a solution for this problem, but there doesn't seem to be one.

data example:

33354891.477852, 6060028.67074774
        ^               ^
       X (E)           Y (N)


texts: Rule based symbology rendering order with expression

texts:
I want to create a map of origins and destinations as a bubble map.

As you can see on the above image (green: origins, red: destinations). I have applied rule based symbology with expression on symbol size in the same layer. However, some red green bubble information being lost when I try to do that due to rendering order. I want to always render the bubble with bigger value so that they will both appear on the map. Is there a way to do that with rule based symbology? If not what is the proper way to do that?


texts: Open Layers 4.0.1 Pausing Marker Animation?

texts:
I am using open layers 4. I am moving and stoping marker animation as this example without any problem. But I want to add pause and continue functionality to marker also. I edit some variables and endeavor on the issue with these functions. But elapsedTime is negative on moveFeature function continuously.

 function pauseAnimation() {
            animating = false;
            //I hold elapsed time globally
            var index = Math.round($("[id='rightfrm:tbv1:txt1']").val() * elapsedTime / 1000);
            (geoMarker.getGeometry()).setCoordinates(line_coordinates[index].lc);
            map.un('postcompose', moveFeature);
        }

 function continueAnimation() {
    animating = true;
    now = new Date().getTime();
    now = now - 10000 + elapsedTime; // --10000-- for negativeness
    geoMarker.setStyle(null);
    map.on('postcompose', moveFeature);
    map.render();
 }

How should I add pause and continue functionality?


texts: Download Hosted Feature Service that I Don't Own?

texts:
So I have access to a hosted feature service, and I want to take from ArcGIS online and download to use in ArcMap. I didn't create this feature service. I don't own it, so the options I would typically use aren't available to me. (i.e: there's no export option on the right side of the feature's services overview page, nor is there an option under the layer to download as a geodatabase. Click on 'Open in ArcGIS Desktop' just downloads an item.pitem (don't know what that is).

Is there a way for me to download this data without creating a replica? Is there a way for me to sync edits from ArcMap back into ArcGIS online?


texts: How can I find the brightest (with the highest value) pixel of a raster in QGIS using the calculator of raster or python console?


texts: Automating a Python expression to calculate acres

texts:
I'm not new to GIS but very, very new to using Python and using scripts.  I successfully use a Python expression !shape.area@acres! to update a field  with acres in a feature class.

What my users would like is a tool they can put on their toolbar to see the calculated acres when they select a polygon feature. We had this tool in 9.3 but obviously doesn't work in 10.  I am using Desktop 10.2 Advanced.

Is there some way to create this as a button so that users can add this "tool." I'm just not sure if I should be looking at ModelBuilder, geoprocessing tools, or add-ins? I just don't want my user to have to load this expression every time they want to use it.


texts: How to create Point Transects along line?

texts:
I would like to create a point shapefile that will contain sampling points along, and perpendicular to either side of a track route that I have as a line feature in ArcGIS 10.1. The points on the track will be every 50m along the line with the perpendicular points 10m either side of that.

Is there a tool or script that I can use to generate my points to save me placing over 300 points manually? Any help would be great.

****Edit 17:25 07.04.2013****

Thank your for the help so far but I am not sure that those methods would achieve what I am trying to.

Attached is a image prepared in powerpoint of what I am trying to achieve.

As you can see I would like to place points every 50m along the route of an existing track that is present in real life and has been digitised in to ArcGIS.  The points perpendicular to the track points are 10m either side of the point.

I did manage to get a rough plan of the locations by using a bit of a long winded route and a free add in tool called ETGeo Wizard. This method involved the following steps:
1. Generate a 10m buffer around the track route polyline;
2. Convert the buffer polygon to a polyline;
3. Split the rounded ends off the polyline (i.e the original rounded edges of the buffer) leaving two lines 10m from the track route polyline;
4. Use ETGeo Wizard to place points every 50m along the polyline;

This method does give me the points but there is a lot of error meaning a lot of manual editing.  It is also quiet a time consuming method of generating my points given that I have lots of track sections to place points on. I would therefore like to find a way to generate the points automatically using a tool or script.

I hope this helps to explain what I am trying to achieve a little clearer?

Thanks for any help


texts: Choosing projection for distance calculations in Alaska?

texts:
I am working within the entire state of Alaska and slightly into western Canada, and I need a projection which will allow me to accurately calculate distances between points within the state. Currently I've been using ESPG 2964, which is an equal area projection, which is therefore no good.

I was feeling a little overwhelmed looking at Google so does anyone have a relatively simple answer?


texts: Obtaining Cartesian X & Y values from Lat/Long

texts: From an aeronautical obstacle survey, I have a list of 500+ obstacles with Lat, Long and Ortho Elevation information. Using ArcMap 10.3; how do I obtain Cartesian X & Y values of all the obstacles with a particular runway end point (i.e. Runway Threshold) as origin. X/Y values of the obstacles are to be computed along/perpendicular to runway axis.


texts: Syntax error in Where Clause using .format in arcpy.Select_analysis

texts:
I'm having a little trouble understanding the syntax for a Where Clause; e.g., for use in arcpy.Select_analysis(inSHP, clipSHP, where).

input is polygon shapefile; Zone_ID field is short integer

This works:

whereClause = '"Zone_ID"= ' + str(zone)

But this doesn't:

whereClause = "{field} = '{val}'".format(field = Zone_ID, val = zone)

Throws this error:

NameError: name 'Zone_ID' is not defined

"Zone_ID" is obviously defined because it works in the first case. Any ideas what's wrong with my syntax?

Tried this also:

whereClause = "{field} = '{val}'".format(field = "Zone_ID", val = zone)

Error message:

arcgisscripting.ExecuteError: ERROR 000358: Invalid expression Zone_ID = '1'
Failed to execute (Select).


texts:
According to the below GIS.SE questions, GeoDjango was the preferred framework for creating simple and quick webmap applications. But these questions are now all 2-3 years old.  Can we verify whether or not consensus says that GeoDjango still remains top among webmapping application frameworks?

What are the advantages of using Rails for a GIS/mapping application?

What are the Python tools/modules/add-ins crucial in GIS?

I'm new to GIS and I'm looking for a developer-friendly web GIS


texts: Extracting Z-Values from SHP with geotools and vividsolutions?

texts:
I use the java libraries geotools and vividsolutions to extract xyz data from a shapefile (Vienna from this example).

This works perfectly fine for x and y data, but all coordinate values for z are set to "NaN" (not a number), same as for regular 2D Shapefiles. I found other questions relating to Z=0, but i think this one is quite different since its about different tools, and the source file already does contain Z-Values (as can be seen in the example).

Using the code below, i can successfully extract x and y values for coordinates, but coordinate.z always yields "NaN". Since i know the shapefile in question contains z-Values, the problem must be in geotools/vividsolutions (or my use of those libraries).  So, my question is, does anybody know how to read the Z coordinate value using geotools & vivdsolutions?

For reference, see below for the (condensed) code i used to exctract coordinates.

Getting the Geometries from Shapefile:

public List<Geometry> getShapefileGeometries(File shpFile) throws MalformedURLException, IOException {
    List<Geometry> shpGeometries = null;
    Map<String, Object> mapConnectionTypeInfo = new HashMap<>();
        mapConnectionTypeInfo.put("url", shpFile.toURI().toURL());
        DataStore myDataStore = DataStoreFinder.getDataStore(mapConnectionTypeInfo);
        String typeName = myDataStore.getTypeNames()[0];
        FeatureSource<SimpleFeatureType, SimpleFeature> dataSource = myDataStore.getFeatureSource(typeName);
        FeatureCollection<SimpleFeatureType, SimpleFeature> featureCollection = dataSource.getFeatures();
        Object[] featureObjects = featureCollection.toArray();
        if (featureObjects != null) {
            shpGeometries = new ArrayList<>();
            for (Object featureObject : featureObjects) {
                SimpleFeature feature = (SimpleFeature) featureObject;
                Object defaultGeometry = feature.getDefaultGeometry();
                if (defaultGeometry != null && defaultGeometry instanceof Geometry) {
                    shpGeometries.add((Geometry) defaultGeometry);
                }
            }
        }
    return shpGeometries;
}

Searching Geometries for coordinates with Z-Values:

public void checkGeometriesForZ(List<Geometry> shpGeometries) {
    for (Geometry currentGeometry : shpGeometries) {
        for (int i = 0; i < currentGeometry.getNumGeometries(); i++) {
            Geometry g = currentGeometry.getGeometryN(i);
            Coordinate[] coordinates = null;
            if (g instanceof Polygon) coordinates = ((Polygon) g).getCoordinates();
            if (g instanceof LineString) coordinates = ((LineString) g).getCoordinates();
            if (g instanceof Point) coordinates = ((Point) g).getCoordinates();
            if (coordinates != null) {
                for (Coordinate currentCoordinate : coordinates) {
                    System.out.println(String.format("X: %f, Y: %f, Z: %f", currentCoordinate.x, currentCoordinate.y, currentCoordinate.z));
                }
            }
        }
    }
}

Testing (using the vienna shapefile from the example):

@Test
public void searchSHPWithZ() throws IOException {
    File vienna = new File("shapefiles/105082_bkm.shp");
    CoordinateExtraction mySearch = new CoordinateExtraction();
    List<Geometry> currentGeometries = mySearch.getShapefileGeometries(vienna);
    mySearch.checkGeometriesForZ(currentGeometries);
}

Typical output:

"X: 2963,808248, Y: 341051,336212, Z: NaN"


texts: What are the units for Garmin's GPX gpxtpx:speed?

texts:
I have a Garmin Nüvi GPS and it's filled with XML records that look like this:

<trkpt lat="38.900207" lon="-77.008990">
<ele>11.67</ele><time>2013-06-11T04:04:49Z</time>
<extensions>
   <gpxtpx:TrackPointExtension><gpxtpx:speed>6.86</gpxtpx:speed>
   <gpxtpx:course>271.06</gpxtpx:course>
   </gpxtpx:TrackPointExtension>
   </extensions></trkpt>

(line breaks added for legibility)

My question — what are the units for gpxtpx:speed ? I've examined all of the trackpoints for my GPS and the gpxtpx:speed never gets much above 30, and I KNOW that I'm going faster than 30MPH.

I've scanned the documentation and I can't find what the units are.


texts: What syntax should I use in my SQL query in the select statement in ArcMap if I want to use two In-Line substitution variables

texts:
I am trying to iterate though features in a shapefile. There are two columns I need to iterate through. First, I need to iterate through company names, and then using another iterator in a separate model, extract each companies subdivision. Not all companies have the same amount of subdivisions.

There are 11 companies and 75 subdivisions. I want to end up with each company's subdivision saved with the file name structure of something similar to Company_Subdivision.shp. Each feature (column) has iterator with an inline substitution variable.

I was able to rename the variables so they have a different name. The problem lies within the second select statement where I am trying to pull in both in line variables. I can only seem to use one at a time in the Select statement (even if I write it in manually).

I found this link below but I didn't see any syntax for in-line variables, let alone the syntax for using two in-line variables in the same select statement. Does anyone know how to use to in-line variables in a single select statement?

http://resources.arcgis.com/en/help/main/10.2/index.html#//00s50000002t000000

Update: I included a screen shot of the two models and the select statement is open on the second model. The select statement is

Company = %Value% and Subdivision = %Subdivision%.

I then want to save the file and try to use both in-line variables in the output file location. I am unsure if this is even possible


texts: Getting NIR values into LAS file then CSV?

texts:
We are trying to deliver a LAS file with NIR values added for each point.  The NIR comes from a raster captured at the same moment as the LiDAR, and is stored as an 8bit number along with RGB in 8bit.

We have brought this into FME and managed to import the RGB and NIR values into a LAS file, though in the transfer the RGB becomes 16bit and the NIR stays at 8bit.

However, when our customer views the LAS file (I think in GlobalMapper) they do not see the NIR values, though they see the field.  We tried bringing the LAS file into ArcMap and there we see RGB fields, but all values are 0 and no NIR field.  Wondering if this maybe has something to do with FME's LAS attribute being called color_red, colour_green, colour_blue and ESRI's attributes being called red, green, blue.

Nonetheless we don't see the NIR field in ArcMap but we know it is there if we look at the same file in either FME (displays all properly) or GlobalMapper (shows field but with 0 values).

Ultimately the client wants a CSV so we are trying to generate one from FME for the LAS file that has all the information we know FME can see, but so far having issues there as well.

Anyone have any advice on what is needed to get NIR values into a LAS file that something other than FME can see?


texts: Create a hyperlink to a pdf file in the attribute table

texts:
I want to add a hyperlink to a pdf file into the attribute table of a vector layer. I already read the documentation about evis and the answered questions about this here. It didn't seem difficult, but I still can't create a hyperlink...can someone give me a short step by step information about this? Unfortunately I have no access to youtube...

I'm using Qgis (2.0.1) and evis is a plugin that should allow to create such hyperlinks via a event browser. I first added a column "Link" to the attribute table and put the link to the document in this column.
this is the link to the documentation for evis: http://www.qgis.org/en/docs/user_manual/plugins/plugins_evis.html#figure-evis-2

Thanks a lot!
G.H.


texts: I am interested in extracting data from QPublic for every parcel in my city. I am a complete beginner with this and am not even sure which programming languages I should be looking into. Can anyone please point me in the right direction?


texts:
I am using Javisantana example of Autocomplete an everything works inside my map, until I tested my map with IE8 and experienced this error:

Object doesn't support property or method 'map'

After some research it seems as if IE does not support that function some of the hacks/patches that I have tried fix that error but seem to cause errors within cartodb js.
Has anyone ran into this problem? If so any tips or advice on a work around?


texts: What parameters are used for calculating a place zoom level

texts:
I've been searching for a while how different map engines calculate zoom level for place names. I've found that OSM uses a mixture of type and population of a place, but other engines like Google and Mapbox seem to ignore population at all. I see that Google somehow uses roads to calculate the level for a place.

What parameters do engines usually use to calculate the rank (in addition to population)? I guess the algorithm should be pretty simple, given the amount of geodata. And what parameters can be used to create more or less even distribution of names on the map?


texts: How can I open a standalone .dbf file in QGIS?

texts:
Unlike the apparently similar question already asked where the .dbf is associated with the .shp, my problem is simply opening a .dbf in order to join it with a disconnected shapefile by table join.

My question is quite simple: how can I open a .dbf file in QGIS?

I can't find the right instruction to do it.


texts: Why this lookup names and value doesn't work?

texts:
I would like to print names and value from classified images with this code
//**Set center **//
Map.setCenter(103.667, 11.5019, 9);

//**Import Copernicus Global Landcover dataset
var dataset = ee.Image("COPERNICUS/Landcover/100m/Proba-V-C3/Global/2019")
              .clip (roi);

//**Selection attribute value
var classified = dataset.select(['discrete_classification']);

//**Visualize land cover map on canvas
Map.addLayer(classified, {}, "Land Cover Combodja");

//**grouping the images
var landcover_class = ee.Image.pixelArea().addBands(classified);
print (landcover_class)

//**Calculation area
var reduction_results = landcover_class.reduceRegion({
  reducer: ee.Reducer.sum().group({
    groupField: 1,
    groupName: 'Landcover ID',
  }),
  geometry: roi,
  scale: 100,
  maxPixels: 1e10
});
print('reduction_results', reduction_results);
var roi_stats = ee.List(reduction_results.get('groups'));
print('roi_stats', roi_stats)

///////////////////////////////////////////////////////////////////
var roi_stats = ee.List(reduction_results.get('groups'));
// Create a dictionary for looking up names of transition classes.
var lookup_names = ee.Dictionary.fromLists(
    ee.List(gsw.get('classification_values')).map(ee.String),
    gsw.get('classification_names')
);
print (lookup_names)
// Create a dictionary for looking up colors of transition classes.
var lookup_palette = ee.Dictionary.fromLists(
    ee.List(gsw.get('transition_class_values')).map(ee.String),
    gsw.get('transition_class_palette')
);
print (lookup_palette)

however, these code doesnt work and something appears in console "Dictionary (Error)
List.map: Parameter 'list' is required.
"
How can I fix this?


texts: Add a new field to a layer containing the ovelapping area with another layer in QGIS

texts: I'm working with QGIS 3.16 Hannover under MacOS 10.13 environment. I've got two polygon layers: natural_parks (multiple features) and region (single feature). I want to add a new field to the layer natural_parks that computes the overlapping area of each Natural Park with my region. Is it possible to do so with the field calculator? So far, I've been able to get it by means of a virtual layer, but I want to insert the results into the original layer.


texts: Angle Coefficient Generator for Landsat 4-5-7 from USGS does not work

texts:
I'm currently trying to use the function proposed here :
https://www.usgs.gov/land-resources/nli/landsat/solar-illumination-and-sensor-viewing-angle-coefficient-files?qt-science_support_page_related_con=1#qt-science_support_page_related_con
by the USGS.
The main purpose is to produce pixel-based sun-surface-sensor geometry information, such as Viewing Zenith Angle (VZA) or Solar Zenith Angle (SZA).

To do it, it is explain that we have to download a function, one for Landsat 4 to 7 and one for Landsat 8. Both function need to be used through bash script.

The input for the function is simply the *_ANG.txt metadata file downloaded from earth explorer and the output are pixel-based VZA and SZA for each band.

It works perfectly for landsat 8 (l8_angles function) but the function for other landsat (landsat_angles) return this error :

angle coefficient filename is /PATH/LT05_L1TP_195029_19960724_20180215_01_T1/LT05_L1TP_195029_19960724_20180215_01_T1_ANG.txt.
Unable to open the output file.  Messages will be written to the terminal

--------------------------------------------------------------------------
Parsing File:  /PATH/LT05_L1TP_195029_19960724_20180215_01_T1/LT05_L1TP_195029_19960724_20180215_01_T1_ANG.txt
--------------------------------------------------------------------------

--------------------------------------------------------------------------
End of Parsing File:  /PATH/LT05_L1TP_195029_19960724_20180215_01_T1/LT05_L1TP_195029_19960724_20180215_01_T1_ANG.txt
--------------------------------------------------------------------------

2019 134 18:27:52  Angle Gen   2159      gxx_angle_gen_read_ang.c      1062    Unable to open the output file.  Messages will be written to the terminal
: check out /usr/tmp/ODLEr15578512729045452159.dat
2019 134 18:27:52  Angle Gen   2159      landsat_angles.c            82    Error reading the angle coefficient file.

The code calling the function is :

./landsat_angles/landsat_angles $pathtoAng

with $pathtoAng corresponding to the Path ending with _ANG.txt

Can't find anything on the internet.
Can't propose data to test for the bug.


texts: Driving near analysis by matching attributes to give location or at least angle or bearing using ArcGIS Desktop?

texts: I need to match corner parcel centroids to their corresponding street segment. I want to create an event layer from a near analysis (that matches by street name) to be able to place or create a new point near the street. It would be fantastic if the match could use a like statement to widen the search and lessen front end attribute processing. The standard near analysis is only driven by distance and does not accomplish the matching. Near by Group only offers the distance. I need the location or at least the distance and a bearing.


texts: Is it possible to show a map information, at the personal tool window?

texts:
I'm creating a tool to change some 'Map Document Properties' (for example Title, Description, Author), with arcpy (it can also be model builder, or both), to execute from a personal toolbox.

But I want to know if is it possible to show the actual information of the property I want to change at the tool window, before I run it. Just like the 'Project' tool does. It reads the input coordinate system, and show it:

I think it could be something like 'print', but to work before run the tool, and display it... But I do not know how to do it.

This way, I could run it in a batch mode, and easily see the mxd's that I really need to update, and the ones already updated.

It would be something like this:

Input mxd

MXD 'Map Title' (given)

MXD 'Map Title' Change (optional)


texts: How to set proportional value in legend?

texts:
I have a GIS table with traffic flows.The thickness is proportional to the traffic value and I'd like to have a little legend with 3 links proportional to setted value (eg: link1 proportional to 100 vehicles, link2 proportional to 500 vehicles and link3 proportional to 1000 vehicles).
Any suggestions?
I tried to use the "Legend" but it only represents a coloured link with no thickness.
I am using QGIS 1.8 Lisboa on Win7.


texts: Passing options to ogr2ogr using python subprocess.Popen

texts:
I'm trying to programmatically import some shapefiles to PostGIS, since I need to catch the exit code of the process I decided to use subprocess.Popen. I've managed to import the files using:

cmd = ["ogr2ogr","-f", "PostgreSQL", "PG:dbname=idegeo host=localhost port=5432      user=postgres password=postgres",
        "-nlt", "PROMOTE_TO_MULTI","-nln","tablename",
        "-unsetFieldWidth","shape.shp"]
process = subprocess.Popen(cmd,stdout=subprocess.PIPE)
output = process.communicate()[0]

Now, the only thing I'm having problems is in passing the argument --config PG_USE_COPY YES to increase performance (as suggested here).
I've  tried using [someargs,"--config", "PG_USE_COPY YES"] but Popen refuses to recognize the value passed to --config


texts: How do I create a binary mask using Pixel values from a Numpy Array over a certain value (i.e. >1000), in Python

texts:
I would like to create a binary mask using the height values from a Digital Elevation Model, and export this out as a tif. For example, generate a mask for areas over 50m

My code so far:

from osgeo import gdal
import numpy as np
ds = gdal.Open("DEM.tif")
DEM = np.array(ds.GetRasterBand(1).ReadAsArray())

print(DEM.shape)
print(DEM.size)
print(DEM)

This results in reading the raster as an Array

The next step is for me to create a binary mask of values over, say, 1000m, and export this as a tif. file


texts: PyQGIS Error using standalone script when loading a vector layer

texts:
I've been able to execute the command below in the Python console in QGIS. I am able to execute from qgis.core import * and import qgis.utils with no errors in the OSGeo4W shell but adding the layer I am still getting QObject::connect: Cannot connect <null>::raiseError< QString > to QgsVectorLayer::raiseError< QString >

The script below works in the Python console within QGIS. My paths are set in Environment Variables as: PYTHONPATH=c:\OSGeo4W\apps\qgis\python and PATH=c:\OSGeo4W\apps\qgis\bin

from qgis.core import *
import gdal
import qgis.utils

QgsApplication.setPrefixPath("C:\\OSGeo4W\\apps\\qgis", True)
QgsApplication.initQgis()
print QgsApplication.showSettings()

layer = QgsVectorLayer('/path/to/shapefile_folder/test.shp', 'test', 'ogr')

if not layer.isValid():
    print "Layer failed to load!"

else:
    print "Layer was loaded successfully!"

QgsMapLayerRegistry.instance().addMapLayer(layer)


texts: QGis, how to overlay and correctly position and scale a KML and image onto a Google base map

texts:
Being totally new to the entire GIS subject I managed to install and get runnning QGis (2.2.0 on Mac) properly, get my Google Maps showing (I set the the CRS to WPSG:3857) and I also got my KML file of the island of Phuket.

Now I have to show the KML correctly positioned and scaled on the corresponding Google Map section of Phuket to then amend that KML with further details (KML needs a little fine-tuning, i.e. slight re-positioning of some of the coordinates to make them a bit more correct and I need to add to the island's outline also the inner "district boundaries".

Sorry for this so basic question, but any pointer to some links/tutorials where that subject (superimposing a KML/image, correctly positioned and scaled on top of a Google base map to edit a KML) is covered so that I can read and take it from there would be EXTREMELY helpful! Seems I don't have the proper pro's lingo yet as my Google searches don't really return any links which precisely enough cover that subject.

THANKS !


texts: Create an action in QGIS 2.18 to show image?

texts:
(Windows 10.1 and QGIS 2.18)

I am trying to create an action for a Shapefile layer that will display an image when any of its three polygons are clicked.

I have added an "image" field to the layer's attribute table, and changed it to "File Name" type, so that each of the layer's polygons has an image associated with it.

I then went to layer properties > actions and created the action as shown in the screenshot below.

But when I tried to click on one of the layer's polygons, I got the following error:

"Unable to run command
open C:/Users/******/Downloads/QGIS-Training-Data-QGIS-Training-Data-v1.0/training_manual_data/school_property_photos/rugby_field.jpg"

I tried to find what I had done wrong, but as far as I could see, I had done everything right. I tried to research but found nothing helpful. I tried to restart both QGIS and my PC but I still got the same error.


texts:
I have a map on the link below:

http://gis.xyz/openlayers/openlayer.html
The map works well, however there is one thing what is frustrating me. When I load the page and the first thing what I try to do on the map is pan the map window change to white and the coordinates change to NaN, NaN. If I start with zoom in or out the map and the pan function work as well. Is there anybody who can provide me a solution?


texts: Calling in-line model variable substitution in python script

texts:
For the model results in Model Builder, I am writing a python script tool which would write the results into a simple text (.txt) file. The problem I am encountering is that I do not know how to call the in-line model variable substitutions in a python script code. I have a few in-line model variables that I need to use for the results writing, for example, one comes from the Parse Path tool as a "Name_DBF". In code it is defined as route_name. How to complete the code correctly as I am getting syntax errors?

import arcpy
import os
import sys

workspace = r'C:\Users\Aura\Desktop\Andriui'

input_table = arcpy.GetParameterAsText(0)

route_name = %Name_DBF%

dvir_tipas = arcpy.GetParameterAsText(1)

# this is how you create a file in Python
file = open('C:\Users\Aura\Desktop\Andriui\RouteDesc.txt','w')
# create a row object to navigate your table
rows = ap.SearchCursor(input_table)
row = rows.next()
# for each row in your table, retrieve the value in the 'XXX' field, convert it
# to a string, write it to your output file, then move to the next line in both
# your input table and output file for row in rows:
file.write("Maršruto pavadinimas:" + str(route_name) + '\n')
file.write("Maršruto atstumas:" + " " + str(row.Atstumas_M) + " " + "km" + '\n')
file.write("Maršruto reljefo sąskaida:" + " " + str(row.Reljefo_S) + " " + "%" + '\n')
file.write("Maršruto sudėtingumas balais nuo 1 iki 3, kai 1 - lengvas, 3 - sunkus maršrutas" + " " + "-" + " " + str(row.Suapvalint) + '\n')
file.write("Apskaičiuota dviratininko tipui: " + " " + str(dvir_tipas) + " " )
del row, rows
file.close()

print "table field data successfully written into file"


texts: Interpolating only cells in raster that are adjacent to existing cells with value using ArcGIS Spatial Analyst?

texts:
I have raster data of a continuous field. I need to calculate zonal statistics on that data for some polygons (e.g polygons A and B in the image).

It is essential that I have as complete as complete a raster coverage for each polygon as possible but around polygon boundaries I have missing data which I would like to interpolate.

The nature of the data means I cannot reasonably interpolate more than 1 cell from a known value. So for polygon A where data has not been collected I want the raster cells to remain NoData (unless it is within a single-cells distance of a sampled cell).

Is there a raster analysis 'spread' function or similar that will interpolate only cells like the ones in green in the second image i.e. interpolate values only for cells that are adjacent to those that have a value?


texts: ArcMAP SQL Statement Iterate Feature Selection 'IN' 'BY' 'IS' - escape character

texts:
We have a problem when selecting Features from a Feature Class in ArcMAP 10.2 using the Iterate Feature Selection tool in ModelBuilder.

Our dataset has a Attribute Field with two character codes like 'AO', 'IN','BY','TR' and 'IS'. However the tool crashes because the SQL Statment cannot be evaluated. IN, IS and BY are reserved Words in SQL. How can i escape this behaviour?

This is the Error message in the log:

 ERROR 999999: Error executing function.
 An invalid SQL statement was used.
 An invalid SQL statement was used. [BY]
 An invalid SQL statement was used. [SELECT * FROM BY]
 Failed to execute (Feature Class to Feature Class).

And the model is this:

https://www.dropbox.com/s/msgo810uz28tprg/Modelbuilder.jpg


texts:
I have 99 LS8 scenes (mountainous terrain) and before processing them any further I would like to mask out cloudy and snow pixel since they might mess up the topographic correction I have to apply. My ultimate goal is a NDVI/EVI time series, so I can treat each scene for itself.
I tried the USGS surface product since it contains already a cloud mask but it contains too many artefacts for my study area and also maps out landslides, which are my subject of study.
I also tried FMask, providing really bad results.

Does someone have any recommendation how to handle this problem? I mean, in the end it might be quicker to build a separate mask for every scene instead of struggeling but an automatic approach would be ideal (like a DT).


texts: GRASS GIS - r.water.outlet - What is my mistake?

texts:
I'm new to GIS - more so in GRASS GIS. I installed GRASS GIS 6.4.3svn in my Windows 7 machine. No problem in installation.

Downloaded SRTM-Geotiff file
Location, Mapset all o.k
Used r.in.gdal to import SRTM file
Filled the sinks using r.terraflow
Masked the filled raster
Zoomed the required region & set the computational region
Ran r.watershed using threshold=10000
Got drainge, basin, stream & visual rasters
Visual rendering of rasters (drainge, basin, stream & visual) - o.k
Different Watersheds (basins) displayed for entire area
Zoomed stream raster to find lat/lon of mouth of river (cross checked with Google earth)
Converted the lat/lon as decimal
Ran r.water.outlet using stream as input & gave the lat/lon as easting & northing
Sadly the output display is blank
Rerun r.water.outlet - only a small dot in the lat/lon point. No delineation of watershed for the given easting & northing
All the above procedures as per manuals
Self learning of GRASS GIS - no formal training

Since I'm new here, I'm not permitted to upload the result images - Sorry...

What is the mistake I'm doing? How to get the watershed (basin) for the given lat/lon? Kindly help. Thanks in advance...


texts: Erasing spatial reference from GeoTIFF raster using ArcGIS Desktop?

texts:
I am wondering is there any way to remove spatial reference from Geotif file, a composite of WorldView-3 8 bands in single Geotif file on projected coordinate system i.e. UTM. I guess spatial reference information is embedded within this single file. As such, there are no associated files supplying spatial information.

I have used gdal translate utility available in QGIS recommended in the link on GIS StackExchange) but it didn't worked. No baseline .tif file is exported by the utility. The output raster file is again a composite .tif file retaining its previous spatial references, specially, earlier coordinates which are visible on taskbar in ArcMap. No associated tif files (World file) could be seen in destination folder to remove spatial references from there. What might be the solution to get desirable output?


texts: Replace Feature Class with Another Feature Class inside an .mxd

texts:
I am trying to create a script that makes a copy of the same feature class within the same file GDB by using the "copyfeatures" syntax which works fine.  I am then trying to iterate through a list of .mxd's within a certain directory and find any .mxd with the feature class that I made a copy of and replace that feature class with the newer version or the copy of that feature class that I created earlier in the script.

The scripts seems to be running with the syntax below, the .mxd's are being saved and the script runs with no problems.  However, the feature class in the .mxd is not updating.

import arcpy, os
arcpy.env.overwriteOutput = True
arcpy.env.workspace = r"C:\GISShare\jehmann\TESTING.gdb"

workspace = r"C:\TEST"
outdata_1 = r"C:\GISShare\jehmann\TESTING.gdb\JeffNotes_SHLs"

# Copy New Version of the Feature Classes

try:
    arcpy.CopyFeatures_management('Notes_SHLs', 'JeffNotes_SHLs')
    print "SHLs Feature Class Created Succesfully!"
except:
    print "Failed to Create SHLs Feature Class"

for dirpath, dirnames, filenames in arcpy.da.Walk(workspace, topdown=True):
    arcpy.env.workspace = dirpath
    mxds = arcpy.ListFiles('*.mxd')
    for filename in mxds:
        print "------------------------------"
        print filename
        mxd = arcpy.mapping.MapDocument(os.path.join(dirpath, filename))
        for layer in arcpy.mapping.ListLayers(mxd):
            if layer.supports("DATASOURCE"):
                print "{} -> {}".format(layer.name, layer.dataSource)
                if '%Notes_SHLs%' in layer.dataSource:
                    layer.replaceDataSource(layer.dataSource, "FILEGDB_WORKSPACE", outdata_1)

        mxd.save()

I think it has something to do with how I have the layer.replaceDataSource set up?


texts: ArcGIS Desktop 10.0 -- layout Data Frame Grid color inversion on export or print when other rasters are active

texts:
Having a problem with ArcMap 10.0 SP1 Data Frame Grid of graticule inverting color on export or when printing.

Occuring on multiple classroom PCs all working with the same datasets. Exporting to raster formats (PNG, JPEG) with resolution set under 149 dpi layout renders correctly.  But with any higher resolution, or for export to a mixed vector raster mode (PDF, AI) the Data Frame Grid inverts color (gradicule goes white--remainder of grid layer is solid black).  As this is the top layer of the map layout it renders the map useless.  Also, it does not occur when raster layers in the MXD are all turned off, just when one raster is active.

I assume the Data Frame Grid from the layout is converted to a raster layer as part of the print or export by some library. Does anyone have a good grasp of where this occurs and how the conversion can be adjusted to prevent inversion for reliable printing and export results?


texts: Python: using CalculateField_management for duplicating attributes with a double quotation mark

texts:
I am writing a python script which duplicates a field. The field contains names of pipelines but some of these names has double quotation (ex. 8" NGL PIPELINE). I have created a new field and trying to copy the attributes using:

arcpy.CalculateField_management(PL_XING_SUMMARY,"PLNAME", "'!FIRST_PLNA!'", "PYTHON_9.3");

But the script double quotes whole attributes (ex. "8" NGL PIPELINE"). Is there a way to remove the double quotation marks at the start and end of each attribute?

P.S. I am using ArcGIS version 10.1 Service Pack 5


texts:
My dates (maxDate, minDate, avgDate) all print out with the correct datetime format, but I am unsure if the problem is how the loop is written to update the cursor.

Error:

line 102, in updateRow
    return convertArcObjectToPythonObject(self._arc_object.UpdateRow(*gp_fixargs(args)))
RuntimeError: ERROR 999999: Error executing function.

Code:

arcpy.env.workspace =  r"C:\ForChris\wetMatchs\SBA_wetlandTR_int\SBA.gdb"
fcs = arcpy.ListFeatureClasses()
years = []
yearsJD = []
for fc in fcs:
    arcpy.AddField_management(fc, "Max_Year", "Date")
    arcpy.AddField_management(fc, "Min_Year", "Date")
    arcpy.AddField_management(fc, "Avg_Year", "Date")

    cursor = arcpy.SearchCursor(fc)
    for row in cursor:
        fDate = row.getValue("Final_Date")
        a = (14 - fDate.month)//12 ## Julian date calc
        y = fDate.year + 4800 - a
        m = fDate.month + 12*a - 3
        JD = fDate.day + ((153*m + 2)//5) + 365*y + y//4 - y//100 + y//400 - 32045
        yearsJD.append(JD)
        years.append(fDate)
    averageJD = sum(yearsJD) / len(yearsJD) ## calculates average julian date
    az = averageJD + 32044 ## convert julian date to calendar date
    b = (4*az + 3)//146097
    c = az - (146097*b)//4
    d = (4*c + 3)//1461
    e = c - (1461*d)//4
    n = (5*e + 2)//153
    aday = e + 1 - (153*n + 2)//5
    amonth = n + 3 - 12*(n//10)
    ayear = 100*b + d - 4800 + n/10
    avgDate = datetime.datetime(ayear, amonth, aday)
    minDate = numpy.min(years)
    maxDate = numpy.max(years)

    cursor2 = arcpy.UpdateCursor(fc)
    for row2 in cursor2:
        row2.setValue("Max_Year", maxDate)
        row2.setValue("Min_Year", minDate)
        row2.setValue("Avg_Year", avgDate)
        cursor.updateRow(row2)
    del years[0:len(years)] ### Empties List
    del yearsJD[0:len(yearsJD)]


texts: Google Earth Engine: Prevent Cloud mask algorithm for Landsat-8 from removing coastline lines

texts:
I'm a new Google Earth Engine user an I am trying to remove clouds on Landsat image using cloud mask. However, the cloud mask removes even the shoreline lines, not the clouds. I don't know why. Is there another way?
(upper: pre-masked image; lower: cloud masked image)

var point = /* color: #98ff00 */ee.Geometry.Point([121.91094599921439, 36.819887452954504]);

var cloud_masks = require('users/fitoprincipe/geetools:cloud_masks');
var landsatSRfunction = cloud_masks.landsatSR;

// The original Image
var L8Image = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR')
  .filterBounds(point)
  .filterDate('2014-04-01', '2014-05-30')
  .sort('CLOUD_COVER')
  .first();

// Apply mask
var masked_image = landsatSRfunction()(L8Image);

// Visualize
var vis = {bands:['B5', 'B7', 'B4'], min:0, max:5000}
Map.addLayer(L8Image, vis, 'origin');
Map.addLayer(masked_image, vis, 'Landsat 8 SR masked');
Map.centerObject(masked_image, 10)


texts: Importing Several Latitude and longitude Points From a Smartphone App into a CSV File

texts:
I am using a GPS App on Android that export my location as a latitude and longitude values.

For each location it exporting a separate data set:

Latitude (LAT): 32.05796
N 32°3'28.6578"
Longitude (LONG): 34.83233
E 34°49'56.39448"

It is quite easy to copy this data into a CSV file and then to upload it into QGIS.

However, it is time consuming especially when I have 15 or more locations to add.

I have tried some GPS apps and they all doing pretty much the same thing.

Is there some App or a method that enables to collect several locations in one table?

Once the table is saved as CSV it should not be a problem to import it as CSV into QGIS.


texts: How to lock a WMS layer to scale in QGIS?

texts: I am making a A0 size poster map and need a very detailed basemap. Is there a way to lock the OpenStreetMap basemap to a certain scale/zoom so that it would be very detailed in the final print map? I can only get it to print in a big scale which simplifies the map a lot. The area I need to map is fairly big but I need it to still be detailed. I'm using QGIS but have access to ArcGis Pro as well.


texts:
I can't figure out what is specifically being referenced by the names of these .las files:

They correspond to a specific quadrangle, but can't figure out quite how.


texts: What are my options to handle Raster Clipper ERROR 6: ADRG driver doesn't support 4 bands?

texts:
I have a tif file which contains 4 bands (RGB + alpha). The clipper does not work and gave me the message below;

ERROR 6: ADRG driver doesn't support 4 bands. Must be 3 (rgb) bands.

Any patch file or solution to this problem?  BTW I'm using QGIS 2.4 on Mac OS X Lion 10.7.5

Alan B. Loreto
Faculty, Dept of Geodetic Engineering, VSU


texts: Imported GPS data does not overlap with map

texts:
I´m working on QGIS and I geocoded 2 addresses of a city in Germany and tried to input the text-file as a layer. It worked, but the 2 points must be in the map of the city and if I zoom to the layer-file they are far away. I tried EPSG 3857 (like the other layers) and ESPG 4326. With the last one it was much nearer, but still not in the city-map. On-the-fly-projection is activated.

Does anybody know, how I get the points into the right place in my map? Am I using the wrong projection?

Thank you.


texts: OpenFeatureForm() function in QGIS not cancelling edits

texts:
I'm trying to create new features in an existing vector layer and I want to display the attribute form so the user can fill the attributes data. I successfully managed to show attribute form and users can add attributes in it. But while displaying the form, if user cancels the modification, still new feature is getting added in my layer. Please suggest, how i can avoid this scenario. Please check my code below.
{
layer = iface.activeLayer()
if layer.isEditable():
   feat = QgsFeature()
   feat.setGeometry(geom)
   feat.setFields(layer.fields())
   attr=iface.openFeatureForm(layer, feat)
}


texts: Google Earth/Maps aerials via arc2earth producing cuts in PDF output

texts:
I just purchased a month of arc2earth. They provide Google imagery backgrounds with great resolution and display fine in ArcMap but after exporting to PDF they have these triangular cuts as seen here:

Anyone ever worked with arc2earth before and seen this?
Please don't tell me there is no fixing this and the cuts in the PDF are arc2earth's way around Google's legal issues.


texts: plugin installation failed from own repo

texts:
I have developed some plugins for use in our company only. And for the purpose of installing them and keeping them up to date, I created a repo and the users who need our plugins just add this repo to there qgis plugin managment.

The installation and the updates work fine for two of our plugins. But for the other two, the plugin installer seems to stop extracting files. It always happens and the files that are extracted are always the same. I tried rezipping them but it does nothing.

My repo-xml look like this.

<?xml version="1.0"?>
<plugins>
   <pyqgis_plugin name="Dbg_Gruenkatastertoolbar" version="2.9.7">
     <description>d.b.g. Gruenkatastertoolbar - interaktive Schnittstelle zum d.b.g. Gruenflaechenkataster</description>
     <homepage>http://www.datenbankgesellschaft.de</homepage>
     <qgis_minimum_version>2.18</qgis_minimum_version>
     <file_name>DbgGruen.zip</file_name>
     <author_name>Jan Lippmann, Alexander Barth</author_name>
     <download_url>file:////dc1/dbg/software/produkte/gis/qgis-repo/dbggruen.zip</download_url>
   </pyqgis_plugin>
   <pyqgis_plugin name="Dbg_Strassenverwaltungstoolbar" version="1.2.0">
     <description>d.b.g. Strassenverwaltungstoolbar - interaktive Schnittstelle zur d.b.g. Strassenverwaltung</description>
     <homepage>http://www.datenbankgesellschaft.de</homepage>
     <qgis_minimum_version>2.18</qgis_minimum_version>
     <file_name>DbgSaa.zip</file_name>
     <author_name>Jan Lippmann, Alexander Barth</author_name>
     <download_url>file:////dc1/dbg/software/produkte/gis/qgis-repo/dbgsaa.zip</download_url>
   </pyqgis_plugin>
   <pyqgis_plugin name="Dbg_Baumkatastertoolbar" version="2.8.6">
     <description>d.b.g. Baumkatastertoolbar - interaktive Schnittstelle zum d.b.g. Baumkataster</description>
     <homepage>http://www.datenbankgesellschaft.de</homepage>
     <qgis_minimum_version>2.18</qgis_minimum_version>
     <file_name>DbgBaum.zip</file_name>
     <author_name>Jan Lippmann, Alexander Barth</author_name>
     <download_url>file:////dc1/dbg/software/produkte/gis/qgis-repo/dbgbaum.zip</download_url>
   </pyqgis_plugin>
   <pyqgis_plugin name="Dbg_Spielkatastertoolbar" version="2.8.5">
     <description>d.b.g. Spielplatzkatastertoolbar - interaktive Schnittstelle zum d.b.g. Spielplatzkataster</description>
     <homepage>http://www.datenbankgesellschaft.de</homepage>
     <qgis_minimum_version>2.18</qgis_minimum_version>
     <file_name>DbgSpiel.zip</file_name>
     <author_name>Jan Lippmann, Alexander Barth</author_name>
     <download_url>file:////dc1/dbg/software/produkte/gis/qgis-repo/dbgspiel.zip</download_url>
   </pyqgis_plugin>
</plugins>


texts: Computing concave hull from points using PostGIS and display in QGIS

texts:
I'd like to create a boundary of a set of point using ST_ConcaveHull function in PostGIS
My query works fine and I can see the polygon through the geometry viewer embedded in the pgadmin.
CREATE TABLE boundary AS
SELECT row_number() OVER () As id,  ST_ConcaveHull(ST_Collect(p.geom), 0.99) As geom
FROM mypoints p;

However, when I try to load the table in QGIS, it gives me an error saying the layer is invalid.
I try to explicitly define the geometry type as polygon, but this error Geometry type (GeometryCollection) does not match column type (Polygon)
CREATE TABLE boundary AS
SELECT row_number() OVER () As id,  ST_ConcaveHull(ST_Collect(p.geom), 0.99)::geometry(POLYGON,4326) As geom
FROM mypoints p;

How do I refine my query to create a table that can be recognised by QGIS?


texts:
I need to display map on the submenu li click with CQL filter which works for me but map displayed is as shown in screenshot. I am unable to adjust its center and zoom.

var map = new OpenLayers.Map('map');
var state="<%=state%>";
var wms;
$("#submenu li").click(function() {
  var id = $(this).attr('value');
var cql_filter="st_nm='"+state+ "'";
    wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
        "http://localhost:8083/geoserver/wms", {layers: [id], 'CQL_Filter': cql_filter}    );
    map.addLayer(wms);
    map.zoomToMaxExtent();
    document.getElementById("firstmap").style.display = 'none';
    document.getElementById("map").style.visibility = 'visible';});


texts: Printing Selected Area into Desire Map Scale

texts:
Can anyone help me ? I am using 3.10 QGIS.
What i am trying to do is select area from map, and divide them into piece (any scale i want).
So when i print them out, it wont intersect.

Here is some pic of what my purpose of the question .

Blackbox is the scale that i put, so i wonder if QGIS have a way to automatically divide the area and print them out.
Thanks.


texts: I only have UTM coordinates (Excel) that I have to convert into shapefile? Add x,y data doesn't work!

texts:
I have an Excel file that has UTM easting, northing coordinates. I don't have lat/long.

I guess adding x,y data is only for latitude and longitude? Whenever I tried, it's appearing in different location.

Is there any way to add spatial index to my UTM easting and northing and export that as shapefile?


texts: Make polygons the same spatial resolution as a GeoTIFF

texts:
I downloaded a GeoTIFF DEM from EarthExplorer and loaded it onto QGIS. This GeoTIFF is of the state of Florida. I have a shapefile (polygon) of the state and want to overlap it with the raster file so people can see where Florida's outline rest on the DEM. However, when I put two of them into QGIS the Florida shapefile is so much larger than the raster image (it covers up the entire image).

Both of these files have the same coordinate system so I'm a little confused. Is there any way I can somehow shrink the polygon file to fit into the raster image to show the state?

Here is an image:


texts: Pan sharpening of SPOT and Landsat images

texts:
Is there a way I can pansharpen SPOT and Landsat images? I have Panchromatic bands from QuickBird and WordlView-2 images and would want to pansharpen Landsat and SPOT, while still retaining features in my SPOT/Landsat images.

Yes - RGB composition

I have ENVI and ArcGIS.


texts: How to avoid Python 2.7 64-bit Error: 000732:

texts:
I have a Python script that creates a service area with the Network Analyst extension, (after building ND with Add GTFS to a Network Dataset)

The Network Dataset is in GDB

When I'm running the script with ArcMap it works, but when I'm running the script standalone it starts the Progress and then I have an out of memory error (it is caching a large database).

I installed the 64-bit background geoprocessing and I tried to run the same script using C:\Python27\ArcGISx6410.5\python.exe but I receive
"Error: 000732: Dataset does not exist or is not supported". I tried some different ways to insert the path of the network data set and didn't work.

import arcpy
from arcpy import env
import os

try:
#Check out the Network Analyst extension license
 arcpy.CheckOutExtension("Network")

#Set environment settings
 env.workspace = r"D:\GTFS\GTFS_ND.gdb"
 env.overwriteOutput = True

#Set local variables
 inNetworkDataset = os.path.join("D:\GTFS\GTFS_ND.gdb","GTFS\GTFS_ND")
 outNALayerName = "ServiceArea"
 impedanceAttribute = "TravelTime"
 inFacilities = "locetion\Test"
 outLayerFile = os.path.join("D:\GTFS\scripts" ,outNALayerName + ".lyr"

 outNALayer = arcpy.na.MakeServiceAreaLayer(inNetworkDataset, outNALayerName,
                              impedanceAttribute, "TRAVEL_TO", "60",
                              "SIMPLE_POLYS", "NO_MERGE", "RINGS",
                              excluded_source_name = ["Connectors_Stops2Streets", "TransitLines"],time_of_day= "1/1/1900 10:30 AM" )

in 64 bit I get the error:

Erorr 00732: Input Analysis Network: Dataset GTFS/GTFS_ND dose not exist or is not supported

What is wrong?

EDIT

I tested the script with other ND (With 64-bit ) and it work.
The problem is only in The ND that use GTFS and built step by step with this guide:
https://github.com/Esri/public-transit-tools/blob/master/add-GTFS-to-a-network-dataset/UsersGuide.md


texts: Find the extent of a GeoJSON FeatureCollection

texts:
How can I get of the extent of all features within a GeoJSON FeatureCollection with Python 3? One extent for all features, not one per feature.

The Feature collection includes multiple points features and multiple LineStrings features.


texts: Exporting a raster with renderer enabled to file

texts:
I have a problem when trying to export a layer with renderer to a file. Basically, what I have at start is a correct IRasterDataset. Then I define a stretch renderer in form of IMultiPortColorRamp and apply it to IRasterLayer created from input IRasterDataset.

Please take a look at my code:

//Create and fill the IRasterLayer object
IRasterLayer rasterLayer = new RasterLayerClass();
rasterLayer.CreateFromDataset(productDataset);
rasterLayer.Renderer = StretchRenderer(rasterLayer.Raster);

//Prepare the export
var rle = new RasterLayerExport();
IRasterLayerExport2 rle2 = rle as IRasterLayerExport2;
rle2.RasterLayer = rasterLayer;
rle2.Extent = rasterLayer.VisibleExtent;
rle2.Force2RGB = false;
IRasterStorageDef rsd = new RasterStorageDef();
rsd.CompressionType = esriRasterCompressionType.esriRasterCompressionUncompressed;
rle2.StorageDef = rsd;

//Export file
IWorkspaceFactory workspaceFactory = new RasterWorkspaceFactory();
IWorkspace workspace = workspaceFactory.OpenFromFile(fileFolder, 0);
var test = rle2.Export(workspace, "FILEX.TIF", "TIFF");

The StretchRenderer function uses the same code as CreateMultiPartColorRamp here: http://www.onspatial.com/2011/02/arcobjects-create-multipart-color-ramp.html?m=2

This results in a proper export of GeoTIFF but without the renderer applied. The exported file is usable in ArcMap and it has the default stretched visualization available. What can I do to export this raster altogether with the renderer?


texts: Can I highlight a selected feature using the ArcGIS REST API only?

texts:
I have a .Net web application with embedded maps, using the Arcgis javascript API. For non-interactive maps, I thought I would just make calls using c# to the REST endpoints. This works fine for returning a single image, but when I tried to work out how to highlight a feature, or overlay another map service layer I hit a brick wall.

The javascript solution works, except that there are a lot of server calls to produce a simple image, and it is still panning when I don't want it to.

I cannot see anyway to add a Graphics Layer to my "map", so am now thinking maybe I just have to stay with the javascript API. I have done a lot of reading (maybe too much!) but am now questioning my own understanding of the REST API.

I am consuming ArcGIS map services from a asp.Net MVC application. I have been using the javascript API in my razor views to provide simple zoom/pan functionality, but I am just wanting to display a static map image. I have managed to do this in my c# code to return an image to the view but I now realise that I only get part of the job done as I cannot highlight a feature (add graphic) nor overlay another mapservice.


texts: QGIS 3.4 ERROR:/bin/sh: 1: gdal_polygonize.py: not found

texts:
I am working with Xubuntu 18.04 Bionic and QGIS 3.4.

When I try to convert raster to vector (polygonise) with GDAL command

gdal_polygonize.py /home/tec/Documents/QGISdata/ADN_Avignon_DAB2018b/GeoTif/AviTw1kWdip0deg67a200dB_georef.tif /tmp/processing_edce935fd39d49c4b7e72e38ecf39bdf/c7ed019e0366436c80ac9ebd6e4a97b1/OUTPUT.shp -8 -b 1 -f "ESRI Shapefile" None DN

I get this message, GDAL command output

/bin/sh: 1: gdal_polygonize.py: not found

What can I do to get it working?


texts: I was using the Make Query Table tool in ArcGIS. Once the tool finishes running, the result (a table whose name I specify) is automatically added to the Table of Contents and I can view the data contained within. The source info shows that it's supposed to be stored inside of the geodatabase from which one of the tool's inputs was selected. However, I cannot find the table in the geodatabase. How can I locate this table?


texts: How to use custom marker symbols in CartoDB?

texts: I am new to CartoDB and haven't found a suitable answer to my search. I have a point layer uploaded to CartoDB and want to change the symbology to my own custom symbol - is this possible, and if so, how?


texts: Getting startAsciiWriting (x, filename, ....) error in R?

texts:
I am new to R. I am trying to transform elevation data in R for input into MaxEnt. Returned:

  Error in .startAsciiwriting (x,filename ...): x has unequal horizontal
  and vertical resolutions. Such data cannot be stored arc-ascii format.

Further information as requested:
The following script was run (from https://www.azavea.com/blog/2018/10/09/preparing-data-for-maxent-species-distribution-modeling-using-r/):

assign(paste0("elev_", "raw"), raster(“elevation.tif”))
assign(paste0("elev_", "projected"), projectRaster(elev_raw, crs=projection))
assign(paste0("elev_final"), elev_projected)
elev_extended <- extend(elev_final, ext, value=NA)
elev_final_re <- resample(elev_final, elev_final)
elev_tend <- extend(elev_final_re, ext, value=NA)
writeRaster(elev_tend, filename=”elev_output.asc”, format=’ascii’, overwrite=TRUE)

  Error in .startAsciiwriting (x,filename ...): x has unequal horizontal
  and vertical resolutions. Such data cannot be stored arc-ascii format.

What does this mean and what can I do about this?


texts: Buffering an ellipse on a points layer in QGIS

texts: I have a layer with a couple of thousand points in it. I need to overlay an ellipse (740m * 1100m) over each point. Is there anyway to do this quickly opposed to manually placing ellipses over each point?


texts: Making Unique ID field for Ordinary Least Squares in ArcGIS Desktop?

texts:
I need to perform an OLS (Ordinary Least Squares) but ArcGIS asks for a unique ID field. I have a field which would be the right candidate, it's a FIPS number (12 chars), which I have made a number, and text in Excel to no avail. OLS does not work without it...

How can I make it a legal Unique ID field?


texts: Finding all lines between multiple points with common attribute using ArcGIS Pro

texts:
I have a line layer, which is divided by points with a common attribute. Now I want to assign the attribute of points to all lines which are between these points. The line layer can also be used as a network layer. It contains no gaps.
Is there a solution for this problem using ArcGIS Pro?
Img 1: Screenshot of a part of the network with the boundary points.

Img 2: Screenshot of the desired result. (Manually created)


texts: How to get an image in my Raster field to show up in the pop up?

texts:
I am making a map of a neighborhood using GIS and ArcGIS Pro for the first time. I have a field in my lot feature for a raster to attach a picture of each lot to.

I can see the picture under my attributes tab but the pop up doesnt show it and when I try to add the images to the pop up through the configure pop ups tab the raster field isnt an option. What am I missing here?


texts: How do I address this error message in QGIS, "CSV file must be in UTF-8 encoding"?

texts:
When I attempt to use the MMQGIS geocoding plugin, I get the error message, "CSV file must be in UTF-8 encoding".

It causes the program not to respond for a few brief moments, then comes back with that error message.  Anyone have any suggestions?


texts: What is meaning of scale on x and y axis of image using matplotlib

texts:
I am finding elevation of a region using richdem.

Can somebody tell me what is the meaning of the scale which is on the x and y axis of the image?

import os
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import elevation
import richdem as rd
dem_path = "C:\\Users\\ARSH\\Desktop\\semester 8\\n12_e079_1arc_v3.tif"

matplotlib.rcParams['figure.figsize'] = (8, 5.5)
shasta_dem = rd.LoadGDAL(dem_path)
fig = plt.figure(figsize = (12, 8))
plt.imshow(shasta_dem, interpolation='none',cmap='jet')
plt.colorbar()
plt.show()