texts:
There is a surreal thing on my NDVI images. NDVI values on lake is ranging from -0.04 to 0.7. (The lake surrounded by forest and has freshwater). Theoretically, negative value of NDVI is correspond to water. I want to mask NDVI image to remove pixels with negative values which include waterbody. But there are still positive values on lake. So I cann't set zero mask to remove whole waterbody. So what I'm gonna ask are: (i) why NDVI value on water has so high positive value? is there any explanation for that? (ii) how can I mask waterbody in order not to remove the other pixels?

By the way, the NDVI images extracted from MOD13Q1 vegetation index product.

I have already converted reflectance value into NDVI value as dividing by scale factor (10000). I uploaded 2 images. first image is NDVI image in april where value of lake is negative (correct). In April, lake is fully covered by snow. This image doesn't have any problem.  This one is NDVI image in June when no snow cover on lake.  . when I check values of other lakes on image 2, they are in correct (negative) values. Only this lake has positive value. The name of lake is Khuvsgul with freshwater.

So I'd like to ask whether green plant at the bottom of the lake can effect on the NDVI value during the period no snow cover on lake or not?

I don't have any idea other than this guess.


texts: how to create a new raster from one field of a raster with several fields in a RAT

texts: I have a raster with an attribute table containing many fields.  I want to create a new raster from one field using ArcGIS 10.1.


texts: Feature class Representation fails following an append

texts:
Background:

At Arc Desktop 10.6.1 I have an empty polygonal feature class (Let's call it "A") within a file geodatabase.  "A" contains a Representation that specifies symbology with a transparent fill and white outer boundary.  Here's a screenshot:

If I load the FC into ArcMap and add a polygon, its symbology displays as expected: transparent fill with a white boundary:

Problem:

Using the Append tool, a separate FC (without Representations) containing one or more polygons is appended to "A" ("A" may or may not be empty).  When "A" is subsequently loaded in ArcMap, the appended polygon(s) are displayed, but always with a solid red fill and no boundary.  Screenshot:

I expect that "A" should display its original transparent fill with a white outer boundary.  In fact, ArcMap Layer Properties indicates that it should be transparent/white.  Here's the screenshot:

Even more puzzling, altering the Representation symbology in ArcMap does not change the display: it is "locked" to a red polygon fill.

Interestingly, the red fill can be altered in ArcMap by abandoning Representations and using the Layer Properties > Single Symbol option, but I need to take advantage of the predetermined Representation symbology.

Question:

How to maintain the FC Representation symbology following an append?


texts: PostGIS 2 st_intersection FROM-clause error

texts:
I'm trying to run this query in a PostGIS 2 database:

create TABLE data.agri_grc as select
id, code_00,
ST_Intersection(data.agri.geom,data.grc_bor.geom) as geom from
data.agri;

But I'm getting this error:

ERROR:  missing FROM-clause entry for table "grc_bor"
LINE 3: ST_Intersection(data.agri.geom,data.grc_bor.geom) as geom fr...

What am I missing?


texts: Geoserver transparency of overlapping features

texts:
I'm serving a layer via WMS that has multiple Polygons with transparency set to 30%. The polygons can overlap each other resulting in darker areas where the transparencies combine. Is it possible to prevent this?

UPDATE:
Transparency is set via <CssParameter name="fill-opacity">0.5</CssParameter> of <Fill> element in SLD definition. The whole SLD looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
  xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
  <NamedLayer>
    <Name>plochaQ5ZU</Name>
    <UserStyle>
      <Name>Q5ZU</Name>
      <FeatureTypeStyle>

        <Rule>
          <Name>Q5ZU</Name>
          <Title>Q5ZU</Title>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter name="fill">#0070D4</CssParameter>
              <CssParameter name="fill-opacity">0.5</CssParameter>
            </Fill>
          </PolygonSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>

I'm using OpenLayers to display the layer.


texts: Does ArcSDE require Oracle Spatial rather than Oracle Locator licensing for any functionality when working with SDO_GEOMETRY?

texts: I'm looking for  specific information on whether the ESRI suite requires Oracle Spatial for any of the functionality, or if Locator is always sufficient for working with SDO_GEOMETRY objects?  Do you know of any ESRI documentation that discusses the minimum requirements in Oracle for working with SDO_GEOMETRY objects in the ESRI suite?


texts:
I have a column of NDVI values of several centroid of pixels and relevant longitude/latitude associated with it.
I want to convert this table to a raster image in ArcGIS 10.4.1. I know the conversion of a NDVI image to an NDVI table but not the other way around.
How can this be done?


texts: Raster Calculator Error : Insufficient memory available for operation

texts:
Performing Raster calculator with a raster of size about 750 mb and it is showing an error of insufficient memory .
Ram : 8 GB
I have a huge space available  at the location where it has to be saved.

Basically input raster is for 250 m NDVI in hdf format. I converted this hdf format to tif and then merged all tif to one merged file with GDAL. now when I am applying raster calculator on this input , it shows the error for insufficient memory.
Input raster Size is about : 750 MB.
compression is not done.

Output format  needed is tif


texts: Table Frame not fit to Layout ArcGIS Pro

texts: I have a layer where I have about 1500 data. When I put these as a table frame, it doesn't fit in the layout frame. There is a three-point symbology of the frame indicating that the data continues. For this, I want to divide the layout into pages. So I mean. I have a second layout but just keep the data. Is this possible? is there anyone who can help?


texts: How can I add a raster (that is in a geodatabase) to map?

texts:
I know how to add a feature class to map in ArcGIS Pro using arcpy:

arcpy.MakeFeatureLayer_management(fc_output, 'fl_output')
layer = r'D:\ArcGIS_Pro_Projects\Optimity_Alf\Temp\fl.lyrx'
arcpy.SaveToLayerFile_management(fl, layer, 'ABSOLUTE')
lf = arcpy.mp.LayerFile(layer)
aprx = arcpy.mp.ArcGISProject('CURRENT')
map = aprx.listMaps('MyMap')[0]
refLyr = map.listLayers('Results')[0]
map.addLayerToGroup(refLyr,lf)
aprx.save()

But I wouldn't know how to do the same thing with a raster layer that is in a geodatabase. Any ideas?


texts: Selecting the interior of line type data in PostGIS

texts:
I have asked about exporting geometry as a table (Link) and I got a very nice answer about how to do it with an SQL instruction.

Is there a way to select only the inerior of line type data? i.e. only the vertex that are not the ends.

The following instruction will produce all vertex

SELECT sub.name AS "Pipe",
               ST_X(sub.geom) AS "X-Coord",
               ST_Y(sub.geom) AS "Y-Coord"
        FROM (
            SELECT name,
                   (ST_DumpPoints(geom)).geom AS geom
            FROM conduits
        ) AS sub

Here is the output:

'1570','4978.95','2421.05'
'1570','2494.74','2421.05'
'1600','2494.74','2421.05'
'1600','2494.74','7536.84'
'1602','4957.89','7536.84'
'1602','2494.74','7536.84'
'8040','8115.79','3450.84'
'8040','9107.73','4350.80'
'8040','7463.16','7536.84'

I would like to get only:

'8040','9107.73','4350.80'


texts:
I'm hitting my head off a wall!
I Have installed renderd and mapnik on Debain squeeze v6.0.5. Renderd(version 0.7.1) is starting without error. But when I request the /osm_tiles2/0/0/0.png . The server times out would not found and the console  no map for: default

and google is no help :(

Huge Thanks


texts: How to classify the symbology with changed values in a field after using loadNamedStyle in PYQGIS?

texts:
First of all, I have exported a layer style from a layer as a QML file including draw effects (symbology --> layer rendering --> draw effects) in symbology. Note that, I have checked all the categories while saving it (see below image).

Then, I have changed the values in the field which I have configured a Graduated Symbology with. Then I tried to load the QML file with loadNamedStyle(). It did not change the legend and classes automatically. Therefore, I have tried a few things to automatically update that.
field = 'SPREAD'
stylepath = '/path_to_my_layer_style.qml'
layer = iface.activeLayer()
layer.loadNamedStyle(stylePath)
renderer = layer.renderer()
sym = renderer.sourceSymbol()
grad = renderer.sourceColorRamp()
renderVal = renderer.createRenderer(layer,field,5,0,sym,grad)
layer.setRenderer(renderer)

It worked. However, the effects in that QML file has disappeared after that. I also do not think this is the best way to do that. Is there a more convenient way to classify the symbology with new values after loading QML file in PYQGIS?


texts:
I have a sf dataframe table_sf as:

Classes ‘sf’, ‘tbl_df’, ‘tbl’ and 'data.frame': 12251 obs. of  5 variables:
 $ ID      : int  1 2 3 4 5 6 7 8 9 10 ...
 $ NOMBRE  : chr  "AL011900" "AL011900" "AL011900" "AL011900" ...
 $ FECHA   : POSIXct, format: "1900-08-27 00:00:00" "1900-08-27 06:00:00" "1900-08-27 12:00:00" "1900-08-27 18:00:00" ...
 $ INT     : num  18 18 18 18 18 ...
 $ geometry:sfc_POINT of length 12251; first list element:  'XY' num  -42.1 15
 - attr(*, "sf_column")= chr "geometry"
 - attr(*, "agr")= Factor w/ 3 levels "constant","aggregate",..: NA NA NA NA
  ..- attr(*, "names")= chr  "ID" "NOMBRE" "FECHA" "INT"

I will like to create lines between sequential points per each NOMBRE and each line must have the INT column with the value of the first point used to create it.

That will be: the line from point 1 to point 2 will have the INT value of point 1. The line from point 2 to point 3 will have the INT value of point 2. And so on for each of the NOMBRE

My approach has been to loop through each pair of points of each NOMBRE and create the line using the st_cast function of the sf package BUT I'm still far from making it work.

Here is the code I have so far (packages tidyverse & sf):

for (i in table_sf %>% group_by(NOMBRE) %>% summarise()) {
  table_huracanes <- table_sf %>%
    filter(NOMBRE == i) %>%
    mutate(numb = row_number())
  for (h in table_huracanes$numb) {
    linea <- table_huracanes %>%
      filter(numb <= 2) %>%
      group_by(NOMBRE) %>%
      summarise() %>%
      st_cast("LINESTRING")
  }
}

I think I'm still missing a couple of things:

Find a way in which I can select only two points for each of the
second for loop.
Create an empty sf dataframe (linestring or multilinestring?) where
to append each linea.

To clarify, the table before creating the sf dataframe looks like this:

NOMBRE     LAT     LONG      FECHA                INT
AL011900    15  -42.1   1900-08-27T00:00:00Z    18.0054
AL011900    15.2    -43.4   1900-08-27T06:00:00Z    18.0054
AL011900    15.3    -44.7   1900-08-27T12:00:00Z    18.0054
AL011900    15.4    -45.6   1900-08-27T18:00:00Z    18.0054
AL021900    19  -59.3   1900-09-13T12:00:00Z    33.4386
AL021900    19.5    -60 1900-09-13T18:00:00Z    36.0108
AL021900    20  -60.6   1900-09-14T00:00:00Z    38.583
AL041905    36.3    -48.6   1905-10-10T18:00:00Z    46.2996
AL041905    37.9    -47.9   1905-10-11T00:00:00Z    43.7274
AL041905    39.6    -47.1   1905-10-11T06:00:00Z    41.1552
AL041905    41  -46 1905-10-11T12:00:00Z    41.1552

Note that for each NOMBRE there are different INT values. That's the reason why I need to create lines between each pair of points.


texts: Adding metadata from JSON file as text to QGIS print layout

texts:
I have a have a static URL pointing to a json file on the web that I load to QGIS. It is updated regularly. In the source, before listing the features, it contains metadata, between else a line "creation_time": "[timestamp]".
I want to add the date/time as text to the print layout: how do I get the information? I tried to get it using expressions with layer_property( '[layer_name]', 'attribution'), but the output is empty.
The first few lines of the .json file look like this:
{
"crs": {
"type":"name",
"properties":{
"name":"[EPSG:code]"}
},
"license": "[license info]",
"mapname": "[name of the map]",
"map_long_name": "[despription of the map]",
"map_short_name": "[short name]",
"map_abstract": "[abstract of the map]",
"creation_time": "[timestamp]",
"type":"FeatureCollection",
"features":[


texts: Creating slope map with different colors according to slope percentage or degrees

texts:
I have converted a dxf file with contour lines into a polyline shapefile, and I have used the Raster Analysis plugin to create a grayscale slope map from this shapefile. I would now like to have different colors for this shapefile according to different slope percentages (or/and degrees). I am an urban planner and this makes it easy to define places which are easier and safer to build. For instance:

  Green: 0-20%

  Yellow: 20-29%

  Red: 30-39%

  Purple: 40-100%

I have tried to change the colors in the slope tif layer properties but have been unable to understand how to do that. Is it possible?

I know that it is for relief maps and color according to elevation but haven't found similar information about slope.


texts: How to make WFS-T layer grid panel with Geoext

texts:
I am using geoext,openlayers and geoserver. I am using WFSCapabilitiesStore to make the grid panel. I want to this grid panel WFS-T layer so that on each layer I can draw and edit feature after adding these layer to tree panel. My store object for for grid panel is this:

store = new GeoExt.data.WFSCapabilitiesStore({
         url: "http://mindcrewgis.com/geoserver/wfs?service=wfs&version=1.0.0&request=GetCapabilities",
         protocolOptions: {version: "1.0.0"},
          layerOptions: {
                         visibility: false,
                          displayInLayerSwitcher: false,
                           strategies: [new OpenLayers.Strategy.BBOX({ratio: 1}),saveStrategy ],
                           projection: new OpenLayers.Projection("EPSG:4326"),
                          geometryName: "geom",
                          srs: 'EPSG:4326',
          }

    });
     // load the store with records derived from the doc at the above url
    store.load();

The above store object is displaying properly the grid as well as all layers, but after adding the layer to the tree panel and I draw feature on layer. The feature is not saved. Can anybody help me to that? how can i make a grid panel and layer to editable feaure?

Thanks in advance.


texts: Change python installation directory arcgis

texts: I've recently installed arcgis 10.2 on C: of my machine, I did this while my external HDD was plugged into E:, and the installer put python onto the E: Why it would do this I have no idea. Now I can't do anything in ArcPy or toolbox unless I have the HDD plugged in. Am I able to move this python27 installation and then tell arcgis where I have moved it to, or do I need to re-install (without my HDD plugged in)?


texts: Is it possible to include information about a neatline in a GeoTIFF?  If so, how?  What software will produce them?


texts: Attribute table updating using ArcPy cursors?

texts:
I have a line type shapefile representing the road network of a country. That the country has experienced more change in the road names is why I want to create a script that will help me make update the attribute table of the shapefile based on an excel file as a data source

excel file has three fields [RoadName, District, City]

the attribute table has four fields [ROAD_NAME, District_Name, CITY_NAME, ID_Road]

CITY and DISTRICT are input parameters (GetParametreAsText)
CITY 1 = input value
DISTRICT 2 input value =
Example:

in this case the script should be able to check if the input value CITY corresponds to the attribute table of the shapefile if you must assign the correct value (input value)
whether it is necessary to check whether the District corresponds to the one in the attribute table if you must assign the right value (value input2)
if the value of the district (District == Input value 2) check in later RoadName if it matches ROAD_NAME
if yes go to the second line.

I've tried this code but not working

import arcpy
CityName=arcpy.GetParameterAsText(0)
DistrictName=arcpy.GetParameterAsText(1)
cursor1=arcpy.da.UpdateCursor("ExcelFile$",["CITY","DISTRICT","RoadName"])
cursor2=arcpy.da.SearchCursor("ExcelFile$","ROAD_Name")
cursor3=arcpy.UpdateCursor("Shapefileroads")
dict={}
for row in cursor1:
    if row[0] ==CityName:
        if row[1]==DistrictName:
            pass
        else:
            row[1]=DistrictName
            cursor1.updateRow(row)
    else:
        row.CITY_Name=CityName
        cursor1.updateRow(row)
for row2 in cursor2:
    dict={row2}
for row3 in cursor3:
    if not row3 in dict:
    row3.ROAD_Name=row2[0]
    cursor3.updateRow(row3)


texts: MGI_Lambert to WGS48 UTM33 transformation problem

texts:
I tried to reproject a raster (DEM) with MGI_Lambert Projection (Austria) into WGS48 UTM33 Zone. I did it with ArcMap 10.6 using the recommended MGI_To_WGS_1984_3 transformation aswell as a transformation with QGIS 3.8 but encountered the following artefact/error upon completion of transformation:

The tiled image in the GIF is from the transformed raster (showing slope deduced from the dem) which seems to have 75x75m tiles which are slightly rotated. Those artefacts are not only visible on derivatives of the DEM but also affect for example flow-routing.

Can anybody explain what went wrong and how I can transform correctly?


texts: Is it possible to create a unique pivot table for each page of a QGIS Atlas?

texts:
I have a shapefile of city points and a LibreOffice spreadsheet of daily information about each city. The data is fine, I successfully built a pivot table in LibreOffice that sums city data over a two week period and joined that pivot table to the city point file via the common 'cityid' column. And the map in the QGIS layout is looking good.

When new daily tabular data comes in, I add it to the LibreOffice spreadsheet, refresh the pivot table in LibreOffice and then refresh the QGIS map. So far, so good. But if I want to look at the data from a month ago in QGIS, I have to go back to LibreOffice, edit the range of dates in the pivot table and refresh QGIS. I could create a unique pivot table and join layer for each day, but I'd like to avoid doing that if possible.

My question is, is it possible to use the Altas feature of QGIS to create a unique pivot table (or expression to the same effect) for each page? For example, Page 1 would show a map with the data from Jan 1 - Jan 14, Page 2 would show a map with the data from Jan 2 - Jan 15, and so on. I've used basic Atlas functions before but haven't had luck getting this to work, or finding another elegant solution.


texts:
I am trying to use CARTO API with my HTML to display a map, code below:

<!DOCTYPE html>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <link rel="stylesheet" href="http://libs.cartocdn.com/cartodb.js/v3/3.15/themes/css/cartodb.css" />

I cannot get my map to display though, does anyone know why?


texts: Converting Esri world file .jgw into xy corner coordinates?

texts:
I'm trying to convert a .jgw (esri worldfile) into xy corner coordinates for a series of JPEG images im outputting using arcpy.mapping.ExportToJPEG(mxd, "E:\\TEMP\\" + str(x) + ".jpg", df, df_export_width=2900, df_export_height=2200, world_file=True)

0.730507756372400
0.000000000000000
0.000000000000000
-0.682083946764469
1819654.840921224100000
5534353.061382980100000

Ideally I will end up with a tab file looking like this:

!table
!version 300
!charset WindowsLatin1

Definition Table
File "aerial.jpg"
Type "RASTER"
  (2661750.000000,6512125.000000)(0,0) Label "P1",
  (2662000.000000,6512125.000000)(800,0) Label "P2",
  (2662000.000000,6511750.000000)(800,1200)Label "P3",
  (2661750.000000,6511750.000000)(0,1200) Label "P4"
  CoordSys Earth Projection 18, 31, "m", 173, -41, 2510000, 6023150
  Units "m"

Could anyone help me with the conversion math from world to corner, either in principle or even better, in python.


texts: Classifying USA medical facilities as rural or urban from address or zip code R

texts:
I have a list of thousands of USA medical provider locations (street addresses, zip code and state details) and I need to classify each one as either urban or rural. I have no lat long details and my company will not allow me to use my own personal google account to pass this info to Google Maps API to geocode these addresses.
I am using the R programming language but unfortunately have very limited GIS experience (have used MapInfo previously) so if anyone has suggestion how I can classify each location I would be grateful for any info.


texts: QGIS3 - Join by location (falsely) adds neighbouring polygons

texts:
I have two layers:
Layer 1 - containing municipalities of country X in the year 2014 (around 600)
Layer 2 - containing municipalities of country X in the year 2018 (around 500)

Between 2014-2018 several municipalities have merged. E.g. municipality A, B and C in the 2014 layer no longer exist in 2018 but are now part of municipality D.

I want to know for each 2014 municipality what its corresponding 2018 municipality is. So for municipality A, B and C the outcome should be D.

I tried to achieve this by performing Join by Location (using intersect). I would expect the joined layer to have 600 features (i.e. the number of 2014 municipalities) with a new attribute containing the corresponding 2018 municipality. However, the joined layer I get has over 2400 features. Municipality A is present 4 times, one entry has municipality D as new attribute (as expected) but the other 3 entries have the neighbouring municipalities of A as new attribute (E, F and I). I.e. QGIS seems to think that municipality A does not only intersect with D but also with all neighbouring municipalities of A.

Am I doing something wrong here?

Both layers have the same CRS.

Edit: Found out that if I zoom in a lot (ratio 85:1) there's a small difference between the two layers. I guess this causes the issue.


texts: ArcGIS Server logs for cached map services

texts:
ArcGIS Server has a log event for accessing dynamic map service (Begin\End ExportMapImage - code 10010).

Is there something similar for cached map services? Or is there any other way to determine how many times tiles have been served to end users? I noticed there should be a log message for GetMapTile has started\completed (code 10054) but I don't see any messages of this type in my server manager.


texts: Google Earth Engine: Reduce every image in a collection

texts:
I want to reduce every single image in a collection, but I have not been able to make it. The process is really easy and works with a single image, but I need to do the same for every image in the collection.

My code:

// Statistics function
var stats = function(img) {
            var image = ee.Image(img);
            var reducers = ee.Reducer.mean().combine({
                reducer2: ee.Reducer.stdDev(),
                sharedInputs: true
                });
            var stats = image.reduceRegion({
                reducer: reducers,
                //geometry: geometry(),
                bestEffort: true,
                });
            return stats;
}

//Load collection
var collection = ee.ImageCollection('COPERNICUS/S2');

// Extract the image index from collection and make a list
var index = ee.List(['20190101T160509_20190101T160509_T17RNJ',
                    '20190104T160649_20190104T161509_T17RLH',
                    '20190104T160649_20190104T161509_T17RMJ',
                    '20190104T160649_20190104T161509_T17RMK']);

// Filter collection by image id list
var coll = collection
          .filter(ee.Filter.inList('system:index',index));

The reducer works perfectly for a single image

// Apply the statistics function over the whole extent of a single image
var one_stats = stats(coll.first());
print('One Stats',one_stats)

But, it does not work properly for every image in a collection

// Apply the statistics function over the whole extent of every image
var all_stats = coll.map(stats);
print('All Stats',all_stats)

Thank you for yout help,

Luis


texts: arcgis server 10, vb.net, non pooled service, web adf

texts: i am running arcgis server 10. i created a A.MXD file, then started arcgis server and successfully added non-pooled service using A.MXD. i also installed visual web developer 2010 express and created new web mapping application using vb.net, and pointed mapresourcemanager to the one running my A.MXD. now, i want to be able to generate custom layers when user clicks on a button and add them to the service, i.e. it would display it as part of A.MXD on the website but not on the actual file on the server machine (for this reason i made it non-pooled service). plz can anyone help me with suggestions, samples, short tutorials that probably i have missed searching...? or at least a python script. thanks!


texts: Programmatically Downloading Landsat Images

texts:
There was a very similar question to this one here
, but it specified Landsat 8 images; I'd just like to be able to download ANY landsat images, given latitude and longitudes as inputs.

Just wanted to see if anyone knew of something that does this already, although I don't hold much hope.

I'm thinking of writing an application that uses usgs's Earth Explorer tool, but I don't have much experience with writing applications that make HTTP requests and such. If someone could at least help in going down this path, it would be something.

I don't necessarily have any preference where language is concerned, but for what it's worth I'm writing the rest of the related software in C++. I've looked around at various sources of satellite imagery and other spatial data, but everything I've found falls into either of two categories; 1) it's a website that allows you to search for datasets/images and download them individually, or 2) is integrated into a GIS software system and doesn't appear to have any information for developers looking to do do this integration themselves.

Ideally, I'd like something like google earth's static maps API, where I just specify latitude and longitude and I get the an image corresponding to my input. However, I don't want pretty pictures, I want geographic data, including data that I can't get from google earth (anything that's not visible light imagery).

I'm getting away from the question-answer format of SE (I was mostly asking whether there were any existing solutions for automatically retrieving satellite imagery) but I might as well tell you my intent with all this; I'm trying to write software that reads in a variety of geographic data (imagery, height, temperature, etc) and attempts to classify the terrain into types (such as forest, grassland,  ocean, etc). I'm not looking at a specific area; it's a general method and the software should be able to pull data from arbitrary locations.


texts: How to build attribute table from raster .tiff in ModelBuilder?

texts:
I have built a model that goes through a folder of raster files (TIFF), calling each time one file and running a routine.

The problem I am facing is that imported raster files do not have an attribute table. I know how to create it manually for each one, but I would like to incorporate it to ModelBuilder.

When I create manually the attribute table, ArcGIS creates some auxiliary files (XML, OVR and DBF).

Does anyone know if this can be automatized in ModelBuilder? and how?


texts: Crown area calculation with lidR::.stdmetrics differs from raster::area

texts:
I found out that tree crowns delineation using lidR::.stdmetrics calculates an area that is different from the area calculated by raster::area() or QGIS with the field calculator $area function.
The versions I am using are: lidR 3.1.1, raster 3.4-5 and QGIS 3.4.8-Madeira.
Also, the area calculated with lidR is the same whether you indicate concave or convex for the type of hull. Shouldn't it be different?

I found this out with my own data but it can be checked too following the wikis from the github page for Segment individual trees and compute metrics 1 and 2 from  here.
require(lidR)

LASfile <- system.file("extdata", "MixedConifer.laz", package="lidR")
las = readLAS(LASfile)

hulls_concave  <- delineate_crowns(las, type = "concave", concavity = 2, func = .stdmetrics)
hulls_convex  <- delineate_crowns(las, , type = "convex", func = lidR::.stdmetrics)

hulls_concave$area2_conc <- raster::area(hulls_concave)
hulls_convex$area2_conv <- raster::area(hulls_convex)

df <- data.frame(hulls_concave$area, hulls_concave$area2_conc,
                 hulls_convex$area, hulls_convex$area2_conv)

head(df)
#>   hulls_concave.area hulls_concave.area2_conc hulls_convex.area hulls_convex.area2_conv
#> 1             8.3148                 5.411255            8.3148                6.810303
#> 2            11.3176                 6.076416           11.3176                7.972168
#> 3            39.5720                13.700073           39.5720               21.715088
#> 4            17.7599                 9.352905           17.7599               12.575073
#> 5            34.3893                20.950684           34.3893               26.436523
#> 6            16.7090                 5.991821           16.7090               10.282349

Which is the reason that lidR::.stdmetrics calculates the same area for convex and concave hulls and that this area is different from the one calculated by raster::area() or QGIS $area function?
EDIT: I actually found that by using lidR::.stdtreemetrics instead of lidR::.stdmetrics it gives back the same area as raster::area() and also that both areas for concave and convex hulls are different. What is the difference between lidR::.stdtreemetrics and lidR::.stdmetrics for segmenting tree crowns?


texts: How to realize the regression analysis of NDVI and PDSI in Google Earth Engine?

texts:
The reducer chapter in the API has described how to implement regression analysis, but I don’t understand how to implement variable regression analysis for two different indexes from two image collections?
Here is the information:

https://developers.google.com/earth-engine/guides/reducers_regression
https://developers.google.com/earth-engine/datasets/catalog/GRIDMET_DROUGHT
https://developers.google.com/earth-engine/datasets/catalog/MODIS_006_MOD13Q1


texts:
I am working on an application that will leverage the leaflet draw plugin so that a user can open my map and drop comments in the form of markers. Then the user can click submit and it will serve me that drawn layer with comments as a geoJSON. It isn't important that other users see each others comments, I just need the location and the comment so I can compile them later. I have found two resources that I think are pointing me in the right direction but I am having trouble piecing them together and my JavaScript is terrible at best.
Here are the resources I have been using

Leaflet Draw - add title to marker or symbol

How to save a completed polygon points leaflet.draw to mysql table

Here is what I have so far after tweaking the above resources...

var drawControl = new L.Control.Draw({
draw: {
    polygon: false,
    polyline: false,
    rectangle: false,
    circle: false,
},

edit: {
    featureGroup: drawnItems
}
});
map.addControl(drawControl);
map.on('draw:created', function (e) {
    var type = e.layerType,
        layer = e.layer;
    drawnItems.addLayer(layer);
    var shape = layer.toGeoJSON()
    var shape_for_db = JSON.stringify(shape);
    return shape_for_db;
    var popup = L.popup()
        .setLatLng(layer.getLatLng())
        .setContent('Shape Name
<input id="shapeName" type="text"/>

Shape Description
<textarea id="shapeDesc" cols="25" rows="5"></textarea>

<input type="button" id="okBtn" value="Save" onclick="savePopup()"/>')
        .openOn(map);

});
function savePopup(){
    var sName = $('#shapeName').val();
    var sDesc = $('#shapeDesc').val();
    var drawings = drawnItems.getLayers();
    drawings[drawings.length - 1].title = sName;
    drawings[drawings.length -1].content =sDesc;
    map.closePopup();

};

When I run the above in my leaflet application I can successfully drop points, each one has a popup that comes up and disappears when I click save, but I can't really tell whats happening. I've tried inserting some return commands to see what is working at what isn't but I get nothing. Any suggestions on how to debug this thing?


texts: How to find the orientation/angle of a segment of a line

texts: Is there a way of finding out the angle of a segment of a vector not just the whole vector


texts: Adding page number to an atlas layout with PyQGIS 3

texts:
I am learning PyQGIS 3 for a few weeks and I am trying to understand how to create an atlas with PyQGIS 3 from the beginning.
UPDATE :
Here is where I am now :
project = QgsProject.instance()
client = os.path.basename(project.homePath()) # get the name of the directory
manager = project.layoutManager()
layoutName = client + " - Atlas paysage"

layouts_list = manager.printLayouts()
for layout in layouts_list:
    if layout.name() == layoutName: #if there is already a layout with the same name
        manager.removeLayout(layout) # remove it

layout = QgsPrintLayout(project)
layout.initializeDefaults()                 #create default map canvas
layout.setName(layoutName)

myAtlas=layout.atlas() # make the layout as an atlas

myAtlas.setPageNameExpression("attribute(get_feature('plan_de_ferme','diagramme',attribute('diagramme')),'comment')")

myAtlas.setSortExpression('diagramme') # order the pages regarding the value in 'diagramme' (integer beginning at 1)

manager.addLayout(layout) #add the layout in the layout manager

layout.atlas().setEnabled(True) # this check the box "generate an atlas"

cover = project.mapLayersByName(os.path.basename(path) + '_Atlas')[0]
#layer used to define the number of page and the extent of each one
myAtlas.setCoverageLayer(cover)

map = QgsLayoutItemMap(layout) # adding the map
map.setRect(20, 20, 20, 20)#Set Map Extent
map.setAtlasDriven
map.setAtlasMargin(0.2) #20%
rectangle = QgsRectangle(-244516.858, 169608.638, -243208.118, 170778.898)#still required to start
map.setExtent(rectangle)
layout.addLayoutItem(map)

I don't understand how to define page number and make it change for each page.
page = QgsLayoutItemLabel(layout)
page.setFont(QFont("Ms Shell Dlg 2", 10))
page.attemptMove(QgsLayoutPoint(231.326, 208, QgsUnitTypes.LayoutMillimeters))
page.setHAlign(Qt.AlignRight)
page.setVAlign(Qt.AlignVCenter)
page.setMinimumSize(QgsLayoutSize(34.002, 7, QgsUnitTypes.LayoutMillimeters))
currPage = myAtlas.currentFeatureNumber()
totPage = myAtlas.count()
page.setText("Page : '%d' / '%d'" % (currPage, totPage))
layout.addLayoutItem(page)

The last line doesn't work because of the one above. I think one of the problems is that when I open the layout created, atlas parameters are well defined but I need to click on "overview of the atlas" to see the several pages, and to make the following code returning the correct number of pages: myAtlas.count()
As a result, I would like to add a label indicating the current page number (changing for each page) above the total number of pages. for example if I have 3 pages in my atlas :


texts: What does "Size/Width" stand for in the symbol selector?

texts: Can anyone explain how to interpret a symbol size of 10 or let's say 100? What kind of units are these? I ask because recently I had to deal with a reference scale and I wasn't really able to explain what symbol size means.


texts: Attribute error while running the Toolbox and Model

texts:
When I am trying to run the following code

import arcpy
from arcpy import env
env.workspace = r"C:\Users\Rvg296\PycharmProjects\Lab6"
tbx=r"C:\Users\Rvg296\PycharmProjects\Lab6\UTD.tbx"
arcpy.ImportToolbox(tbx)
arcpy.Model_UTD()
print("Suitable areas file created")
arcpy.RemoveToolbox(tbx)

for making a model run and create shapefile in the output folder.
I am receiving an error like

  C:\Python27\ArcGIS10.3\python.exe
  C:/Users/Rvg296/PycharmProjects/Lab6/Lab6HW.py Traceback (most recent
  call last):   File "C:/Users/Rvg296/PycharmProjects/Lab6/Lab6HW.py",
  line 16, in
      arcpy.Model_UTD() AttributeError: 'module' object has no attribute 'Model_UTD'

  Process finished with exit code 1


texts:
Can be defined bbox parameter in a WCS service? I require trimming the layer coordinate in a box, I'm trying to prove the following WCS, but shows the entire layer globally:

http://geobrain.laits.gmu.edu/cgi-bin/gbwcs-dem?bbox=-76.70429,7.26988,-74.59818,9.56054&crs=epsg:4326

regards,

Samuel Mesa.


texts:
Background

In a leaflet application I am currently using geojson-vt to turn small geoJSON files (45MB) into tiles stored as a javascript variable. This cannot be done with the larger files (900MB) due to memory restrictions. I want to take the large files and turn them into tiles saved on my local machine. This way I can grab the nessessary tiles instead of the whole file.

Research

I believe something similar to gdal2tiles but for vector data is what I need.

TileStashe may yield a solution, but its primary use does not seem to be for my purposes. If this does turn out to be the solution, example useage would help.

How I plan to load the tiles - https://stackoverflow.com/questions/29732790/how-to-serve-map-tiles-from-a-database-using-leafletjs


texts:
I have two tables, one is a cartographic map and the other is the map of all lakes. Some of the lakes are in-land and so they are not excluded from the cartographic map.

I want to calculate the area of each, say city (object of land map), subtracting the area for rivers, lakes etc. (object of the water map).

Is it possible to do in MapInfo?


texts:
I am trying to save changes via WFS-T using GeoServer:

var editLayer = new OpenLayers.Layer.Vector("Edit Layer", {
        visibility: false,
        strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],
        rendererOptions: { zIndexing: true },
        projection: new OpenLayers.Projection("EPSG:900913"),
        protocol: new OpenLayers.Protocol.WFS({
            srsName: "EPSG:900913",
            url: URL,
            featureType: "SETTLEMENTS",
            featureNS: NS,
            featurePrefix: Prefix,
            geometryName: "GEOM",
            version: "1.1.0"
        }),
        eventListeners: ...

But the server returns error:

<?xml version="1.0" encoding="UTF-8"?>
<ows:ExceptionReport version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/ows http://../geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows">
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>{http://...}SETTLEMENTS is read-only</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

Why is the feature readonly and how to fix it?


texts: How can I add ArcGIS 10 templates to my .NET 2013. and is it for free?


texts: Are there any command line tools can take a Shapefile or a GeoJSON file and generate a tiled version of them?


texts: Check whether a feature class is registered as versioned using Python

texts:
How can I check whether or not a feature class is versioned using Python?

I'm trying to register feature classes using a python script. Before I do this I need to check whether a feature class is versioned. Are there keywords that we can use in coding while looping through the feature classes?


texts: Conditional labeling in ArcMap using Python Parser

texts:
I am using ArcMap 10.8.
I have 2 attributes: Toponym and Type.

Toponym gives the name
Type indicates if it is a city, town, church, etc.

In English, I would like if Type = town, then capitalize Toponym; if Type = church, then italicize Toponym; and so on. I don't know enough of python to be able to combine the functions, or if even VB script is better. I've found how to change font size and color if specifics are met but I couldn't quite make it work with what I need (changing font & color).
I got this far to capitalize all Toponyms:
def FindLabel ([Toponym]):
  S = [Toponym]
  S = S.upper ()
  return S

but am unable to combine:
def FindLabel ([Toponym], [Type]):
  S = [Toponym]
  if [Type] == 'Town'
    return S.upper()


texts:
I need to upload some very large tables (over 10Gb) into Postgis so I actually found this link What is the best hack for importing large datasets into PostGIS?

The DB manager is far too slow and only uploaded 10% of the data despite saying the import was successful.

Problem is, this is my 1st day ever using Postgis and I have no idea where to run those commands, so I can't really understand the answers in the above link. Is it in the QGIS interface? pgadmin? some other interface?

I have all the latest versions of the softwares and Windows 8

I found a file called shp2pgsql but after clicking it, it instantly closes down


texts: Google Earth Engine - add label to feature collection table/CSV

texts:
I'm exploring different ocean environmental data in Google Earth Engine.

I have created an image per variable by using the .reduce(ee.Reducer.mean()) function.

var sstHS_mean = sstHS_collection.reduce(ee.Reducer.mean());

I have several areas that I'm interested in comparing and have used the .reduceRegions function to reduce into a feature collection to find the mean score for each area I'm interested in.

var sstHS_region = sstHS_mean.reduceRegions({
reducer: ee.Reducer.mean(),
collection: reefsEdit,
scale: 30});

I realised I could  combine feature collections and export as a CSV. Using this code.

var sal_sst_HS = ee.FeatureCollection([sstHS_region, salHS_region,]).flatten();

I can then export this as a CSV which produces this table

However, it's not clear which data comes from. Is there anyway of adding a label to each image or feature collection so I can identify it when I export the table? Maybe in place of the 0 and 1 seen under system:index or in a new column I could label?


texts:
I am trying to find a solution to split attributes into two fields at a specific character, slash ("/") in that case.

I tried with How to split a text attribute by characters in QGIS 2.6.0, but I did not succeeded.

I want this:

I got this after your function, @Kazuhito


texts: I am wondering whether it is possible to identify all neighbors to each polygon using only python (with, e.g., geopandas) in the same way that can be done with python in QGIS (Find neighbors polygon).


texts: How to keep certain attribute table features selected while I clear my query builder? (QGIS)

texts:
Is this possible? I want to see all my points, and also select a few to stand out from the rest.

This is for a school project. The instructions state to use query builder, go into a layer to select the attributes, then go back to clear the query builder (expecting the points to still stay selected).


texts: Webmapping with pgRouting and Mapserver for Beginners

texts: I want to use pgRouting for showing shortest path on hiking trails. I created web map so I need to enable users when they click on start and end point somewhere on hiking trails, that it shows shortest path between those two points. I am beginner with it, so I just need to tell me where to start. I have those lines in postgis database and I am working with phpPgAdmin and Mapserver.


texts: QGIS converting multiline layer into polygon doesn't work properly

texts:
I would like to polygonyze my layer.
It includes between 6-20 separate lines.
I was following the hint here:
Converting line to polygon using QGIS
but at some point I've got an error:
Feature (2) has invalid geometry and has been skipped. Please fix the geometry or change the Processing setting to the "Ignore invalid input features" option.
Next, I've selected "Ignore invalid input features" option in the Toolbox options, like shown here:
Ignoring invalid input features with Intersection tool in QGIS?
but the problem comes back, unfortunately.
See below my problem:

How can I sort this out?
Maybe is it some tool, which would build the polygon from any lines available in the vicinity instead of only enclosed ones?


texts: In Vector > Geometry Tools option, Voronoi polygon option is not there. Do we need to instal any plugin for that?


texts: Trouble buffering a vector layer in QGIS with PyQGIS

texts:
I am working on a script that imports a .csv layer that has lat long coordinates, which I then want to buffer in feet.
I've created a vector layer from the .csv file and tried to set the coordinate system of the vector layer to a  local system with units in feet, but when I buffer that layer I don't get the expected output - it looks like its buffering in degrees. Is there a way to specify buffer units? I understand the units are determine by the input layer which I have tried to set to the local system.
 What am I doing wrong?

from qgis.core import *
from qgis.analysis import *
from PyQt4.QtCore import *
from PyQt4.QtGui import QInputDialog
from qgis.utils import iface
import os

csvFile = QInputDialog.getText(None,'Enter .csv path','Enter filepath for csv:')

s = QSettings()
oldValidation = s.value("/Projections/defaultBehaviour")
s.setValue("/Projections/defaultBehaviour", "useGlobal" )

InFlnm= os.path.split(csvFile[0])[1]
InDrPth= os.path.split(csvFile[0])[0].replace('\\','/')
InFlPth="file:///"+InDrPth+'/'+InFlnm

csvImport = InFlPth+"?delimiter=%s&xField=%s&yField=%s" % (",", "Longitud", "Latitud")
shp = QgsVectorLayer(csvImport, InFlnm,"delimitedtext")
shp.setCrs(QgsCoordinateReferenceSystem(2239, QgsCoordinateReferenceSystem.EpsgCrsId))

s.setValue("/Projections/defaultBehaviour", oldValidation)

buffFile = QInputDialog.getText(None,'Enter output filepath for buffer','Enter filepath for buffer:')
buffNm = os.path.split(buffFile[0])[1]
buffDir = os.path.split(buffFile[0])[0].replace('\\','/')

QgsMapLayerRegistry.instance().addMapLayer(shp)
mc = iface.mapCanvas()
layer = mc.currentLayer()

QgsGeometryAnalyzer().buffer(layer, buffDir+'/'+buffNm, 60, False, False, -1)


texts: ArcGIS Python code how to find if layer data is from an .mdb or a .gdb

texts:
In my ArcGIS Python code, I need to loop over a couple of layers, and from those layers only select the operational fittings:

arcpy.SelectLayerByAttribute_management(fittings, "NEW_SELECTION", whereClause)

Some of my layers are stored in a personal geodatabase (.mdb) and some in a file geodatabase (.gdb), which has an impact on the syntax of the "whereClause" string, because the mdb needs square brackets for the queried field name, whereas the gdb doesn't:

if database = GDB:    # This line is pseudo-code which I need resolving
    whereClause = "LIFECYCLESTATUS = 'LIVE'"
else:
    whereClause = "[LIFECYCLESTATUS] = 'LIVE'"

My question is: how can I determine if a layer data source is in an mdb or in a gdb? I've managed to get to

desc = arcpy.Describe(fittings)
delm = desc.dataElement

But after this, I am stuck. How/Where can I find the available properties for the "dataElement" class?


texts:
I need to filter the LANDSAT/LC8_SR image collection using an assessment of total cloud cover in the entire scene of each image.  i.e. each image in the collection is "in" or "out" based on a threshold of cloud cover for the whole image.  In the TOA collections I can easily do this using 'CLOUD_COVER' from the metadata, but the surface reflectance collection does not have this metadata attribute.  I have tried using reduceRegion to find the sum of cfmask=4 over the 'cfmask' layer, but this returns a value and I don't know where to put that value so I can use it to filter the images.

// Load a Landsat 8 ImageCollection for a single path-row.
var collection = ee.ImageCollection('LANDSAT/LC8_SR')
    .filter(ee.Filter.eq('wrs_path', 23))
    .filter(ee.Filter.eq('wrs_row', 38));
// use wrs feature collection to establish region to assess cloud cover
var fc = ee.FeatureCollection('ft:1_RZgjlcqixp-L9hyS6NYGqLaKOlnhSC35AB5M5Ll')
    .filter(ee.Filter.and(
    ee.Filter.eq('PATH', 23),
    ee.Filter.eq('ROW', 38)));


texts: Populating a Value List in one Parameter, from Values Derived from a Second Parameter, Python

texts:
Using the Validator in the ArcGIS 10.1 tool GUI, can I loop through and List feature classes from a workspace type parameter (ie a file geodatabase) and then go on and list the values of a field in a feature class from that list? I'm trying to do this:

if self.params[0].value and arcpy.Exists(self.params[0].value):
    for fc in arcpy.ListFeatureClasses(self.params[0].value):
      if fc == "TestFC":
        value_set = set(row.getValue("SITE")
                      for row in arcpy.SearchCursor(str(self.params[0].value)))
        self.params[1].filter.list = sorted(value_set)

where param[0] is a workspace type parameter where the user chooses a geodatabase. param[1] will be a string type parameter set as a value list. I want to read in a setted value list from all the values in the 'SITE' field so the user can choose which site the tool will further process on.

Maybe in other words:

User opens tool
User chooses a file geodatabase as the first parameter
User will then choose a SITE from the list derived from the first parameters testfc feature class, 'SITE' field


texts: Incorrect vectorization from a raster in ArcGis (ArcScan)

texts: I am trying to make a vectorization to get lines from a raster image using arcscan. I saw some users making it but using easier images with more visible lines but is not working with my image. could somebody suggest some tool or process?


texts: Setting up GeoServer - can't reach server from remote (timeout)

texts:
My target is to set up a WMS that can be displayed with OpenLayers.

Therefore I have set up GeoServer (2.10.1) on a Windows machine (Windows Server 2008 R2) and am successful to the point that I can reach the GeoServer interface on localhost:myport/geoserver including layer previews. On the machine itself I can also reach GeoServer via mydomain.com:myport/geoserver.

But I cannot reach it either from any other computer or via QGIS GeoServer Explorer plugin...

When I copy the layer preview URL to a browser on another machine, it ends up with a ERR_CONNECTION_TIMED_OUT.

I have tried setting the proxy URL in "Global Settings" to http://www.mydomain.com, but that didn't make a difference.

There is already a xampp installation running with Apache, Tomcat & MySQL. As Tomcat is already using port 8080, I am using another port for GeoServer.

Any ideas what I'm doing wrong?


texts: PostGIS combine ST_DistanceSphere with Nearest Neighbor search

texts:
I have two tables both have point geometry with SRID 4326 (WGS84)
I need to find the nearest point in 1 table to every point in another table
PostGIS KNN search is written
 t1.geometry <-> t2.geometry AS distance;
as I'm using WGS84 distance is in degrees I'd like distance to be in meters
https://postgis.net/docs/ST_DistanceSphere.html takes two points and calculates the distance between them like
SELECT round(CAST(ST_DistanceSphere(t1.geometry, t2.geometry ) As numeric),2) As distance
How do I combine the two functions?
This errors
round(CAST(ST_DistanceSphere(t1.geometry <-> t2.geometry ) As numeric),2) As dist
ERROR:  function st_distancesphere(double precision) does not exist
PostGIS version: 3.0


texts: Using ArcGIS Engine with Background Geoprocessing (64 bit)

texts:
Could someone suggest how to use ArcGIS Engine Background Geoprocessing (64 bit) in ArcGIS Engine 10.4 ArcObjects console application?

I am using C#, .Net 4.5.2 framework, ArcObjects SDK 10.4 to develop this.


texts: Feature extraction for sand dunes and hills using DEM

texts:
I want to extract only sand dunes, ridges and hills from a DEM.
Note that there are other elevated objects in the DEM as well and on the mountains and ridges that I don’t want.
Is there any way i can automate or semi- automate.
Currently i have to mark these features manually, which is very laboursome task.
Hill extraction from image can also work for me if i can make a mask of features i require and later use that mask for feature extraction on DEM.


texts: Creating new shapefile after merge operation using unionSpatialPolygons

texts:
I only recently started playing with shapefiles and R packages for manipulating them. I am looking at creating a new shapefile based on merged polyons by following this example, however, I cannot seem to figure out what I am suppose to feed the as.data.frame("youData").

Using the Zambia shapefiles as an example, how would one go about creating a new shapefile composed of a superset district-level data?

require(maptools)
require(rgadl)

zambia <- readShapeSpatial("ZMB_adm2.shp")
zambiap <- unionSpatialPolygons(zambia, ID=zambia@data$ID_1)

zambiapd <-     SpatialPolygonsDataFrame(ob,data=as.data.frame("yourData"),proj4string=CRS("+proj=    aea > +ellps=GRS80 +datum=WGS84"))
writeOGR(zambiapd,"shapes","testShape",driver="ESRI Shapefile",)


texts: Specifying polygon face toward two different lines using ArcMap?

texts:
I have a parcel layer, a street of city layer, and I want to find the parcels at the corner of two different streets (meaning a house with two faces toward 2 streets).

I am using ArcMap.

I want to find the parcels like the selected one, the red line is the center of street, the yellow one is the limit that people can build. I get the street name for the parcel by spatial joining the parcels layer and the streets layer, but the parcel at the corner of two streets is a special case, so I want to figure them to sign a coefficient.


texts: Searching by attribute for special characters (*, ", ')

texts: I am working with an attribute table that uses single, double, and triple asterisks to designate Wild and Scenic Rivers.I would like to Select by Attribute to filter the records that contain asterisks--I intend to export these records to a separate shapefile just for Wild and Scenic Rivers. I tried using the LIKE expression as follows, to no avail:


texts: How to normalize a large point cloud using lasheight and a .tif DTM?

texts:
I am normalizing a large point cloud (>16 GB), for which I'm using a preprocessed DTM that I store as .tif.
For smaller amounts of data, I would use an R script that lets me do this:
library(lidR)

# load data
las <- readLAS("pointcloud.las")
dtm <- raster("dtm.tif")

# normalize point cloud through subtraction
nlas <- las - dtm

However these files are too big to process (I get std::bad_alloc when running it in R). I wanted to use the LAStools Toolbox that is provided in ArcTools and I get stuck at the point where I define the groundpoints. I'd assume one would just specify the dtm.tif here, however .tif apparently is no supported format, only .txt / .asc and other formats such as .shp, .las, ...
Converting my tif to .asc or .txt with ArcMap -> Conversion Tools will give me a dtm.txt / dtm.asc, but these cannot be read by the tool, as the 'dtm.asc' gives me:
ERROR: was not able to find header
ERROR: cannot open lasreaderasc with file name 'dtm.asc'
ERROR: could not open ground points file

And the 'dtm.txt' gives me:
ERROR: using zero ground points from 'dtm.txt'.
   try running with option '-all_ground_points'.

I have no experience with "raster files as asc/txt", yet was confident that this should work. Am I doing something wrong or overseeing something?
Is there a way to use .tif-files with the LAStools?
Or alternatively: Is there a better way to process these files (to normalize the point cloud)?


texts:
I have published directory of shapefiles in GeoServer in which one shapefile has only one feature (point).  While previewing the layer GeoServer WMS error says that The request bounding box has Zero area. I had so many shapefiles with single feature (point).

How can avoid this Zero area error in future?


texts: OpenLayers 6 DragBoxInteraction within limits

texts:
I need to select features based on drag box interaction. However in order to limit the number of the selected features I need to restrict the drawn polygon area. Tried with boxEndCondition but this as the docs say points when the boxend event will be fired. Are there any options or events I can handle to restrict the width and height of the drawn box area?
new DragBoxInteraction({
        condition: platformModifierKeyOnly,
        boxEndCondition: (evnt, startPixel, endPixel) => {
          const width = endPixel[0] - startPixel[0];
          const height = endPixel[1] - startPixel[1];
          const widthAndHeight = width * width + height * height;
          return widthAndHeight >= 65 && widthAndHeight <= 100000;
        },
      });


texts: Error when I try to convert Corine Land Cover 2000 tiff to shapefile in QGIS 2.10.1 or clip CLC2000 by a polygon

texts:
I want to clip Corine Land Cover 2000 tiff by a polygon or to convert it to shapefile in QGIS 2.10.1.
So far I have tried the following always getting an error message that 'ascii' codec can't encode some characters. I suppose it has to do with the format of my tiff or something... Could you please guide me to what does this mean and how can I proceed with my task?

Toolbox: GDAL extraction: clip raster by extent

Algorithm Clip raster by extent starting...
GDAL command:
gdal_translate -of GTiff -projwin 5240999.6612 2201224.60925 5459830.9809
1991907.69475 C:/Users/.../qgis_data/g100_00/g100.tif
C:\Users\...\AppData\Local\Temp\processing\068103c23cef469fbf7f44376e40dbb4\OUTPUT.tif
'ascii' codec can't encode characters in position 118-127: ordinal not in
range(128)
See log for more details

Toolbox: GDAL extraction: clip raster by mask layer

but I get this error message:

Algorithm Clip raster by mask layer starting...
GDAL command:
gdalwarp -q -of GTiff -dstnodata -9999 -cutline C:/Users/.../qgis_data/setset.shp
-crop_to_cutline C:/Users/.../qgis_data/g100_00/g100.tif
C:\Users\...\.qgis2\processing\scripts\sda.tif
'ascii' codec can't encode characters in position 78-87: ordinal not in range(128)
See log for more details

Toolbox: GDAL conversion: vectorize raster layer

but I get this error message:

Algorithm Polygonize (raster to vector) starting...
GDAL command:
cmd.exe /C gdal_polygonize.bat C:/Users/....qgis_data/g100_00/g100.tif -f "ESRI Shapefile"
C:\Users\....\.qgis2\processing\scripts\vect.shp vect DN
'ascii' codec can't encode characters in position 62-71: ordinal not in range(128)
See log for more details


texts: Editing feature attribute values in joined non-spatial table in QGIS?

texts:
I am using QGIS 2.18.3.

I have a shapefile (which defines parcels) and a .csv file (non-spatial) as a table (added to the project through add vector layer) with additional data regarding the parcels. I have joined the .csv based table to the shapefile layer.

If I select the parcel layer, toggle editing, have "auto open form" checked and click on a parcel the Feature Attributes form opens fine and shows the fields and data from both the shapefile and the .csv table.

However, the problem is that the attributes from the shapefile are editable but the attribute fields from the .csv table are grayed out and cannot be edited.

Is there a way edit the attributes from the joined .csv based table in the Feature Attributes form?

I created a new shapefile layer using the save as and the fields are editable. That process renamed the attribute fields from the table but that is a minor item to fix.

More significant would be the workflow that this creates if I am not missing something. When the parcel layer is updated it would seem that I would need to extract the data from the joined shapefile for the table data attributes, recreate a .csv or Excel file, bring that data back in as a layer, join it with the new parcel layer, recreate a new shapefile layer from the join and then set up the styles, labels and form fields again.

Is there a better way for me to bring in additional data that needs to be joined with the parcel layer but also needs to be editable? (Note, I did activate the EditableGEOCSV plugin and the .csv table is directly editable but because this is for a field use application where the data needs to be updated it really only works if you can click on a parcel and have a form pop up for editing the additional data associated with that parcel.)

Here is an update. It took weeks to get IT to look at the permissions issue and so far they have not been able to resolve it. Both CSV and Excel files continue to not be editable from within QGIS while on the network drive. So, I copied all of the files and projects back to my C:/ drive and with no changes the CSV files can be edited. Excel still are not but I can work with that. Now when I click on the Identify Tool the Relation fields are editable. This works for now, long term I will need to workout the network permissions issues with IT. The one remaining issue to figure out is that now that the fields are Relational rather than through a join they are not showing up in the fields available for rule based styling. Is there a way to add them in? I can do both a Relation for editing and a join of the same table for styling and the styling shows up but will this cause conflicts or other problems?

To help other people seeing this discussion understand and apply the above comments here is a screenshot and a summary of the problem that was being solved. I will try to keep it concise. What I am creating is a QGIS project that is loaded onto a laptop and used as a field device for entering inspection data. The solution that fits our needs seems to be using both relations (for data editing) and joins (for styling), although I am still testing this to see if that creates conflicts or issues. The inspection data that we are generating new needs to be kept separate from the data coming in from the parcel layer. This is critical for updating and synchronizing of data from multiple field devices and updates to the parcel layer driven by a different department. The editing (adding of inspection observations) needs to occur through the Identify tool so that the person doing the inspections can visually identify the parcel through the parcel lines and aerial photographs, click on the parcel and enter the data. The styling is needed to show the work progress, shading parcels that are done, so the styling needs to pull from the inspection data table as well. The project design needs to allow the parcel layer to be updated without having to redo joins, shapefile save as, styles etc.   …   Hope that helps to understand and apply the comments.


texts: Classification of drone imagery (RGB) with SCP

texts:
How can I work on the classification in orthophotos (generated by Metashape from a DJI Phantom drone) when I cannot input the orthopoto into the band set? SCP does not find the raster of the orthopohoto in the single band list.
I know SCP cannot use orthophotos with less than 4 bands.  Is there a way to go with SCP or do I need to use a different method?
I'm totally new in QGIS and especially, in classification.
I want to classify the water, sediment and oyster reefs in the Wadden Sea.


texts: Integrating GeoExplorer in a web application

texts:
I am working in geoportal.
I would ask if integrating GeoExplorer in my application  will facilitate the task of visualizing a group of layers existing in my project.
If Yes, How can I integrate it in my application.


texts:
Is it possible to use ArcGIS Administrator REST API via front-end (JavaScript) application? Every request I send is getting:

XMLHttpRequest cannot load https://.../arcgis/admin/system?f=pjson. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:63130' is therefore not allowed access.

Request for data from standard REST API:

https://.../arcgis/rest/services/?f=pjson

works just fine.

What should I do to access allow my application to request data from ADMIN REST API?


texts: Using ArcGIS 10.1.  I have a large polygon feature class (130,000 records).  I need to do an inside/outside buffer (+5 then -5 to fill in some gaps)... the process takes so long, I'm looking for a way to speed it up.  Dissolving?  Splitting into smaller chunks. Any tips are appreciated.


texts: How to set different random colors to adjacent lines in QGIS

texts:
I have several line layers which i am trying to style with random colors. I want the lines styled in such a way that adjacent lines are assigned different colors so that each is clearly differentiated. I tried applying Categorized styling using an attribute that is unique, the result had instances where adjacent lines were the same colors. I found a plugin and some tutorials on doing the same for polygons.

Four color theorem for QGIS? (4 colour)

Consistent layer colors that are automatically adjusted based on adjacent polygons?

Would it be possible to do the same for lines. I am using QGIS 2.18.3


texts: How to get all attributes from a non geometry PostGIS layer with Python in QGIS?

texts:
I want to extract all attributes from a non geomety layer in QGIS with Python, but there is only the function

uniqueValues(fieldIndex)

More specific:
I have a postgresql table which is loaded into QGIS with "Add PostGIS layers". Then I need all attributes from two columns in a dictionary (key: column1, value: column2).
Here is my code so far:

dictAttr = {}
feature = QgsFeature()
layer.dataProvider().select(layer.dataProvider().attributeIndexes())
while layer.dataProvider().nextFeature(feature):
  attributes = feature.attributeMap()
  dictAttr[attributes[FIELD_INDEX1].toString()] = attributes[FIELD_INDEX2].toString()
return dictAttr

Problem: layer is not a geometry table, so it has no features and the while loop is never entered. And I can't use uniqueValues() because I need every attribute. Do you know any way to solve this? This can't be so hard...


texts: QGIS multiple whitespace in attributes are removed after restart

texts:
Concerning this question: https://stackoverflow.com/questions/28660079/firefox-is-ignoring-more-than-one-whitespace-in-svg-text-and-showing-them-smalle

I have an issue with the saving of Strings with multiple whitespace in the Attributes. Let's say I want to save S e a it is fine, also after restart of QGIS.

But when I save S   e   a. After restart I get S e a. I really need the whitespaces at the specific count as you can see from the link above.

So I tried to save "S   e   a". That is working somehow! But in the Geojson I now get \"S   e   a\". Puh. That's bad...

So how can I safe multiple whitespaces that are not lost after QGIS restart?


texts: Is it possible to have an infowindow pre-opened in when you load a Cartodb.js map?

texts: Can I code my Cartodb.js map somehow so that when someone first opens the map, there is already an infowindow open for them to see?


texts: Manage multiple users connecting on multiple Postgis database via QGIS

texts:
I have a question about QGIS projects and how to manage multiple users (fifteen users with usernames and passwords connecting to the same five databases in PostGIS).

Right now, there is one project per user and each time he opens it, she/he has to type her/his username and password five times.

Having only one project would be nice as it would make the changes and maintenance easier but using only one saved username and saved password to connect to Postgres/PostGIS is not an option since we need to know who is doing what on the database.

One solution that might work but takes a bit of time is to set one master password, fifteen basic authentification key on each computer and fifteen identical projects except each one connects to the databases using the user's key. That way, anyone can open his project on any computers and only type the master password.

Is there an easier way to achieve what I'm trying to do?


texts: Why is the Hillshade Styling contouring instead of shading in places?

texts:
I have this DEM file that's I've colored by altitude.

When I try to do a hillshade on this DEM I get some contouring and very dark shading.

Could someone give me a hint as to what I need to correct?  When I use the Processing Tool in the Raster Analysis Menu I get a similar result.  Ultimately I want to use multishading, but when I check that on it goes all black.


texts:
Following is my UI for map

There's a searchbox and a pin.
When I search for a location, let's say McDonald's, I get list of suggestions

when I click on one of the suggestions, it doesn't do anything, no service call happens to get me to the location I chose.
But when I use keyboard to select, (up/down arrow keys)and hit enter on a suggestion, map does take me to that location.
Am I doing something wrong?
Update on new Findings
Its not triggering 'select-result' on search object when I click. but does trigger when I use keyboard to select one of suggestions.


texts:
The following code subtract the minimum value of the raster from each cell value. Is there something wrong in it?

This error comes with it every time that i run...

Traceback (most recent call last):
  File "Z:\04 - Temp\Charles\NDVI_tempo\NDVI_py3.tbx#Script_NDVIpy3.py", line 39, in <module>
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Functions.py", line 4246, in Minus
    in_raster_or_constant2)
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Utils.py", line 53, in swapper
    result = wrapper(*args, **kwargs)
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\sa\Functions.py", line 4243, in Wrapper
    ["Minus", in_raster_or_constant1, in_raster_or_constant2])
RuntimeError:  ERROR 000732: Input Raster: Dataset 1536 does not exist or is not supported
Failed to execute (Script).

Actually, it does getting the minimum value, but it seems like it don't recognize it as a constant.

for tiff3 in rastersband3:

            path3 = env.workspace + "\\" + tiff3
            arcpy.CalculateStatistics_management(path3)
            Correcao1 = Minus(path3,(arcpy.GetRasterProperties_management(path3, "MINIMUM")))


texts: How to create polygon with DBGeography Class in Csharp

texts:
I  want to create a polygon with csharp 4.5 via DBGeometry class.

I found example on csharp to create a point via System.Data.Spatial namespace. (Requires Reference System.Data.Entity)

This code is working :

var text="POINT(29.11, 40.11)";
DbGeography.PointFromText(text, 4326);  //I can generate a point with this code

But  i want to create Polygon object and these codes dont work . Please help me about  which prototype - notation should i use to create a polygon or multipolygon object ? And i can not found examples on Microsoft web site. It contains only prototypes, not examples :(

//Not Work
var polyb = DbGeography.MultiPolygonFromText("POLYGON((29.11 40.11, 29.11 40.0 , 29.30 40.0, 29.30 40.11, 29.11 40.11)", 4326); --

//Not Work
//var polyc = DbGeography.MultiPolygonFromText("POLYGON((29.11, 40.11), (29.11, 40.0), (29.30, 40.0), (29.30, 40.11), (29.11, 40.11))", 4326);--

//Not work
//var reVal3 = DbSpatialServices.Default.GeographyPolygonFromText("POLYGON(127.652000002563
-26.244400002062321, 127.652000002563 -26.194399997591972,127.652000002563 -26.244400002062321)", 4326);

Summary
How can i create polygon with csharp DBGeometry class from text method ?


texts: move 1 vertex at a time rather than the entire shape

texts: Somewhere I have changed settings that allow me to move 1 vertex at a time while editing a shape.  It now moves the entire shape or scales the shape! Any suggestions on how to fix this?


texts: Why does the QgsVectorFileWriter have probelms creating vector files?

texts:
I am using QGis 2.0.1 and have tried to create a new GIS feature file (SQLite, Spatialite, and Shapefile) of a subset of the data. I am then saving a copy of the style of this layer and applying it to the new layer. Also, I am starting with a Spatialite database.

All three have different issues:

SQLite - The data is copied, but the fields loose their edit widget type (If you go in to the properties of the layer, then the Fields menu on the left; it is the Edit widget drop down.)

Shapefile - The file has no features in the table, but everything else is fine.

Spatialite - QGis locks up.

Shapefile code:

    writer = QgsVectorFileWriter(layer_path,
                                 'CP1250',
                                 fields,
                                 QGis.WKBPoint,
                                 crs,
                                 'ESRI Shapefile')

    if writer.hasError() != QgsVectorFileWriter.NoError:
        raise IOError('Can\'t create the file: {0}\n'.format(layer_path))

    for feature in features:
        writer.addFeature(feature)

    del writer

SQLite code:

    writer = QgsVectorFileWriter(layer_path,
                                 'CP1250',
                                 fields,
                                 QGis.WKBPoint,
                                 crs,
                                 'SQLite')

    if writer.hasError() != QgsVectorFileWriter.NoError:
        raise IOError('Can\'t create the file: {0}\n'.format(layer_path))

    for feature in features:
        writer.addFeature(feature)

    del writer

Spatialite code:

    spatialite = ["SPATIALITE=YES"]

    writer = QgsVectorFileWriter(layer_path,
                                 'CP1250',
                                 fields,
                                 QGis.WKBPoint,
                                 crs,
                                 'SQLite', spatialite)

    if writer.hasError() != QgsVectorFileWriter.NoError:
        raise IOError('Can\'t create the file: {0}\n'.format(layer_path))

    for feature in features:
        writer.addFeature(feature)

    del writer

I have also tried spatialite = ["SPATIALITE=YES", ]

I just want to know if there is anything else that I can do to get this to work the way I want.


texts: When digitizing Lines, vertices are automatically generalized when finished feature

texts:
I am creating lines(feature class) and when the feature is finished Arcmap 10 will automatically generalize/smoothens the line. Is there any reason why this is happening? is this a bug of ArcMap 10?

Any answer will be much appreciated. Thank you very much.


texts:
I did design a simple and quick tool with ModelBuilder that takes a point feature class in my GDB and does two joins and export to another feature classes, then, the tool appends these two feature classes into a new one being the previous ones removed. This last one will show labels with a symbology based on a layer file I created previously but the result will still be labels and I need annotations.

I know the process is easy to perform and only requires a couple of clicks more (right click on the feature class > label to annotations) but I would like to insert this bit within the model builder tool as well.

I do not see any way to achieve this, any ideas?


texts: Does publishing to QGIS cloud preserve the established relations (1 to many relation) between layers? On the web map, can you see the embedded form of the Parent layer in the Child layer, for example?


texts: Iterating over dates to extract precipitation in Google Earth Engine

texts:
I'm looking to sum precipitation for a period of 10-days prior to a specified date. This is just an example - in fact, I have around 60 different dates and I don't want to select each the date manually as done below. Is there a way to iterate through the dates?
// CSV file
var coord = ee.FeatureCollection("users/eginamalaj/site_test");

// Select sampling date

var datesampl = '2018-05-06';
var s1 = coord.filter(ee.Filter.eq('date', datesampl));

// Assign time interval
var dates = new Date(datesampl);
var start = new Date(dates.getTime() - 10*24*60*60*1000); // 10-days before
var end = new Date(dates.getTime() - 1*24*60*60*1000); // exclude sampling day

// Get image and sum for the time interval
var precImage = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY')
                   .filterBounds(coord)
                   .filterDate(start, end)
                   .select('precipitation')
                   .sum();

// Extract precipitation for the sampling sites
var precSample = precImage.sampleRegions({
    collection: s1,
    scale: 30,
    geometries: true
});

//////// Repeat above with a different date

var datesampl2 = '2018-09-12'
var s2 = coord.filter(ee.Filter.eq('date', datesampl2));
var dates2 = new Date(datesampl2);
var start2 = new Date(dates2.getTime() - 10*24*60*60*1000); // 10-days before
var end2 = new Date(dates2.getTime() - 1*24*60*60*1000); // exclude sampling day
var precImage2 = ee.ImageCollection('UCSB-CHG/CHIRPS/DAILY')
                   .filterBounds(coord)
                   .filterDate(start, end)
                   .select('precipitation')
                   .sum();
var precSample2 = precImage2.sampleRegions({
    collection: s1,
    scale: 30,
    geometries: true
});

// Combine them
var combined = precSample.merge(precSample2);
print(combined);

Code and data: https://code.earthengine.google.com/cd0a2c60fb8ddefbb9508abfc1a806bb


texts: Clipping Shapefile to Raster Extent using GDAL with Python

texts:
I am trying to clip a shapefile (containing multiple polygons) to a raster's extent. A similar question was asked as Clipping polygon precisely to raster (extent) using GDAL?, with an answer that I have not been able to effectively use. In my case, I have a large raster file that contains one shapefile which holds over 6000 polygons. I split my raster up into equal segments (600x600). I want to also split the polygons up into their respective new .tif file.
The code below does run without any errors though it saves over each shapefile that is saved. So my variable i is not increasing. When I import the shapefile into QGIS it loads correctly, but has no data. So it is a blank shapefile. If I zoom to layer, it does not zoom. So I am not sure what is going on.
Any suggestions?
import gdal
import subprocess
import os

# define file paths
Ras_path = 'D:/images/'
i = 0
for Raster in os.listdir('D:/images/'):
    src = gdal.Open(Ras_path + Raster)
    ulx, xres, xskew, uly, yskew, yres = src.GetGeoTransform()
    sizeX = src.RasterXSize * xres
    sizeY = src.RasterYSize * yres
    lrx = ulx + sizeX
    lry = uly + sizeY
    src = None

    extent = '{0} {1} {2} {3}'.format(ulx, lry, lrx, uly);

    #i = 0
    inVectorPath = 'D:/data/shape_merge/compiled.shp'
    outVectorPath = 'D:/data/split_shape/' + str(i) + '.shp'
    i = i + 1

    # make clip command with ogr2ogr - default to shapefile format
    cmd = 'ogr2ogr ' + outVectorPath + ' ' + inVectorPath + ' -clipsrc ' + extent

    # call the command
    subprocess.call(cmd, shell=True)

As @mikewatt commented, I did have my i = 0 inside my loop so it wasn't incrementing correctly. After the fix I am running into an error:
ERROR 1: Failed to create file D:/data/split_shape\103.shp: No such file or directory
ERROR 1: Terminating translation prematurely after failed
translation of layer compiled (use -skipfailures to skip errors)


texts: Apparent miscalculation of intersection area

texts:
I am trying to calculate the fraction of one area inside another. I confess to not understanding geopandas vs shapely shapes too well. But an example should show my confusion. My python calculation says that the area of intersection (bounded by red) divided by the blue circle area is only about 12%, when it should be close to 30%.

Code:

 for k in (mexico,canada): # rows of a geopandas GeoDataFrame
  if int(k.intersects(circles["full"]))==1: #circle["full"] is the blue circle below
   print("INTER")
    try:
      z = [MultiPolygon(k) for k in list(k.geometry)][0] this is how I could get the rows into shapely comparisons?
      print(z.intersection(circles["full"]).area/(50000*50000*np.pi**2)) # calculating what I hope is red bounded area/ blue bounded area. Denominator is a bit overstated due to projection, but shouldn't be too bad and calculations show not too bad
      print(circles["full"].area) # confirms denominator not too bad
      x,y = circles["full"].exterior.xy # what I think I needed to do to make math for area work
      pyplot.plot(x,y)
      x,y = Polygon(z.intersection(circles["full"])).exterior.xy # needed to convert to polygon to do the plot of the red area. Is this changing something? Couldn't do calc above with numerator and denominator with z turned to Polygon


texts: Zonal Statistics tool not working with QGIS?

texts:
I wanted to try the QGIS 2.14 zonal statistic tool but it doesn't work.The system says:

  not a sequence See log for more details

The SAGA Zonal Statistic tool works fine. It also doesn't work with the model builder.


texts:
I need setup QGIS Server + PostGIS (+ Lizmap) in Docker for our GIS users. I spent a lot of time reading documentation and searching for information on that matter but it's unclear for me as for sysadmin.
I feel like QGIS server documentation limited on this topic.
Could you direct me on right way?

EDIT:
I've used Docker based Lizmap project, with my additions in docker-compose file, I've added Postgis and Pgadmin services (containers)

version: '3'
services:
  postgis:
    # image: "mdillon/postgis"
    image: "mdillon/postgis:10"
    container_name: postgis
    restart: always
    privileged: true  # add for centos7 firewall.
    volumes:
      - ./postgis:/var/lib/postgresql/data # default volumn path is /data/postgis.
    ports:
      - "9823:5432" # port 5432 of host machine will be listened.
    environment:
      - POSTGRES_PASSWORD=************** # default password is "1".
      - POSTGRES_USER=postgres # default username is "postgres".
      - PGDATA=/var/lib/postgresql/data # folder in container to store data.
      - POSTGRES_DB=postgres # default database is "postgres".

  pgadmin:
    container_name: pgadmin_container
    image: dpage/pgadmin4
    environment:
      PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL:-support@example.org}
      PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD:-************}
    volumes:
       - ./pgadmin:/root/.pgadmin
    ports:
      - "${PGADMIN_PORT:-5050}:80"
    restart: unless-stopped

  lizmap:
    image: 3liz/lizmap-web-client:3.2
    environment:
      LIZMAP_CACHEREDISDB: '1'
      LIZMAP_CACHEREDISHOST: redis
      LIZMAP_CACHESTORAGETYPE: redis
      LIZMAP_HOME: /srv/lizmap
      LIZMAP_USER: ${LIZMAP_USER_ID}
      LIZMAP_WMSSERVERURL: http://map:8080/ows/
    volumes:
      - ${LIZMAP_DIR}/instances:/srv/projects
      - ${LIZMAP_DIR}/var/lizmap-theme-config:/www/lizmap/var/lizmap-theme-config
      - ${LIZMAP_DIR}/var/lizmap-config:/www/lizmap/var/config
      - ${LIZMAP_DIR}/var/lizmap-db:/www/lizmap/var/db
      - ${LIZMAP_DIR}/www:/www/lizmap/www
      - ${LIZMAP_DIR}/www/var/log:/www/lizmap/var/log
    command:
      - php-fpm
    restart: unless-stopped
  map:
    image: 3liz/qgis-map-server:3.4
    environment:
      PGSERVICEFILE: /srv/etc/pg_service.conf
      QGSRV_CACHE_ROOTDIR: /srv/projects
      QGSRV_CACHE_SIZE: '20'
      QGSRV_LOGGING_LEVEL: DEBUG
      QGSRV_USER: ${LIZMAP_USER_ID}:${LIZMAP_USER_GID}
      ROUTER_HOST: map
    volumes:
      - ${LIZMAP_DIR}/instances:/srv/projects
      - ${LIZMAP_DIR}/etc:/srv/etc:ro
      - ${LIZMAP_DIR}/wps-data:/srv/data
    restart: unless-stopped
  redis:
    image: redis:5
  web:
    image: nginx:1
    volumes:
      - ${LIZMAP_DIR}/etc/nginx.conf:/etc/nginx/nginx.conf
      - ${LIZMAP_DIR}/var/log/nginx:/var/log/nginx
      - ${LIZMAP_DIR}:/srv/lizmap
    ports:
      - 8888:80
    depends_on:
      - lizmap

I'm able now login into lizmap in web browser, but tests projects in *.qgs files don't appears, so my lizmap web page is blank, even I try to change in UI lizmap setting regard to repository and projects.
Also I'm able now to connect from Qgis Desktop on my local machine to Postgis database and use Pgadmin webclient to connect to the same Postgis database. Although I'm aware that my Postgis DB doesn't integrate with Qgis server, Lizmap and Nginx webserver.
At the moment I think that I need, break down on sub tasks:

Put test project (map) to my current Postgis DB
Setup connection Qgis Server with Postgis DB through writing FCGI web config file for web server (in my case Nginx) . So some DB query should be writed in thi config file.
Setup connection Lizmap web client with Postgis DB
Probably setup/config XVFB in conjuction with QGIS server (container)


texts: Is there a way to copy/paste data & limit the attribution to match the attribution in the Target Data Set?

texts: In an effort to avoid digitizing, I want to copy specific watercbodies from a provincial database (shapefile format) and paste it to my taget layer, which are waterbodies significant to my project.  I don't want all the columns of attribution to paste over to my target data set (ie - I don't need the "GUT_NUMBER" column in my DBase).  Is my best approach to simply delete the attribute columns I don't want when I'm done, or is there a better/more efficient way to do this?


texts: GeoServer 2.14.0 / Cascading / WMTS : Can't parse crs IGNF:LAMB93:Authority "IGNF" is unknown

texts:
I want to cascade a WMTS service (IGN France) with my GeoServer 2.14.0 :
https://wxs.ign.fr/pratique/geoportail/wmts?SERVICE=WMTS&REQUEST=GetCapabilities

1) The URL works just fine in QGIS (2.14.22, "Essen") and I can see the map

2) When I add it as a store in GeoServer, there's a problem with the projection "IGNF:LAMB93". GeoServer doesn't know it:

org.apache.wicket.WicketRuntimeException: Exception 'Can't parse crs IGNF:LAMB93:Authority "IGNF" is unknown or doesn't match the supplied hints. Maybe it is defined in an unreachable JAR file?' occurred during validation org.geoserver.web.data.store.WMTSStoreNewPage$WMTSCapabilitiesURLValidator on component 14:form:capabilitiesURL:border:border_body:paramValue

3) I found this to add in ./geoserver/data/user_projections/epsg.properties

http://www.spatialreference.org/ref/sr-org/7527/

PROJCS["Lambert 93",
GEOGCS["Reseau geodesique francais 1993",
    DATUM["Reseau geodesique francais 1993",
        SPHEROID["IAG GRS 1980",6378137.0000,298.2572221010000,
            AUTHORITY["IGNF","ELG037"]],
        TOWGS84[0.0000,0.0000,0.0000,0,0,0,0],
        AUTHORITY["IGNF","REG024"]],
    PRIMEM["Greenwich",0.000000000,
        AUTHORITY["IGNF","LGO01"]],
    UNIT["degree",0.01745329251994330],
    AXIS["Longitude",EAST],
    AXIS["Latitude",NORTH],
    AUTHORITY["IGNF","RGF93G"]],
PROJECTION["Lambert_Conformal_Conic_2SP",
    AUTHORITY["IGNF","PRC0140"]],
PARAMETER["semi_major",6378137.0000],
PARAMETER["semi_minor",6356752.3141],
PARAMETER["latitude_of_origin",46.500000000],
PARAMETER["central_meridian",3.000000000],
PARAMETER["standard_parallel_1",44.000000000],
PARAMETER["standard_parallel_2",49.000000000],
PARAMETER["false_easting",700000.000],
PARAMETER["false_northing",6600000.000],
UNIT["metre",1],
AXIS["Easting",EAST],
AXIS["Northing",NORTH],
AUTHORITY["IGNF","LAMB93"]]

4) after adding the one for GeoServer  (http://www.spatialreference.org/ref/sr-org/7527/geoserver/) and restarting GeoServer , the new projection is in the list of GeoServer  (under the name EPSG:7527) but it still doesn't recognize the IGNF:LAMB93 when adding the WMTS store...

I have no idea what to do now.
How come GeoServer says he doesn't know authority "IGNF:LAMB93" but can read it ? (last line of WKT)


texts: How to include WMS, WMTS and WFS services using ArcGIS for Server Silverlight Builder?

texts:
I am new to ArcGIS for server (silverlight builder) and I want to include public WFS, WMS and/or WMST services in an application I'm building but I just can't seem to do it.

I have read that ESRI is only supporting Bing, OpenStreetMap and services from ESRI online, as basemaps but surely it should be possible to use other services as layers within a application. Is it possible that ArcGIS for server uses a totally different REST interface and therefore wont recognise the URL endpoints I have tried?.

If something like this is the case is it possible to use a proxy to translate to and from ESRI speak??.


texts: Split Raster (by value) to Multi-Part Polygons

texts:
I want to convert a raster to multi-part polygons, using the raster value to determine which polygon each cell becomes a part of. I have provided an example of what I am looking to achieve below, where each cell of the raster is assigned to a single multi-part polygon. If I split the cell values into five intervals, I would want five multipart polygons.

I have attempted to use the "Raster to Polygon" tool in ArcMap, but was unsuccessful because no matter how I used to raster calculator to get rid of decimal points on the raster, decimals continued to remain. Is there a way to do this in R?


texts: How to automatically update WFS edits with a user id?

texts:
So I have a WFS layer on QGIS, served by geoserver from a postgis table that around 10 to 20 people contribute to by adding new features or editing existing ones. I have a column called creator but not everyone bothers updating it and it would be most useful to see which user did what edit.

I was able to add a column that automatically gives the date but I wonder if it would be possible to have the creator column being automatically updated depending on the user.

Would different projects do the trick or is there another way?

Edit: I have a table with ids 1 to 24 on one column, and their corresponding names on the second column but trying to figure out how to use QGIS's apparent new feature to do this

Edit2: there seems to be a 2.18 QGIS bug while working with WFS, sometimes the layers don't want to show up and this happens to several users. If there's any other solution that doesn't involve 2.18 it would be most helpful


texts: Spatial weight for PySAL from a geojson file or geodataframe?

texts: I want to calculate the Moran I value of a geojson file through python. Recently I am trying to use pysal and I find that I need to get the a spatial weight to realize it. But from the official guide it seems that it only supports shapefiles. I am wondering whether I can get spatial weight from a geojson file without convert it to shapefile or if there are any others tools for calculating spatial autocorrelation with geojson file or geodataframe in python.


texts: Converting tabular data with multiline string field using FME?

texts:
I have data in a table. One of the fields has pairs of coordinates. The coordinate pairs represent a point and the points joined in order to represent a line. The number of coordinate pairs varies. There are many tables!

How do I convert this table to a spatial dataset (i.e. shapefile) using FME?

Here is the content from one of the cells in the table (the 'shape' field). This is an example of 2 coordinate pairs but some have 10 pairs so I can't easily use 'text to columns' in Excel.

MULTILINESTRING ((138.5418028 -35.0290507909, 138.54179 -35.028988))


texts: Export SQL --> PostGIS + visualization in QGIS

texts:
I am a newby in GIS and I need help to implement some functions...
I have an application (H2O facility) that works with a SQL database. I have entities like clients, measure devices, worksheets, etc, that have a geographical position (Lat, Long).
My idea is export this info to a GIS Database (PostGIS) and visualize it with QGIS. For example, visualize the water measure device layer o other layers in the street map.
How can I do this?


texts: Looking for a projection used for Nova Scotia in 1924

texts:
I have a map of Nova Scotia published by the Department of the Interior Canada in 1924 which I would like to georeference.

The map has a graticule labeled with latitude and longitude. According to a note on the map, the prime meridian is Greenwich. It's not a Conformal projections since lat/long do not meet perpendicular.

I have read that the Department of the Interior Canada was using a Polyconic projection before replaced with the 1932 Lambert
Conformal Conics. (https://www.asprs.org/a/resources/grids/12-97-canada.pdf)

Were there other projections used in 1924? What projection and datum is most likely used for a map of Nova Scotia in 1924?


texts: How to avoid Cross Origin problem when trying to use ArcGIS Online Geocode server?

texts:
I'm trying to use a javascript locator object with a geocode server of ArcGIS Online: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Locators/ESRI_Geocode_EU/GeocodeServer

When I call the method locator.addressToLocations(options), I get the cross-origin problem.

Is there a way to avoid this?


texts: Remove large percentage of nodes from shapefile

texts:
I am trying to reduce the number of nodes in a shapefile because I want to extract the X and Y coordinates for use in R. As the number of nodes approaches hundreds of thousands, it does not work well with what I am doing.

Is there any way to do this with QGIS?


texts: ArcGIS - possible to set the drawing order of polygon features

texts:
I have a table with polygons that I wish to display in a map. I would like the smaller polygons to appear on top of larger polygons. Is there a way to set the drawing order such that  the larger polygon outlines don't cover up the smaller ones?

I've tried using the polygon area attribute as a transparency factor within the layer's symbology properties - but this is not working well enough.


texts: Handling AIS data using Python and PostGIS?

texts:
I want to turn points into a linestring in PostgreSQL with the extension of PostGIS using Python. I want the lines in a new table because every few minutes more points are added and it needs to keep updating as a separate table.

I have this SQL code to create a new database with a linestring column.

CREATE TABLE public.vesselpositionslijn (
  id bigint NOT NULL DEFAULT nextval('vesselpositionslijn_id_seq'::regclass),
  name character varying COLLATE pg_catalog."default",
  mmsi bigint,
  "position" geometry(LineString,32634),
  CONSTRAINT vesselpositionslijn_pkey PRIMARY KEY (id)) WITH (
  OIDS = FALSE)
TABLESPACE pg_default;

ALTER TABLE public.vesselpositionslijn
OWNER to postgres;

There is a Python code (at the bottom of this question) that stores the data in the points table (vesselpositions) but it doesn't store the data in the vesselpositionslijn table, as a response it is saying: cur.execute ( update_stmt, ( longitude, latitude, name) )
psycopg2.InternalError: First argument must be a LINESTRING

This is the relevant piece of the Python code:

name = str(response.json()[i]['AIS']['NAME'])
mmsi = int(response.json()[i]['AIS']['MMSI'])
latitude = float(response.json()[i]['AIS']['LATITUDE'])
longitude = float(response.json()[i]['AIS']['LONGITUDE'])
timestamp = datetime.datetime.strptime(str(response.json()[i]['AIS']['TIMESTAMP'][:-4]), '%Y-%m-%d %H:%M:%S')
insert_stmt = 'insert into vesselpositions ( name, mmsi, "position", "timestamp" ) values ( %s, %s, ST_SetSRID(ST_MakePoint(%s, %s),4326), %s )'
cur.execute ( insert_stmt, ( name, mmsi, longitude, latitude, timestamp ) )
update_stmt = 'update vesselpositionslijn set position = ST_AddPoint(position, ST_MakePoint(%s, %s)) where name = %s'
cur.execute ( update_stmt, ( longitude, latitude, name) )

Does anybody know what I'm doing wrong?


texts: Creating routes from CSV files in ArcMap

texts:
I try to create route(line) shp data from a CSV file that includes x-y coordinated data.

First I should organise the data to add it gis and convert to shp.
The Excel data I have is like this...

(r values will not be used). It includes hundreds of different coordinates for different people.

So, how can I convert the data to shp directly? what kind of an Excel version do I need? The examples I saw include two columns  (x,y) and only numbers. I am not sure how to do it in my case.

And secondly, after I added the data to GIS, I tried to use  "Display XY data"  command but it only gave me points. Then I tried to use "points to line" command but it did not work.

How can I create lines from all these data?

If I can create routes as lines, I will add a length column and use it.

And this is the error I receive when I try to use point to line command


texts:
I have downloaded a xml OSM file, but I would like to query by mouse possition a way Id, nodes Id, etc...

I only need to view it.

I'm exploring OpenTripPlanner, to be able to calculate routes with it I have my streets graph using a OSM file. I also intend to update ways speed limits using traffic data. I have the traffic data, and know it's position, now I need to find out the way Id at that position to be able to match it (so routing takes that into account).

I have QGis, but I have only been able to load all the nodes in the file, but not the complete graph (ways, etc...) and don't know how to query it (I need something similar to WFS).

Which is the more convenient way?, I'm using QGis but if there is a better tool feel free to mention it.

After a comment I tried loading the OSM file using layer > àdd layer>add vector layer` I have now loaded the data and I'm querying it in QGis, but how can I view the nodes in a way?

For example, I'm examining the way with id = 172550740, but how can I view the nodes (specially start and end nodes)?


texts: I'm trying to figure out the best way to get text input from a user through a pythonaddin. After watching this video it appears that a editable combo box is an option, but it's maybe not ideal due to its size. Message boxes only allow for Yes/No/Cancel so that's no good. Is there a better way?


texts: Google maps error in OpenLayers plugin in QGIS

texts:
I was using the Google maps on OpenLayers plugin in QGIS 2.16.3 successfully before but today when I tried it the page appears as shown in the figure;

I tried re-installing the plugin but this keeps on coming.

Have there been any changes to the plugin?