texts: Custom WPS for GeoServer (overlay of two polygon layers)

texts:
I am trying to create my own WPS process in Java about overlaying two polygon shapefiles, but I can't figure out how to do it. Here is a code about reading Shapefile and creating buffer around point.

public String overlay(String pointString, double distance) {
    String names = "Object:Area of overlay";
        try {
            //read SHP
            ShapefileDataStore sfdt = new ShapefileDataStore(new URL("file:///_ING/geoserver-2.8.0/data_dir/data/sf/restricted.shp"));
            SimpleFeatureSource sfs = sfdt.getFeatureSource("restricted");

            //double distance 1000.0d;
            GeometryFactory gf = new GeometryFactory ();
            String xy [] = pointString.split(" ");
            Point point = gf.createPoint(new Coordinate(Double.parseDouble(xy[0]), Double.parseDouble(xy[1])));

            Polygon p1 = (Polygon) point.buffer(distance);

            SimpleFeatureIterator sfi = sfs.getFeatures().features();
            while (sfi.hasNext()) {
                SimpleFeature sf = sfi.next();
                MultiPolygon mp2 = (MultiPolygon) sf.getDefaultGeometry();
                Polygon p2 = (Polygon) mp2.getGeometryN(0);
                Polygon p3 = (Polygon) p2.intersection(p1);
                names = names + "\n" + sf.getAttribute("cat") + ": " + p3.getArea();
            }

        }   catch (MalformedURLException ex) {
        Logger.getLogger(Process.class.getName()).log(Level.SEVERE, null, ex);

        } catch (IOException ex2) {
        Logger.getLogger(Process.class.getName()).log(Level.SEVERE, null, ex2);

        }
    return "Objects found: " + names;
}

Here is implementation into GeoServer

@DescribeProcess (title="overlayWPS", description="Creates buffer around point and overlays it with polygon layer. Returns area of overlay.")
public class OverlayWPS implements GeoServerProcess {

    @DescribeResult(name="result", description="output result")
    public String execute(@DescribeParameter(name="point", description="point") String point, @DescribeParameter(name="distance", description="distance to search") double distance) {
        Process p = new Process();
        return p.overlay(point, distance);

I would like to change it get overlay of two separate shapefiles and get overlaid area as third multi-polygon layer.

https://github.com/val0065/dp


texts:
I am trying to run an exe file from the python console in QGIS.

my_aplication.exe is a script made in Python3.4 and 'compiled' to windows exe file

import os
os.system('C:\Python34\my_application.exe')

exit_status = 1

But it does not works

How can I do that ?


texts: Online Editing in QField (multi-user environment)

texts:
I have a QGIS Project that I run on QField to create points/lines and give them attributes in the Field. We have three tablets with the same project on it. Right now QField saves the new data "offline" and we need to use QSync to merge the data.

Is there a direct and fast way to set the projects of all three tablets online so that new data is directly filled into the Post-GIS database?


texts:
I downloaded vector data of a map from tiger products and loaded them in QGIS. it renders the map as expected and I can see the attributes too. but how to understand the data and the map ? I mean the link between the map lines and attributes.

the attributes table for a line in map is as follows:
OBJECTID LINEARID FULLNAME MTFCC if I select a line and view its WKT it is giving its latitude and longitude coordinates which are exactly matching with google mpas.

The problem that teasing me is how this map and the data is related ? Is the attribute table data is the vector data of this map, if not whats the exact vector data. can some one provide any example vector for a map line.


texts: Cause of Field Calculator UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 5: ordinal not in range(128)?

texts:
def Befahrung(value1,value2):
  if value1 is ' ':
    return ' '
  else:
return "G:\\Example\\" + str(value1) + "\\File_" + str(value2) + ".pdf"

I try to create a field with a hyperlink. It works very well until i hit a special charakter. What do i have to change?

This is the error:

  ERROR 000539: Error running expression: Befahrung(u" ",u"Mönch")

  Traceback (most recent call last):

  File "", line 1, in

  File "", line 5, in Befahrung

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


texts: Layer not aligning after georeferencing using BC Albers

texts:
I'm currently having trouble with the georeferencer... after what appears to be successful georeferencing, the map image layer does not align to the vector data.

I'm trying to use BC Albers projection (as it's the projection of the original map image as well as the vector dataset). On-the-fly transformation is selected.

Any ideas?


texts: Where to get QGIS 3 Join by Field Value Script?

texts:
I´m trying to solve my problem with Join attributes by field value and for that I want to make a script on PyQGis to solve that.

Is there a location where I can found the script used in Join by field value on QGIS 3? To get it as a base and a guide.

I looked at GitHub and found only the Spatial Join script.


texts: Can I modify a layer which is uploaded by myself?

texts:
I first uploaded a GeoJSON type polygon to the OpenLayers. Can I still edit the feature of this layer? Here is the code I am using: (It can upload the GeoJSON layer but can not edit it)

        var map, layer;
        function init(){
        map = new OpenLayers.Map( 'map');
        layer = new OpenLayers.Layer.OSM( "Simple OSM Map");
        map.addLayer(layer);
        map.setCenter(
        new OpenLayers.LonLat(0.8,52.472).transform(
                new OpenLayers.Projection("EPSG:4326"),
                map.getProjectionObject()
            ), 7
        );
        var featurecollection = {"type":"Polygon","coordinates":[[[-248052.78111938,6928922.6476283],[-193018.12076172,6933661.7433813],[-167335.27926147,6885812.1636815],[-184915.79576462,6855084.4783151],[-228484.9018811,6854931.6042586],[-260588.45375641,6872512.1207617],[-266703.41601837,6898194.962262],[-248052.78111938,6928922.6476283]]]};
        var geojson_format = new OpenLayers.Format.GeoJSON();
        var vector_layer = new OpenLayers.Layer.Vector({
          projection: new OpenLayers.Projection("EPSG:4326")
        });
        map.addLayer(vector_layer);
        vector_layer.addFeatures geojson_format.read(featurecollection));
        //Until Here, No Problem
        var select_control = new OpenLayers.Control.SelectFeature(vector_layer);
        select_control.activate();
        var modify_control = new OpenLayers.Control.ModifyFeature(vector_layer,{
            mode:OpenLayers.Control.ModifyFeature.RESHAPE
        });
        map.addControl(modify_control);
        modify_control.activate();
    }

Is there something wrong with the editing code?


texts:
Although i've seen some similar treads, I don't manage to quite solve my problem.
I've added a delimited text layer that includes coordinates of 2 points. I want to make arrows between these points that vary in size based on a fifth column value.

I created arrows by a geometry generator with the following expression:

make_line( make_point(  "OR_Lon",  "Or_Lat" ),make_point(  "DES_Lon" , "DES_Lat" ))

After setting the symbology to 'graduated' i can change the colors based on the value, but the size is not working. Anyone an idea to fix this?


texts: How to find the intersection of 5 bounding boxes in R

texts:
I have 5 rasters. I computed the bounding boxes with st_bbox for each of them. I would like to put all the raster-values in one dataframe. For that I figured they should have exactly the same extent.
I tried the raster::resample-method, but I'm not really aware if it's just changing the resolution or the extent or what it is acutally doing.
So I thought I might simply compute the intersection of these five shapes and crop and mask every raster afterwards on this extent.
The extents look like this:
> bboxes
[[1]]
     xmin      ymin      xmax      ymax
 682878.2 5577687.4  769888.0 5661769.2

[[2]]
     xmin      ymin      xmax      ymax
 682883.9 5577682.1  770070.2 5661805.2

[[3]]
     xmin      ymin      xmax      ymax
 683022.2 5577718.4  770026.7 5661795.0

[[4]]
     xmin      ymin      xmax      ymax
 679258.9 5593985.4  766400.1 5678075.8

[[5]]
     xmin      ymin      xmax      ymax
 679306.8 5593986.0  766452.5 5678075.5

Does anyone has an idea on how to do that?


texts: Why does my Fiona output look different from my image

texts:
I'm trying to export my houghlines as a shapefile, which works. But the output the lines in my shapefile are very different then the generated hough lines that are shown on the image.

Example:

The output here is great, beacause I need the corner point of the building.

When I try to save the lines with Fiona, the output (in QGIS) becomes this:

Wich is a way less elegant result. How do i export the lines exactly like they are shown in the image?

My code:

import numpy as np
from numpy import array
import cv2
from shapely import ops
from shapely.geometry import LineString, MultiLineString, mapping
import fiona
from fiona.crs import from_epsg
#from PIL import Image

in_path  = 'D:\\Users\\PdeHaan\\Documents\\TestFase\\Python\\Data\\Test_kernel_error\\t2\\filtered_2871_10476_1_1_1_1.tif'
out_path = 'D:\\Users\\PdeHaan\\Documents\\TestFase\\Python\\Pictures\\hough_lines_TESTTTT.tif'

gray = cv2.imread(in_path)
edges = cv2.Canny(gray,50,150,apertureSize = 3)
cv2.imwrite('D:\\Users\\PdeHaan\\Documents\\TestFase\\Python\\Pictures\\edgess.tif',edges)
minLineLength=40
lines = cv2.HoughLinesP(image=edges,rho=3,theta=np.pi/180, threshold=200,lines=np.array([]), minLineLength=minLineLength,maxLineGap=30)

black = np.zeros_like(gray)
a,b,c = lines.shape
for i in range(a):
    cv2.line(black, (lines[i][0][0], lines[i][0][1]), (lines[i][0][2], lines[i][0][3]), (255, 0, 0), 1, cv2.LINE_AA)

    cv2.imwrite(out_path,black)

#print lines
arraylines = array(lines)

arraylines = arraylines.astype(float) / 10.0
print arraylines

# Rotate image
for arrayline in arraylines:
    for x1, y1, x2, y2 in arrayline:
        arrayline[:,0] = 50 - x1
        arrayline[:,1] = 50 - y1
        arrayline[:,2] = 50 - x2
        arrayline[:,3] = 50 - y2

#print arraylines

# Georeference to CRS
s_lines = []
for arrayline in arraylines:
    for x1, y1, x2, y2 in arrayline:
        x1 += (2870 * 50)
        y1 += (10474 * 50)
        x2 += (2870 * 50)
        y2 += (10474 * 50)

        s_line = LineString([(x1, y2), (x2, y1)])

        s_lines.append(s_line)

multi_line = MultiLineString(s_lines)

merged_line = ops.linemerge(multi_line)

schema = {
    'geometry': 'LineString',
    'properties': {'id': 'int'}
}

with fiona.open('output_line_kernel.shp', 'w',  'ESRI Shapefile', schema,crs=from_epsg(28992)) as c:
    c.write({
            'geometry': mapping(merged_line),
            'properties': {'id': 0}})


texts: Creating maplayer to show high chlorophyll and sst locations based on SMI Modis imagecollection using Google Earth Engine

texts:
I'm trying to create a maplayer to show spots where both chlor_a and sst show high values in google earth engine

I've used this code bellow but instead generated a map showing the chlorophyll values opposite to the temperature values. How do I generate a layer that represents locations with both variables with high values and how do I define the range of variation?

var dataset = ee.ImageCollection('NASA/OCEANDATA/MODIS-Aqua/L3SMI')
              .filterDate('2016-01-01', '2016-01-31');

var chlorsst =
dataset.select(['chlor_a', 'sst']);
var chlorsstVis = {
min: 0.0,
max: 99,
};
Map.setCenter(-52.12, -46.13, 4);
Map.addLayer(chlorsst, chlorsstVis,
 'ChlorSst');
print(chlorsst)


texts: Time series for MultiPoint geometries in Google Earth Engine

texts:
I am trying to generate time series for a set of points in earth engine. I am attempting this for multiple datasets, but for now let's do NDVI with Landsat 8.  My problem lies (i think) in step 6. below, as the plot is generated, but with no sign of mutiple sites...

Data import

var l8sr = ee.Image('LANDSAT/LC08/C01/T1_SR')

The method I am trying to use is as follows:

Create a multi point geometry, here called roi. N.B. The code presented in this question runs perfectly for a single point geometry, but not for multipoint

var roi = ee.Geometry.MultiPoint([[146.007413888888,-17.6536194444444],
           [146.061191666666,-17.4442805555555],
           [145.960902777777,-17.7890055555555],
           [151.937444444444,-24.3380305555555],
           [150.468130555555,-23.1586194444444],
           [148.506963888888,-21.088375],
           [148.591619444444,-21.3626416666666],
           [148.186125,-24.9189222222222]])

Set the time field as milliseconds since 1970-1-1 00:00

var timeField = 'system:time_start'

A couple of functions which I am using to clean and process data. These have been taken from sources that I dont have to hand, but will update question when I do.

4.a Function to mask cloud using the pixel_qa (quality assurance) band of L8SR data. This is from the code editor example on cloud masking

function maskL8sr(image) {
  var cloudShadowBitMask = 1 << 3
  var cloudsBitMask = 1 << 5
  var qa = image.select('pixel_qa')
  var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
  .and(qa.bitwiseAnd(cloudsBitMask).eq(0))
  return image.updateMask(mask).divide(10000)
  .select('B[0-9]*')
  .copyProperties(image,['system:time_start'])
}

4.b Create NDVI, time, and constant variables in data

var addVariables = function(image) {
  var date = ee.Date(image.get(timeField))
  var years = date.difference(ee.Date('1970-01-01'),'year')
  return image
  .addBands(image.normalizedDifference(['B5','B4']).rename('NDVI'))
  .addBands(ee.Image(years).rename('t'))
  .float()
  .addBands(ee.Image.constant(1))
}

Apply functions to data and filter by roi

var filteredLandsat = l8sr
.filterBounds(roi)
.map(maskL8sr)
.map(addVariables)

Plotting a time series of NDVI. The image that is output from this  is one with red points only and no sign of multiple sites being present. I am trying my best to troubleshoot this, but have hit a bit of a wall in my understanding and thought to bring the question to a wider audience...

//Plot a time series of NDVI at a single location
var l8Chart = ui.Chart.image.seriesByRegion(filteredLandsat,
                                            roi,
                                            ee.Reducer.mean(),
                                            'NDVI')
                                            .setChartType('ScatterChart')
                                            .setOptions({
                                              title: 'Landsat 8 NDVI time series at ROI',
                                              vAxis: {title: 'NDVI'},
                                              lineWidth: 1,
                                              pointSize: 4,
                                              series: {
                                                        0: {color: '#FF0000'}, // Warrubellen
                                                        1: {color: '#FFFF00'}, // Ella Bay
                                                        2: {color: '#00FF00'}, // Nyleta Creek
                                                        3: {color: '#008000'}, // Deep Water
                                                        4: {color: '#00FFFF'}, // Mt Etna Quarry
                                                        5: {color: '#0000FF'}, // Eungella 1
                                                        6: {color: '#FF00FF'}, // Eungella 2
                                                        7: {color: '#800080'}  // Carnavon
                                                      }

                                            })
print(l8Chart)


texts: Star Markers - unable to get tie points in Inpho Match-AT

texts:
What do the star markers mean in Trimble's Inpho Match-AT software, specifically in the multi-photo measurement feature?

I have been unable to generate tie points in an aerial triangulation in photos which have no star in the center icon.

I don't know what they mean or why they don't have stars. The photos are present and connected, they have initialized external orientations and correct camera parameters, and each file does actually have data.

I haven't been able to find anything in any help documentation.


texts: What bounding box to use for a Miller projection?

texts:
I'm not a GIS expert at all and new to dealing with maps. My question is really basic. I'm basically asking for the extent of earth. Please help out anyway.
I'm trying to render tiles for a world map that I want to host. So I basically need three things: A map image file, specify a coordinate system, and a bounding box to declare the map's geographical location. Got the first two but struggling with the third.
My map is not a Mercator projection but a rectangular World Miller Cylindrical ESRI:54003 https://epsg.io/54003 (additionally, not sure if important, it's also unusual in that it centers on the Pacific ocean at 153°E).
Now my problem is that its spatial reference system is not in degrees but metres and I don't  know what bounding box I should specify. In a usual Mercator projection with a WGS 1984/ EPSG:4326 sorta coordinate system I'd define a bounding box of "-180 -90 180 90" degrees to cover the whole earth. What is the equivalent to that in metres?
In summary: What bounding box string should I use for a map of the whole earth in Miller projection?


texts: Hiding optional outputs in Model Builder?

texts:
I am creating a model in ArcGIS Desktop version 10.7.1 that uses the "Topo to Raster" tool to convert contours (line shapefile) to a raster. The contours are actually representing lines of equal aircraft noise (modeled from flight paths, altitude, distance from airport, etc) but the process should be equivalent to creating a DEM from elevation contours.

The "Topo to Raster" tool comes with a variety of optional outputs, which I do not care about, because I am only interested in the resulting raster. I cannot delete these optional outputs without deleting the whole tool (any attempt to click and delete them selectively removes the whole thing), but they makes my model appear cluttered and hard to read.

Since they are totally irrelevant to the rest of my process, which is already large and contains many tools, I would really like to delete these extraneous outputs, or at least hide them from the graphical interface's flowchart. To be clear, the tool itself works fine, without any of the optional outputs specified, this question is just about aesthetics. I like to use the Model Builder as a graphic to show and explain my methodology.

I checked to make sure this question wasn't addressed elsewhere first, and I have attached a sample image below.


texts: Estimation value of simple kriging are constant in geostatistical analyst (ArcGIS)

texts:
The objective of my study is to compare the accuracy of the model SK (simple kriging) and OK (ordinary kriging). When I use OK to apply on my data, there is a little bit variation on the prediction map but when I use the SK to apply on my data, there is no variation on the prediction map.

My data is the water quality that I collected from the lake:

My problem is there is no variation on my prediction map when I use SK to apply on my data. What should I do?

This is the image of it semivariogram:


texts: how to draw coordinates along the lanes using MultiLineString instead of LineString

texts:
I trying to draw lines along the path of the lanes on the map using openlayer3 but i am not getting any lines on the lanes there is no error in the developers console as well

<!DOCTYPE html>

    <title>Rotation example</title>

I am newbie please say me what is wrong i not sure of the approach to do it, trying few things to accomplish it  please if some body has code sample to do it please do post


texts: Is there a way to upload a geotiff file directly to Earth Engine using python?

texts:
Is there a way to upload a particular geotiff file (from my computer) directly to the Google Earth Engine using the command line (or using a python script)?

When using the Python API, I have found just examples of moving from Google Cloud to Earth Engine.


texts: Can someone show me a very simple find and replace in field calculator for just one or two characters in a field based hyperlink?


texts: Issue on Exporting Shapefile Points to Google Map Longitude & Latitude?

texts:
Using ArcGIS 10.2 and Some points in Shapefile with BC Albers Coordinate System I am having problem on Getting Points Longitude & Latitude in Google Map Coordinate System. What I have is a CSV file contains the X and Y data in BC Albers Coordinate System. I Followed these steps :

I Uploaded The CSV File Data into Map Using File --> Add Data --> Add XY Data...
After Getting the points on the Map I Used Define Projection tool to apply BC Albers Coordinate System into the Layer.
The I used the Project tool to transfer Projection from BC Albers (PCS_Albers) to  WGS 1984 Web Mercato (auxiliary sphere)
Finally I used the Add XY Coordinate tool get the X and Y of the points on the table. the result look like:

As you can see the POINT_X and  POINT_Y are different than original x and y and when I export the map to KML the data are correctly display on Google Map and Google Earth BUT I need to export these data in MySQL database and get the Google Maps Markers from the POINT_X and  POINT_Y which in this case I am getting absolutely wrong location of the points on the Map!
I checked one of points, for example I got

from table and it renders correctly on the map but when I get the same location from What's Here function on Google Map I am getting Totally different number for Lat and Long as:

Now as I mentioned before I am going to upload my data into MySQL database and use them through Google Map JavaScript API and get them by PHP, so I NEED to have the actual latitude and Longitude  values in ArcGIS.
Can you please let me know how to do this?


texts: Kartotherian Server Sources Configuration

texts:
Is there any documentation for using Kartotherian Server with a vanilla/non OSM PostGIS database?
The Kartotherian core documentation doesn't cover database connections or definitions of different parameters. Tilelive isn't too helpful either.


texts:
I have downloaded a GML file from Statistics Canada and would like to convert it into GeoJSON to use parts of it in a D3 visualization on the web. However, I did not find a converter that would do that for me (I tried http://converter.mygeodata.eu/ , but the GeoJSON it returned did not contain any actual geometry).

What is the best approach to convert GML into GeoJSON?


texts: Conversion from NZMG to latitude and longitude

texts:
I want to convert NEW ZEALAND MAP GRID coordinates i.e. Northing and Easting into WGS84 coordinates i.e. Latitude and Longitude.

I have searched on internet but there is no proper explanation of how to do this, or an online  calculator to do this.

My final goal is to write a program in C# or JAVA , which will convert NZMG coordinates into WGS84 coordinates.


texts: What is spectral response function for RAPID EYE?

texts:
What is the spectral response function of rapid eye i.e. is it the same as for LANDSAT or MODIS?

Also, what is the central wavelength for each band?


texts:
getting this weird error saying that image/png is not supported.

[Sun Jul 23 22:58:24 2017].672000 msFreeMap(): freeing map at 00000000007DA390.
[Sun Jul 23 22:59:00 2017].99000 msWMSLoadGetMapParams(): Image handling error. Unsupported output format (image/png).
[Sun Jul 23 22:59:00 2017].247000 msFreeMap(): freeing map at 00000000007D9D30.

below I attach the mapfile:

MAP
  CONFIG "PROJ_LIB" "H:\\mapserverlib\\bin\\proj\\SHARE"
  CONFIG "MS_ERRORFILE" "H:\\mapfiles\\log.txt"
  DEBUG 5
  EXTENT 1433525.798872 -4480198.522214 6502586.830347 4615124.978985
  FONTSET "C:\\temp\\font.list"
  IMAGECOLOR 255 170 204
  IMAGETYPE "png"
  NAME "MapName0"
  RESOLUTION 90
  SIZE -1 -1
  STATUS ON
  UNITS METERS

  OUTPUTFORMAT
    NAME "png"
    MIMETYPE "image/png"
    DRIVER "AGG/PNG"
    EXTENSION "png"
    IMAGEMODE RGBA
    TRANSPARENT TRUE
    FORMATOPTION "GAMMA=0.75"
  END # OUTPUTFORMAT

  OUTPUTFORMAT
    NAME "png8"
    MIMETYPE "image/png; mode=8bit"
    DRIVER "AGG/PNG8"
    EXTENSION "png"
    IMAGEMODE RGBA
    TRANSPARENT TRUE
    FORMATOPTION "QUANTIZE_FORCE=on"
    FORMATOPTION "QUANTIZE_COLORS=256"
    FORMATOPTION "GAMMA=0.75"
  END # OUTPUTFORMAT

  OUTPUTFORMAT
    NAME "jpeg"
    MIMETYPE "image/jpeg"
    DRIVER "AGG/JPEG"
    EXTENSION "jpg"
    IMAGEMODE RGB
    TRANSPARENT FALSE
  END # OUTPUTFORMAT

  PROJECTION
    "init=epsg:2964"
  END # PROJECTION
  LEGEND
    KEYSIZE 20 10
    KEYSPACING 5 5
    LABEL
      SIZE 10
      OFFSET 0 0
      SHADOWSIZE 1 1
    END # LABEL
    STATUS OFF
  END # LEGEND

  QUERYMAP
    SIZE -1 -1
    STATUS OFF
    STYLE HILITE
  END # QUERYMAP

  SCALEBAR
    INTERVALS 4
    LABEL
      SIZE 10
      OFFSET 0 0
      SHADOWSIZE 1 1
    END # LABEL
    SIZE 200 3
    STATUS OFF
    UNITS MILES
  END # SCALEBAR

  WEB
    METADATA
      "wms_srs" "EPSG:2964"
      "wms_onlineresource"  "http://127.0.0.1:8000/map"
      "wms_getcapabilities_version" "1.3"
      "wms_getmap_formatlist"   ""
      "wms_service_onlineresource"  "http://127.0.0.1:8000/map"
      "wms_getlegendgraphic_formatlist" ""
      "ows_enable_request"  "*"
      "wms_feature_info_mime_type"  "text/html"
      "ows_schemas_location"    "http://schemas.opengis.net"
      "wms_timeformat"  "%Y-%m-%d %H:%M"
      "wms_encoding"    "ISO-8859-1"
      "wms_title"   "Mapserver metadata"
    END # METADATA
  END # WEB

  LAYER
    DATA "H:\\gisdata\\airports.shp"
    DEBUG 5
    EXTENT 1433525.798872 -4480198.522214 6502586.830347 4615124.978985
    METADATA
      "wms_title"   "ShapeFile"
    END # METADATA
    NAME "ShapeFile"
    STATUS ON
    TILEITEM "location"
    TYPE POINT
    UNITS METERS
    CLASS
    # Start of the first Style
    STYLE
      # Symbol to be used (reference)
      SYMBOL "square"
      # Size of the symbol in pixels
      SIZE 16
      # Colour (RGB) - red
      COLOR 255 0 0
      # Outline colour (RGB) - black
      OUTLINECOLOR 0 0 0
    END # end of STYLE
    # Start of the second Style
    STYLE
      # Symbol to be used (reference)
      SYMBOL "circle"
      # Size of the symbol in pixels
      SIZE 10
      # Colour (RGB) - blue
      COLOR 0 0 255
    END # end of STYLE
  END # end of CLASS
  END # LAYER

END # MAP

Anything unusual? Any idea of what might be going on?

Request sample:

http://127.0.0.1:8000/map?service=WMS&version=1.3.0&request=GetMap&width=500&height=300&styles=&layers=ShapeFile&format=image/png&crs=&bbox=-4480198.522214,1433525.798872,4615124.978985,6502586.830347

MapServer info

    <!--
     MapServer version 7.0.4 OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML
SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=CAIRO
SUPPORTS=SVG_SYMBOLS SUPPORTS=SVGCAIRO SUPPORTS=ICONV
SUPPORTS=FRIBIDI SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER
SUPPORTS=SOS_SERVER SUPPORTS=FASTCGI SUPPORTS=THREADS
SUPPORTS=GEOS INPUT=JPEG INPUT=POSTGIS INPUT=OGR INPUT=GDAL
INPUT=SHAPEFILE
    -->


texts: How to upgrade from Windows 7 to 8 without losing ArcGIS for Desktop 10.1 Student Version License?

texts:
I have Arc GIS installed in my windows 7 with 1 year license key student version.I have recently installed licensed Arc GIS 1 month ago.Now i want to update my laptop to windows 8.
Now after installing windows 8 does the same license works since the license key is the same?

hoping for response

Eliza


texts: Flickr image doesn't show up on Infobox Header of CartoDB?

texts:
I'm trying to put an image on my CartoDB infobox header from Flickr and it doesn't work. However, images from Google work.

Is there any way to make a Flickr picture work?


texts: QGIS - Vector coordinates have incorrect format

texts:
I have imported a .shp file (Layer --> Add Layer --> Add Vector Layer) and want to get the latitude/longitude of the points in this file. (It's a file of world coastlines).

I ran Vector --> Geometry Tools --> Extract Nodes and have a nice outline.  I even see the correct corrdinates in the QGIS window:

However, when I try to save that new file as a CSV, the X/Y coordinates are a weird format:

X           Y
-3817908    18432293
-3826512    18426524
-3840126    18409838
-3859723    18368052
-3867249    18359913
-3876943    18362476
-3912276    18386416
-3941774    18394507

Instead of the GPS coordinate type, i.e. -115.00, 49.82.

Even if I try to edit the fields, and add a new one for $x or $y, it shows the 'incorrect' number:

What's odd is I followed these exact steps on another Node file (that ne_10m_nodes), and it does show the correct format.

What could I be doing wrong?

(Note: the data source for the .shp file is different in the 'broken' and 'working' one, but after I get the nodes extracted, wouldn't think that makes a difference...)


texts: List the tab/shp files properties within folders/sub folders w.r.t relative folder path

texts:
Currently i am using this command line

For /R "U:\01 My Proj" %f in (*.tab) do ogrinfo -al -so "%f" >>U:\New.txt

to extract all the tab file related information as a text.Instead of giving the path folder...is it possible to run this command w.r.t to the folder wherein which the bat file has been copied ? (Another thing is the sub folders name will have spaces )

What i am trying to do is..save this command as a bat file using notepad & want to run it different folders (like..i'll copy the bat file to the respective folder & execute it).

Will /* in place of Path_folder work ? I've tried that too


texts: I was wondering if there was a way to use a map that I have stored on an ArcGIS Server in a telerik radMap. I am not very familiar with the radMap control. I have found the documentation on using a radMap with Shapefiles, but it was not very helpful.


texts: Is it possible to animate a cartogram with FOSS GIS?

texts:
I was wondering if anyone knows of any FOSS tools to animate cartograms?

By this, I mean 'tweening' between the geographic shapefile and the cartogram version of a shapefile.

This means gradually changing / morphing / interpolating one polygon into another. The "before" and "after" polygons have identical numbers of nodes, but each of these nodes will have different positions.

There's an example here on the ESRI blog.

They don't do the animation uniformly, they pass across the polygons in increasing longitude order, but it gives an idea of the effect I'm after.

I've been using ScapeToad to do cartograms, and it looks as if it generates a cartogram shapefile with the same number and order of vertices as the original shapefile.

This means I should be able to write code that interpolates each node along a line from its geographic position to its distorted position - perhaps with 'easing' (so the position on the line isn't linear interpolation, more like points on a sine-wave)

Is there already a library or plugin which can interpolate polygons in this way?


texts: I have a OpenLayers 4 map with a vector layer. Sometimes it turns into white while still having the zoom in and zoom out buttons. What could be the reason?


texts: Arcpy code repetition provides slight differences in the outputs

texts:
I made a python script that uses arcpy to buffer some network areas, intersect them with another shapefile, and from this output make some calculations that are saved to an Excel spreadsheet.

I run this code two times, and then used Excel plug-in "Inquire" to compare the two spreadsheet, in order to verify the final results were actually the same. What I noticed is that, on a large amount of cells (13336 x 3), approximatelly 6000 are slightly different. For example, these are two my outputs from the spreadsheets:

78.08377792455002 and 78.083778014277357

As you can see, the error is remarkably small (approximatelly 1E-7%) but still, it seems weird to me to have these differences, also because I think other codes, e.g. Matlab, have a higher precision (if I am not wrong, Matlab precision is for relavite errors of 1E-11).

Where does this difference come from? Is it just a computational error or is it due to some mistakes of mine in the way I used ArcGIS or Python?


texts: Image Pyramid Geoserver Nullpointer Exception

texts:
Currently I am facing a problem with our WMS Service on Geoserver. The data source is a big Image Pyramid with 5 levels covering Germany in EPSG:25832. For tiles outside the boundaries of the dataset Geoserver throws nullpointer exceptions if we request with tileSize:

    Request: getMap
    Angle = 0.0
    BaseUrl = xxxxxx
    Bbox = SRSEnvelope[357454.39991498 : 359900.3848201, 6066402.775276 : 6068848.7601811]
    BgColor = java.awt.Color[r=255,g=255,b=255]
    Buffer = 0
    CQLFilter = null
    Crs = PROJCS["ETRS89 / UTM zone 32N",
  GEOGCS["ETRS89",
    DATUM["European Terrestrial Reference System 1989",
      SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]],
      TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      AUTHORITY["EPSG","6258"]],
    PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
    UNIT["degree", 0.017453292519943295],
    AXIS["Geodetic longitude", EAST],
    AXIS["Geodetic latitude", NORTH],
    AUTHORITY["EPSG","4258"]],
  PROJECTION["Transverse_Mercator", AUTHORITY["EPSG","9807"]],
  PARAMETER["central_meridian", 9.0],
  PARAMETER["latitude_of_origin", 0.0],
  PARAMETER["scale_factor", 0.9996],
  PARAMETER["false_easting", 500000.0],
  PARAMETER["false_northing", 0.0],
  UNIT["m", 1.0],
  AXIS["Easting", EAST],
  AXIS["Northing", NORTH],
  AUTHORITY["EPSG","25832"]]
    Elevation = []
    Env = {}
    Exceptions = SE_XML
    FeatureId = null
    FeatureVersion = null
    Filter = null
    Filters = null
    Format = image/png
    FormatOptions = {}
    Get = true
    Height = 256
    Interpolations = []
    Layers = [org.geoserver.wms.MapLayerInfo@9e825f08]
    MaxFeatures = null
    Palette = null
    RawKvp = {FORMAT=image/png, REQUEST=GetMap, SRS=EPSG:25832, BBOX=357454.39991498,6066402.775276,359900.3848201,6068848.7601811, VERSION=1.1.1, STYLES=, SERVICE=WMS, WIDTH=256, HEIGHT=256, TRANSPARENT=FALSE, LAYERS=xx:xx}
    RemoteOwsType = null
    RemoteOwsURL = null
    Request = GetMap
    RequestCharset = UTF-8
    ScaleMethod = null
    Sld = null
    SldBody = null
    SldVersion = null
    SortBy = null
    SortByArrays = null
    SRS = EPSG:25832
    StartIndex = null
    StyleBody = null
    StyleFormat = sld
    Styles = [StyleImpl[ name=raster]]
    StyleUrl = null
    StyleVersion = null
    Tiled = false
    TilesOrigin = null
    Time = []
    Transparent = false
    ValidateSchema = false
    Version = 1.1.1
    ViewParams = null
    Width = 256
2017-10-06 17:11:04,858 DEBUG [org.geoserver.wms.map] - Writing png image ...
2017-10-06 17:11:04,891 INFO [org.vfny.geoserver.servlets] - OutputStream was successfully aborted.
2017-10-06 17:11:04,891 ERROR [org.geoserver.ows] -
java.lang.NullPointerException
2017-10-06 17:11:04,891 DEBUG [org.geoserver.filters] - Compressing output for mimetype: application/vnd.ogc.se_xml;charset=UTF-8
2017-10-06 17:11:04,891 DEBUG [org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1] - SecurityContextHolder now cleared, as request processing completed

The error always occurs on the boundaries where the shape of the index is not exactly an rectangle:

With Open Layers the error looks like this:

I also found out, that two vendor parameters tiled and tilesOrigin have an impact on this error.

This request works:

?FORMAT=image%2Fpng&TRANSPARENT=FALSE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&LAYERS=d&SRS=EPSG%3A25832&BBOX=281628.86785608,6110430.5035682,359900.3848201,6188702.0205323&WIDTH=256&HEIGHT=256&tiled=true&tilesOrigin=280000%2C5200000

And this doesn’t:

?FORMAT=image%2Fpng&TRANSPARENT=FALSE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&LAYERS=d&SRS=EPSG%3A25832&BBOX=281628.86785608,6110430.5035682,359900.3848201,6188702.0205323&WIDTH=256&HEIGHT=256

So geoserver throws the exception because of the following missing parameters:
&tiled=true&tilesOrigin=280000%2C5200000

We are running a geoserver 2.11.1

So, anybody any idea what the problem could be?


texts: Mapshaper -proj resulting shapes in wrong Hemisphere

texts:
I have shapefiles that I am projecting in Mapshaper, however when I use -proj WGS84 the end-result (topoJSON) has the shapes in the Northern Hemisphere, rather than the Southern Hemisphere.
On inspecting the shapefiles using info it shows 'CRS: +proj=utm +zone=55 +datum=WGS84 which to me indicates the default is UTM55N, not 55S as I want it to be.
When I explicitly specify UTM55S using -proj from=EPSG:32755 crs=EPSG:4326 I get the correct end-result with the shapes in the Southern hemisphere.
The prj file contained within the shapefiles zip appears to specify 55S:
PROJCS["WGS_1984_UTM_Zone_55S",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",10000000.0],PARAMETER["Central_Meridian",147.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
Why can't I use -proj WGS84? Do I need to change the prj file or is the only solution to keep explicitly referring to the EPSG number for S (because perhaps it defaults to N?)


texts: What are these Google Maps glowing spots?

texts:
Can any help me by identifying these glowing spots on the google maps image below? Am I in danger(I live nearby)?
Google Maps Link


texts: Getting ValueError: max() arg is an empty sequence on a Python Script in the Field Calculator in ArcMap

texts:
I have a script that populates a FacilityID Field on a Attribute table in the Field Calculator but when I run the script below I am getting a error.

EDIT:
Python Script:

def autoInc():

import arcpy, os
nullvalues = ["", " ", None, 0]
fac_id_values = []
# Loop through and get Max value
fc= r"c:\GIS\Nambe_Data\nambedatabase\Nambe_ExistingInfrastructureSurvey_v1x0.gdb\CommunicationInfrastructure\cTelcomLine"
with arcpy.da.SearchCursor(fc, ['*']) as cur:
    for row in cur:
        row_dict = dict(zip(cur.fields,row))
        facilityid = row_dict['FacilityID']
        if facilityid not in nullvalues:
            print facilityid
            fac_id_values.append(facilityid)
max_value = max(fac_id_values)
print max_value

# Loop through and Calculate new values
cur = arcpy.UpdateCursor("Telecommunications Line")
for row in cur:
    max_value = max_value + 1
    if row.FACILITYID in nullvalues:
        row.FACILITYID = "COMLI1" + str(format(max_value,'04d'))
        cur.updateRow(row)

Error I am getting is :

Messages
Executing: CalculateField "Communication\Telecommunications Line" FacilityID autoIncrement() PYTHON_9.3 "import arcpy\nnullvalues = ["", " ", None, 0]\n# Loop through and get Max value\ncur = arcpy.SearchCursor("Telecommunications Line")\nfac_id_values =     [int(row.FACILITYID[-4:]) for row in cur if row.FACILITYID not in nullvalues]\n\nmax_value = max(fac_id_values)\n\n# Loop through and Calculate new values\ncur = arcpy.UpdateCursor("Telecommunications Line")\nfor row in cur:\n    max_value = max_value + 1\n    if row.FACILITYID in nullvalues:\n        row.FACILITYID = "COMLI1" + str(format(max_value,'04d'))\n        cur.updateRow(row)"
Start Time: Thu May 15 09:00:06 2014
ERROR 000539: Runtime error
Traceback (most recent call last):
File "<string>", line 7, in <module>
ValueError: max() arg is an empty sequence

Failed to execute (CalculateField).
Failed at Thu May 15 09:00:06 2014 (Elapsed Time: 0.13 seconds)

For this Line: max_value = max(fac_id_values)

EDIT:
New Error:
Messages

Executing: CalculateField "Communication\Telecommunications Line" FacilityID autoInc() PYTHON_9.3 "def autoInc():\n\nimport arcpy, os\nnullvalues = ["", " ", None, 0]\nfac_id_values = []\n# Loop through and get Max value\nfc= r"c:\GIS\Nambe_Data\nambedatabase\Nambe_ExistingInfrastructureSurvey_v1x0.gdb\CommunicationInfrastructure\cTelcomLine"\nwith arcpy.da.SearchCursor(fc, ['*']) as cur:\n    for row in cur:\n        row_dict = dict(zip(cur.fields,row))\n        facilityid = row_dict['FacilityID']\n        if facilityid not in nullvalues:\n            print facilityid\n            fac_id_values.append(facilityid)\nmax_value = max(fac_id_values)\nprint max_value\n\n# Loop through and Calculate new values\ncur = arcpy.UpdateCursor("Telecommunications Line")\nfor row in cur:\n    max_value = max_value + 1\n    if row.FACILITYID in nullvalues:\n        row.FACILITYID = "COMLI1" + str(format(max_value,'04d'))\n        cur.updateRow(row)"
Start Time: Thu May 15 13:38:07 2014
Failed to execute. Parameters are not valid.
ERROR 000989: Python syntax error: Parsing error IndentationError: expected an indented     block (line 3)
Failed to execute (CalculateField).
Failed at Thu May 15 13:38:07 2014 (Elapsed Time: 0.00 seconds)


texts: How do you build a MongoDB spatial index for GeoJSON geometry?

texts:
I'm attempting to build a spatial index on a collection of features that I created from:

ogr2ogr -f GeoJSON out.json ... and then imported into MongoDB (2.6.1).

When I attempt to build a spatial index({"features" : "2d"}),
I receive this error:

Error creating index
WriteConcern detected an error 'geo values must be 'legacy coordinate pairs' for 2d indexes

The MongoDB glossary has this for legacy coordinate pairs:

  The format used for geospatial data prior to MongoDB version 2.4. This format stores geospatial data as points on a planar coordinate system (e.g. [ x, y ]).

I don't see how the GeoJSON doesn't meet this spec, since the coordinate pairs are also [x,y].  Is there something else in the legacy coordinate that a Mongo spatial index is expecting?  And if that is the case, does this mean that you can't build a spatial index directly against GeoJSON (meaning that the geometry JSON has to be modified in some way to make it ingestible by MongoDB).

Ref:
What is difference between GeoJSON & Legacy coordinate pairs in terms of mongoDb?


texts: Counting overlapping stacked polygons or in a cumulative way

texts:
Input:

I have many many small simples polygons representing some "field of view" from points.
Lots of them overlap one or many others.

Goal:

I would like to give "some kind of" "weight" attribute to each polygon based on "how many others do they see in their area".

Desired operations:

in the world of rasters:
It's a bit fuzzy said like that but I think the easiest operation would be to rasterize them and then sum up, for each pixel of the raster, how many "observers" do see them.
In other words, how many polygons have contributed to each pixel.
This would lead to a basic heatmap with a Z-value as "contributing polygons count" for each pixel.
(Precision: I do not use any DEM and viewshed analysis for that but the idea is the same over a plane, where the viewed area is defined by the polygons themselves).

Up to this point it is OK, but then, how to get back to the vector world of the initial polygons in order to attribute each polygon a "weight"?
I can sum the values up. Simply.
But is there any algorithm already defined therefor and how to perform this operation?

Extra:
for each rasterized polygon, it would be nice if pixels values were not just simply set to 1 (seen) or 0 (not seen) but rather to float values between ]0-1] (0 would still be used for: "not seen" and only that) with a weight applied as a function of the distance to the observer.

in the world of vectors:
An other (simpler) way to achieve this (a little differently but maybe more efficiently) is to stay in the world of vectors by simply attributing to each polygon:
1. "what is the maximum number of overlapped (stacked) polygons within the considered polygon" (it may be 10 other polygons intersecting the query polygon but with no overlap between them, thus this number would still be 1, if two of them overlap (and not the 8 other) within the query polygon area, then it would be 2, if all 10 overlaps themselves on the query polygons, it would be 10), or:
2. the cumulative number of other polygons overlaps (10 simples overlaps would give 10, even if some polygons overlap others on the query polygon) or:
3. a mix from the two previous points: the cumulative way + the stacked way, e.g. if 10 polygons overlap the query polygon and if two of them overlaps themselves within the query polygon, then it would be 10+2=12 (or 10+1=11 depending on how important stacking is)

Simple image examples to better clarify the request:

Legend: 10 simple overlaps. With method 1 the result would be 1.
With methods 2 and 3 it would be 10.

Legend: 8 simple overlaps + 1 "level 2" overlap. With method 1 the result would be 2.
With method 2 it would be 10 and with method 3 it would be 10+1=11 (or 10+2=12, as if the deeper blue area top-left on the query polygon would count as 2 instead of 1).

Is there an existing function to retrieve this number for each of the 3 methods described here above for a given query polygon (in red in examples) and store this value as an attribute for this query polygon?

Working environment:

It is Python2.7 on a Linux based system which is the candidate for this task.
Working with a postgreSQL database.
Computational efficiency should not suffer too much, is possible.


texts: Automate snapping GeoJSON data on OpenStreetMap with their road XML file?

texts:
I currently have Route data in GTFS that I converted to GeoJSON format and stored in MongoDB. However, even the GTFS provided have still some shapefiles missing therefore a lot are still hovering over blocks and not on the road.

So I figured out that I could at least automate these lines to snap on the road from the provided XML file from OpenStreetMap. Can this be done in Python or JavaScript?

Of course not every on load, it would be nice that on my first and only run on that code it would also update the linestring in the database already. Would this be possible?

*possible problem I am anticipating would be the route's direction.


texts: How to extract values from rasters at location of points in R?

texts:
My question is about extracting values from rasters at the location of points. With the function extract this is very easy, and the function gives me a dataframe with the values of all the variables in the points. I want to have in that dataframe the coordinates of each point. How can I make that happen? Is it possible to say to R that when extracting the values from the raster also add the columns of the location point.

This is my procedure:

presencias=read.table("c:/SDM_R/presencias/P_lentiscus_pres.csv",header=TRUE,sep=";")

lista_variables <-list.files(path="Variables_modelizacion/solo_ascii",pattern='*.asc',full.names=TRUE)
variables <- stack(lista_variables)

variables_presencia<-extract(variables, presencias)

the results are something like these:

> bio1  bio12  bio18  bio2  bio4
> 90    875    165    95    4886
> 115   1085   158    83    4075
> 135   1153   153    67    3402
> 85    1026   137    99    5203
> 96    667    128    108   5823
> 98    531    109    113   6305
> 132   450    63     123   6598
> 132   569    104    106   5963
> 95    814    196    98    5571
> 146   474    39     114   6603

But I want two more columns with the coordinate data (but could be others columns from my csv extracting location table).

Thank so much.


texts: Rendering KML file on QGIS with original resolution?

texts:
I am trying to upload to QGIS a KML raster file that was previously generated with Google Earth Pro. It uploads, yes, but with low resolution.

How can I make QGIS render such files with the original resolution?


texts: I am attempting to trim a previously recorded .kmz line. What I would like to do is remove a few ending vertices that extend beyond the actual end of a hiking trail as well as remove multi-path lines from walking and recording the same small track twice. Is any of this possible or is is impossible to edit these types of files?


texts: Scene layer package (.slpk) and Portal for ArcGIS

texts:
I have recently installed and federated an ArcGIS Server and a Portal (10.6.1). I am using the server as a hosting one as I have installed and configured the ArcGIS Datastore (Tile cache and Managed) altogether with a registered enterprise database. Everything seems to work nicely when publishing different map image/elevation/feature/tile cache layers. However, when I am trying to publish a .slpk, the process fails and I get the following error messages on both the server and the portal logs:

"Failed to create couchdb database. Client tried to access password-protected page without proper authorization. (status code 401). Failed to execute (Publish Portal Service)."

I have done different tests, publishing both from ArcGIS Pro and the Portal, with "Add item from my computer" and I get the same errors.

The solutions that I have already tried are the following:

|FIXED| CityEngine SLPK and Portal for ArcGIS

Error: ERROR 001785: Unable to connect to the database used for scene caches (Unidentified Error)

Error: ERROR 001784: Unable to connect to the database used for scene caches (unauthorized)

None of them worked in my case.


texts:
I am currently dealing with a dataset which consists of about 2700 points stochastically placed in a study area of about 650,000 sqKm. I am trying to create a distance raster for these points, which I have been able to do using Euclidean Distance tool, but I would like this distance raster to also be affected by the class of point being evaluated. For example the points range in value from 6 to 10. Therefore I would like the raster to be affected by these values. So for points with a high value I would like the distance value to be lower as to positively affect a Cost raster and eventual least cost pathway.

I know that this is a little vague, I apologize it is because I do not know what this concept would be called. Any insight would be extremely helpful.


texts:
I have troubles using PyQgis processing module with QGIS 3.8. For example, I can reproject a layer with QGIS graphic interface, but when using PyQgis processing module through the following script :

    import sys
    from qgis.core import *

    QgsApplication.setPrefixPath("/usr", True)
    qgs = QgsApplication([], True)
    qgs.initQgis()
    print(QgsApplication.showSettings())

    ##Processing initialization
    sys.path.extend(['/usr/share/qgis/python/plugins', '/usr/share/qgis/python/plugins/processing',
                     '/usr/share/qgis/python', '/usr/lib/qgis/plugins'])  # Folder for Processing
    import processing
    from processing.core.Processing import Processing
    Processing.initialize()  # needed to be able to use the functions afterwards

    ##Get and load the project instance
    project = QgsProject.instance()
    project.setCrs(QgsCoordinateReferenceSystem(2154))

    ## Chargement d'une couche
    vlayer = QgsVectorLayer('/my/place/to/save/zone_etude.shp','zone_etude','ogr')
    project.addMapLayer(vlayer)

    param = {'INPUT':'/my/place/to/save/zone_etude.shp',
             'TARGET_CRS':QgsCoordinateReferenceSystem('EPSG:4326'),
             'OUTPUT':'TEMPORARY_OUTPUT'}
    processing.run("native:reprojectlayer", param)

    project.write('/my/place/to/save/tutoproject.qgs')
    qgs.exitQgis()

This code returns  :

Application state:
QGIS_PREFIX_PATH env var:
Prefix:     /usr
Plugin Path:        /usr/lib/qgis/plugins
Package Data Path:  /usr/share/qgis
Active Theme Name:
Active Theme Path:  /usr/share/qgis/resources/themes//icons/
Default Theme Path: :/images/themes/default/
SVG Search Paths:   /usr/share/qgis/svg/
        /home/edelb/.local/share/profiles/default/svg/
User DB Path:   /usr/share/qgis/resources/qgis.db
Auth DB Path:   /home/edelb/.local/share/profiles/default/qgis-auth.db

Backend TkAgg is interactive backend. Turning interactive mode on.
/usr/lib/python3/dist-packages/osgeo/gdal.py:112: DeprecationWarning:
gdal.py was placed in a namespace, it is now available as osgeo.gdal

Traceback (most recent call last):
  File "/my/place/to/save/repro_bug.py", line 26, in <module>
    processing.run("native:reprojectlayer", param)
  File "/usr/share/qgis/python/plugins/processing/tools/general.py", line 106, in run
    return Processing.runAlgorithm(algOrName, parameters, onFinish, feedback, context)
  File "/usr/share/qgis/python/plugins/processing/core/Processing.py", line 125, in runAlgorithm
    raise QgsProcessingException(msg)
_core.QgsProcessingException: Error: Algorithm native:reprojectlayer not found

I am on Ubuntu 18.04, using Qgis 3.8, and I don't know how I can access several of these processing algorithms like "native:reprojectlayer" or "native:saveselectedfeatures"...
Still, some processing algorithms are reachable, as this command shows:

for alg in QgsApplication.processingRegistry().algorithms():
    print("{}:{} --> {}".format(alg.provider().name(), alg.name(), alg.displayName()))

GDAL:aspect --> Aspect
GDAL:assignprojection --> Assign projection
...
GRASS:r.spreadpath --> r.spreadpath
...
QGIS:vectorlayerscatterplot --> Vector layer scatterplot
QGIS:voronoipolygons --> Voronoi polygons
QGIS:zonalstatistics --> Zonal statistics

And for example processing.algorithmHelp("qgis:voronoipolygons") returns what it is supposed to return.


texts: Choosing Python 3 libraries for GIS analysis?

texts:
I am trying to do some spatial data analysis in Python 3 now, and I was wondering what the best libraries are for GIS in Python 3. The Fiona library was developed with Python 3.3 but the Python 3+ version of Shapely is still in development. Other libraries have been ported over to Python 3 but I am not sure if they have been thoroughly tested and validated compared to their Python 2 counterparts.

The basic functionalities that I need are as follows.

Mapping Shapefiles or GeoJSON
Associating polygons with points and lines
Mapping vector data as well as raster data

Can you provide some suggestions?


texts: Is the Random Trees Classifier in ArcMap 10.5 equal to Random Forest?

texts:
Is the Random Trees Classifier in ArcMap 10.5 the same as what is named Random Forest in other applications/software?
I see that the parameters are the same and the design seems the same, but I need a verification of which algorithm is behind the classifier before I can implement it in my research.

If this is the case, how do I acquire the metadata from each classification task run in ArcMap? I am specifically thinking of the out-of-bag (OOB) error and the variable importance (VI) estimates.


texts: OpenLayers: png as external graphic marker

texts:
I would like to style my point features. For some markers I use the convenient OpenLayers.StyleMap options, for few of them I would like to use an external png graphic (the camouflage circle). I use a linux system and the firefox browser. The code runs pretty if I leave out the external graphic. If I add the graphic the feature disappears. Is there something specific I have to consider? Any help is welcome.

This graphic has the size of 14.2 KiB and was edited with the Vector Graphics Editor.
My code so far is:

var styleMap = new OpenLayers.StyleMap({
            "default": new OpenLayers.Style({
                graphicName: "cross",
                pointRadius: "5", // sized according to type attribute
                fillColor: '#FF8000',
                fillOpacity: "50 ",  //o.8 original
                strokeOpacity: "60", //1 original
                strokeWidth: "1",
                },
                { // apply a rule in order to display a name next to the station point in legend
                rules : [
                        new OpenLayers.Rule({
                        name: "Stations", // this is what is displayed on legend panel
                        elseFilter: true,
                        symbolizer: {
                            graphicName: "cross",
                            pointRadius: "5",
                            fillColor: "#FF8000",
                            strokeOpacity: "60",
                            strokeWidth: "1",
                            }
                        }),
                        new OpenLayers.Rule({
                            name: "Climate, Soil & Water Quality",
                            filter: new OpenLayers.Filter.Comparison({
                                        type: OpenLayers.Filter.Comparison.LIKE,
                                        property: "name",
                                        value: "Zarnekow",
                                    }),
                                    symbolizer: {
                                                externalGraphic: "../img/point_camouflage1.png",// graphicName: "circle",
                                                graphicWidth: 32,
                                                graphicHeight: 32,
                                                graphicOpacity:1,//pointRadius: "5",
                                                //fillColor: "#F27807",
                                                //strokeOpacity: "60",
                                                //strokeWidth: "1",
                                    }
                            })
                          ]
                       })
                });


texts: Why does the Contour Plugin failt to load in QGIS Valmiera?

texts:
Whenever i try to load the contour plugin. I get the error as follows:
The same happens to when i try to load Qgis2leaf plugin...

An error has occured while executing Python code:

Traceback (most recent call last):
  File "C:/Users/Lenovo/.qgis2/python/plugins\contour\contour.py", line 112, in run
    dlg = ContourDialog(self._iface)
  File "C:/Users/Lenovo/.qgis2/python/plugins\contour\contour.py", line 151, in __init__
    self.setupUi(self)
  File "C:/Users/Lenovo/.qgis2/python/plugins\contour\frmContour.py", line 80, in setupUi
    self.uDataField = gui.QgsFieldExpressionWidget(self.groupBox_2)
AttributeError: 'module' object has no attribute 'QgsFieldExpressionWidget'

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version:
2.2.0-Valmiera Valmiera, c3a2817

Python path: ['C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins\\processing', 'C:/PROGRA~1/QGISVA~1/apps/qgis/./python', u'C:/Users/Lenovo/.qgis2/python', u'C:/Users/Lenovo/.qgis2/python/plugins', 'C:/PROGRA~1/QGISVA~1/apps/qgis/./python/plugins', 'C:\\PROGRA~1\\QGISVA~1\\bin\\python27.zip', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\DLLs', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\plat-win', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\lib-tk', 'C:\\PROGRA~1\\QGISVA~1\\bin', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\PIL', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\win32', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\Pythonwin', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\six-1.3.0-py2.7.egg', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\wx-2.8-msw-unicode', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\xlrd-0.9.2-py2.7.egg', 'C:\\PROGRA~1\\QGISVA~1\\apps\\Python27\\lib\\site-packages\\xlwt-0.7.5-py2.7.egg', 'C:\\Users\\Lenovo\\.qgis2\\python\\plugins\\mmqgis/forms', 'C:\\PROGRA~1\\QGISVA~1\\apps\\qgis\\python\\plugins\\fTools\\tools', 'D:/Works at ICIMOD/QGIS Tutorials']


texts:
I am trying to make a code to read and retrieve geographical and raster data from a GeoTIFF file, but I'm having a hard time with the extended tags.
I have no problem with the regular TIFF tags (like IMAGEWIDTH, using tiffgetfield()) or the geokeys (like ProjectedCSTypeGeoKey, using GTIFKeyGet() or taking it from the definition struct), but what's giving me problem are the extended tags provided by geotiff library.

I can see the information I need (pixel scale and tie point tags) using GTIFPrint(), but I don't know how to access the metadata file, and haven't been able to get the data I want using TIFFGetField() since I can't call the function properly.

This is how I was calling TIFFGetField

double* pixscl;
int* pixscalesize;

TIFFGetField(tif, GTIFF_TIEPOINTS, &pixscalesize);
printf("Model Pixel Scale Tag is:\n      %d\n", pixscalesize);

What I'm getting here is the number of elements in the tag, which is 3 for pixel scale, and 6 for tie point, but still have no access to the actual values.

Any ideas on how I can store the values of these tags to print or use in another function?

PS: I am using only libgeotiff, GDAL is out of discussion because all of its components, and I'm aiming to a light weight and simple application.


texts: Feature Points Shapefile missing Spatial Reference Information

texts:
I'm working with ArcMap 10 and I have a feature points shapefile from the Florence (Italy) municipality open data (http://opendata.comune.fi.it/statistica_territorio/dataset_0040.html). Each point is an address point.

As I add it to the data frame a message says the data is missing spatial reference information and the points result in a wrong location. How can I understand which is the correct spatial reference of this shapefile and have the points in the correct location? I own other features of the same area with the correct coordinates (eg a layer with the streets of Florence). Coordinates system of these features is GCS_WGS_1984 Would that be of any use?

I followed these steps http://www.esri.com/news/arcwatch/0111/tip.html but couldn't get it working. I hope I didn't miss any older post posing this question. In case I did I apologize.


texts: What symbology to use to show population development?

texts:
In ArcMap I have made a layer containing two cities and the number of population from 1968-2014. I need help with what symbology to use to show the population development for each city. I have tried various quantities and charts but none shows the development i.e. a graph or something.

Any tips in how to show the development trend clearly?


texts: Why Global Mapper's georeferencer misplaces controlpoint?

texts:
I am sometimes met with the problem that Global Mapper (v17.0) georeferencer misplaces controlpoints I am trying to use, but adding and then deleting the controlpoint solved the issue. However currently I can not overcome this problem as it's now alaways does this:

Does anybody know a solution to this or what is the cause of it?


texts: Suppress same label from different features QGis

texts:
Is there a way to suppress same labels from different features other than merging the features or manually deleting the labels?

As you can see in the image below, I have multiple lines with the same label. I tried to create a buffer around the labels in order to reduce the amount of labels, but this messes up the labels of other features.

For instance: Is it possible to create a buffer for a certain string?
So, that there is only one "B14" allowed in a certain radius.


texts: How to number my GPS points sequentially?

texts:
I want to number my GPS points from the first point to the final point,

the first point is 1,

second point is 2....

is there any plugin or toolbox I can use?

I used the plugin (sort and number),but show nothing


texts:
I am new to FME but used to ArcGIS ModelBuilder.

I am trying to figure out how to select rows based on an attribute and then change the values in the selected rows by a simple formula in FME.

The ModelBuilder model  is

and code exported from it is

# Process: Select Layer By Attribute
arcpy.SelectLayerByAttribute_management(Properties_shp__2_, "NEW_SELECTION", "\"Property_A\" = ' '")

# Process: Calculate Field
arcpy.CalculateField_management(Properties_shp__3_, "Property_A", "[Property_N]", "VB", "")

This should be the first step in my FMW that then processes it


texts: How to convert field values from lower case to upper case in ArcGIS 10.1?

texts:
Using the Field Calculator in ArcGIS 10.1, I am able convert the first letter in a value from lower case to upper case. How do you convert the entire value to upper case, though?  I can't seem to locate a VBScript for it.

For example, I want to convert small to SMALL.


texts: Load GeoJSON polygon time series with Leaflet Time Dimension plug-in?

texts:
I have a GeoJSON file with time series data, representing repeating polygons with varying data. I have managed to display the data for one time interval (a subset of the data representing one interval) using Leaflet but have so far failed to animate the data using the Leaflet Timedimension plugin (I tried with a subset representing 2 intervals). My data is repeating every one hour, the geometry is the same while the attribute value is changing every hour. I keep getting "Time not available" on the plugin control.

My data has an attribute field called time and the date is in this format:

  "time": "2006-03-11 09:00:00"

This is one feature from the GeoJSON data:

  { "type": "Feature", "id": -1549271008, "properties": { "id": 827793, "time": "2006-03-11 08:00:00", "insol": 61.73542 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 39.151222675648221, 34.199670805202523 ], [ 39.151222675712766, 34.199675276071595 ], [ 39.151228272367668, 34.199675276015682 ], [ 39.151228272302838, 34.199670805146624 ], [ 39.151222675648221, 34.199670805202523 ] ] ] } }

I have loaded the relevant js libraries for TimeDimension to work (plus the CSS):

<script type="text/javascript" src="https://cdn.rawgit.com/nezasa/iso8601-js-period/master/iso8601.min.js"></script>
<script type="text/javascript" src="https://cdn.rawgit.com/socib/Leaflet.TimeDimension/master/dist/leaflet.timedimension.min.js"></script>

The JavaScript code is at JSFiddle

I'm not sure if the time format is wrong or if I simply have the wrong code for loading the data using the TimeDimension plugin. I have looked through the examples and elsewhere but didn't see something that resembles my case.

So what is the correct way to load a GeoJSON polygon dataset with hourly interval repeating geometry using the Leaflet TimeDimension plugin?


texts:
So my trimble TSC1 Pro XRS (bought in 2000) is getting old I guess and it change byitself the date. I collected data this week, but it indicate from 1998.

I view this info because I can't apply diferential correction. Indeed, the post process file from 1998 aren't avaible anymore.

So I want to change the change the date of the record in *.ssf files.

I tried two different ways :
- The office pathinder (4.0) SSF record editor. It doesn't allow to edit the date.

I copy and paste all the record from the *.ssf files in notepad ++, then change the date, then change the files extention in *.ssf. But when I open this files in office pathinder, it doesn't open it correctly.

I'm still looking for any option.


texts: How to get GeoServer WMS with base map as OpenStreet map?

texts:
I am using the latest version of GeoServer (2.16.2). I am able to fetch the WMS of my layer using the following code,

For now, the img tag producing the image without osm layer. I need to add osm layer as baselayer and display through img tag. The above code will produce the map like following,

But I want to display this map with OSM base layer like below map,

I know I can overlay it with osm in leaflet map view (not in  tag), by using following code,

//load admin layer data form geoserver
const mywms = L.tileLayer.betterWms(
  "http://localhost/geoserver/tajikistan/wms",
  {
    layers: "country:layer",
    format: "image/png",
    transparent: true,
    version: "1.1.0",
    attribution: "country layer"
  }
).addTo(map);

How can I add the osm base layer in my WMS URL?


texts: Best way to extract properties from spatial join?

texts:
I applied a spatial join to two feature collections and am trying to extract specific properties from one in order to append them to another.

In order to retrieve a property from one of the features, I had to go through a convoluted process that I'm not sure I will be able to map accurately (see second block). Is there a better way to do this?

I followed this link closely.
For clarity, what I hope for is to add the HUC ID to the myPoints featureCollection as another property in the following code:

var HUC = ee.FeatureCollection("USGS/WBD/2017/HUC10");
var myPoints = ee.FeatureCollection("users/seancliffcarter/fishPrecenseNoNA");

//Define a filter where the points intersect the HUC
var distFilter = ee.Filter.intersects({
  leftField: '.geo',
  rightField: '.geo',
  maxError: 10
});

//Save the HUC object as a property named 'HUC'
var distSaveAll = ee.Join.saveAll({
  matchesKey: 'HUC',
});

//Apply the join
var spatialJoined = distSaveAll.apply(myPoints,HUC,distFilter);

This works great, except that each feature within spatialJoined now contains a HUC object as a property, but I'd like to extract the ID (or something similar) from each.

A basic sanity check starts to break down:

//Select an arbitrary feature to troubleshoot
var testFeature = spatialJoined.first();

//Select the HUC property within the feature
var testHUC = ee.Feature(testFeature.get('HUC'));

//This is where I'm struggling. Is testHUC a feature or a list? I casted it to a Feature, correct?

//Implies that testHUC is a "list" object:
print(testHUC,"Test HUC");

//Implies that testHUC is a "feature":
print(testHUC.name())

//If testHUC is a "feature", I should be able to use .get():

var testHUCName = testHUC.get('name');

//Gives Invalid type error

//Assuming it is a list, I can use the following code to extract a property.
//First cast to list:
var featureList = ee.List(testFeature)

//Then retrieve first element and recast to a feature?:
var firstElement = ee.Feature(featureList.get(0))

//Finally get the ID property:

var hucID = firstElement.get('ID');

Thanks in advance for the help! And please let me know if I can reformat the question to make it more readable.


texts: Tile error Google Earth Engine ; Image 0 does not have a system: time_start property

texts:
[![I am getting this error in my code,I want to analyse time series, Any suggestions how to deal with it?][1]][1][! [][1]][1]

[1]: here is the code link
https://code.earthengine.google.com/f81d964229bff9f264c18e17cb0a98ff

here is the asset file
https://code.earthengine.google.com/?asset=users/atupelye/Rungwa_dissolved


texts: Add point to shapefile / "IndexError: tuple index out of range"

texts:
I'm trying to add to a shapefile a point that is a (x-y) distance away from another point (city). None of the cities in the shapefile have x-y coordinates in the attribute table; I've added them for the latter city alone. To obtain them with the searchCursor I'm using the following code:

import arcpy

featureclass = "C:\temp\CITIES.shp"
fields = ["CITY_FIPS","CITY_NAME","x","y"]

with arcpy.da.SearchCursor(featureclass,fields) as cursor:
    for row in cursor:
        if row[0] == "17800":
        print ('{1}'.format(row[1]))

Which yields the "IndexError: tuple index out of range" for the last line. Am I not referencing "CITY_NAME" with row[1]?

After resolving that, how could I go about adding a new city (point) to the shapefile (using insertCursor)?


texts: QGIS Count lines in polygon ( to be part of a graphical model )

texts:
My problem is very easy to understand but I can't find a solution.

I'm actually working on the spreading of a local optic fibre network. These fibres will be contained in plastic tubes buried in trenches. I need to know how many tubes we should bury in each trench.

In GIS words : I make a buffer from the polyline shapefile "trenches", and I need to know how many polylines from the "tubes" shapefile cross (all the lines starts and ends out of the buffers) this buffer, then create a new shapefile with a column containing this count.

I though that there was a geoprocessing tool which could do it just like the "count points in polygon" geoprocessing tool. But it doesn't exist in QGIS Version 2.14.13.

So, I'm looking for a similar method that could be integrated in a graphical modeller, as a one-click operation (because I'll have to do it several times, and so will do my colleagues).


texts: Switching baselayers as user zooms in to map in OpenLayers?

texts:
I have a map which overlays Open Street Map data on imagery for Pennsylvania. As a baselayer to the roads (and eventually other layers) I have two baselayers - Blue Marble NG and USGS EROS 1ft imagery. I would like to be able to combine these two layers into a single base map object that switches automatically as the user zooms in since it makes no sense to view the 1ft imagery for the whole state or the Blue Marble imagery when you are zoomed in.

Ideally I'd like to do this on the client side as I'm pulling the imagery from two different sites.


texts:
public Int32 GetIndexNumberFromLayerName(String layerName)

        {
            IMxDocument doc = ArcMap.Application.Document as IMxDocument;
            IActiveView activeView = doc.ActiveView;

            if (activeView == null || layerName == null)
            {
                return -1;
            }
            IMap map = activeView.FocusMap;

            // Get the number of layers
            int numberOfLayers = map.LayerCount; //returns zero to me

            // Loop through the layers and get the correct layer index
            for (Int32 i = 0; i < numberOfLayers; i++)
            {
                if (layerName == map.get_Layer(i).Name)
                {
                    // Layer was found
                    return i;
                }
            }

            // No layer was found
            return -1;
        }

Why my code doesn't work? Number of layers is 6. Layer name is valid. ArcMap 10 and C#


texts: Determination of area in ASCII raster layer QGIS

texts: I have an ASCII grid file with different colored pixels (red, green, yellow and two intermediate yellow colors) and want to determine the total area covered by each [species distribution model result] category of colored pixel in QGIS. How should I Proceed?


texts:
As of 10.1, arcpy provides the rather handy MakeQueryLayer function. This allows us to use arcpy to create query layers programmatically instead of having to go through MXDs (as was the case in 10.0). This is extremely useful when working with a database that does not contain the SDE structure (formerly created via post-install and now created by Enable Enterprise Geodatabase, I believe) or where the tables you want to interact with have not been registered with SDE.

However, now I want to create a table instead of a feature layer/class, as in the query will not contain a shape column. How can I go about this?

What I've tried:

I considered MakeQueryTable, but this takes an existing layer or table as an input, rather than a query.

I also just tried to use MakeQueryLayer and got some... confusing results. conn below is a str that contains the file path of my database connection file.

>>> r = arcpy.MakeQueryLayer_management(conn, 'TEST', 'SELECT ID AS OBJECTID, MY_TABLE.* FROM MY_SCHEMA.MY_TABLE', oid_fields=['OBJECTID'])
>>> r.status
4
>>> r.outputCount
1
>>> r[0]
u'TEST'
>>> type(r[0])
<type 'unicode'>

The status code 4 corresponds to Succeeded, but the result object contains a Unicode string as its only output. So I'm not sure if it successfully created a layer or table and I just can't find it or what. Normally, MakeQueryLayer outputs an actual Layer object:

>>> r2 = arcpy.MakeQueryLayer_management(conn, 'TEST2', 'SELECT ID AS OBJECTID, MY_TABLE_WITH_SHAPE.* FROM MY_SCHEMA.MY_TABLE_WITH_SHAPE', oid_fields=['OBJECTID'])
>>> r2.outputCount
1
>>> r2[0]
<map layer u'TEST2'>
>>> type(r2[0])
<class 'arcpy._mapping.Layer'>

I tried to do some work with arcpy.mapping.ListLayers and arcpy.mapping.ListTableViews to see if I could find the output layer, but those require an input document (and I'm not using a document).

My back end database happens to be Oracle, but I imagine that shouldn't matter.


texts:
I have a MySQL database.I want to connect it with Carto.

When I got the backup-file on mysql database, Carto said unknown file type.


texts:
I dont't have any experience with the geographics databases so I hope that you be patiente with me, the thing is: I know that the datatype geography is used if all you care about is measuring distances and lengths and you have data from all over the world and the datatype geometry is used is best if you are pretty comfortable with spatial reference systems or you are dealing with localized data where all your data fits in a single spatial reference system (SRID), or you need to do a lot of spatial processing (that's what I read in chapter 3 of the documentation of postgis) and I saw on the link https://www.tutorialspoint.com/postgresql/postgresql_data_types.htm the following datatypes: point, line, lseg, box, path, path, polygon and circle. And then I saw the documentation again of the postgis on the section 4.1.3 SQL-MM Part 3 about the following types with the extension well-know text: circularString, compoundCurve, curvePolygon, multiCurve, multiSurface. What I don't understand is: what is the difference between these datatypes?

EDIT: And what is the relation between the datatypes that I saw in the section 4.1.3 and the datatypes that I saw in https://www.tutorialspoint.com/postgresql/postgresql_data_types.htm


texts:
I want to have a different color for my label when zooming out.
I've prepared an expression, which is not valid
 CASE
 if(@map_scale>1750, (color rgb 128,128,128))
 else
 "auxiliary_storage_labeling_color"
 end

There is a good example here:
Setting different colors based on value when labeling using QGIS
but applies to the certain data attribute table feature.
How to write a scale-based expression?
What have I done wrong in my case?


texts: QGIS "ERROR 6: No translation for Lambert_Conformal_Conic to PROJ.4 format is known."

texts:
I am trying to clip a county DEM file using the PLSS Section shape files as mask layers... that is, I want it clipped to sections so that I can load my DEM into QGIS one section at a time, without having to load the whole 4GB raster for any little project I want to work on.

I have tried to do this by going to Raster > Extraction > Clipper ... however it returns an error:

  ERROR 6: No translation for Lambert_Conformal_Conic to PROJ.4 format
  is known. ERROR 6: No translation for Lambert_Conformal_Conic to
  PROJ.4 format is known.

I have found a way to rasterize the shape files and use the raster calculator, however this is more of a pain and I want to understand why this is not working for me.

I assume it has something to do with the fact that I'm using a custom CRS for my county? CRS databases don't recognize it.

  +proj=lcc +lat_1=43.57503293972223 +lat_0=43.57503293972223 +lon_0=-90.78333333333333 +k_0=1.0000408158 +x_0=222504.44500889 +y_0=47532.0603505207 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs

Running QGIS 2.0.1 on Macbook Air using Mavericks 10.9

I ran gdalsrsinfo on the raster file and the command line returned the same error, plus the WKT:

ERROR 6: No translation for Lambert_Conformal_Conic to PROJ.4 format is known.
PROJ.4 : ''

OGC WKT :
PROJCS["NAD_1983_HARN_WISCRS_Vernon_County_Feet",
    GEOGCS["GCS_North_American_1983_HARN",
        DATUM["D_North_American_1983_HARN",
            SPHEROID["GRS_1980",6378137.0,298.257222101]],
        PRIMEM["Greenwich",0.0],
        UNIT["Degree",0.017453292519943295]],
    PROJECTION["Lambert_Conformal_Conic"],
    PARAMETER["False_Easting",730000.0],
    PARAMETER["False_Northing",155944.768],
    PARAMETER["Central_Meridian",-90.78333333333333],
    PARAMETER["Standard_Parallel_1",43.57503293972223],
    PARAMETER["Scale_Factor",1.0000408158],
    PARAMETER["Latitude_Of_Origin",43.57503293972223],
    UNIT["Foot_US",0.30480060960121924],
    VERTCS["NAVD_1988",
        VDATUM["North_American_Vertical_Datum_1988"],
        PARAMETER["Vertical_Shift",0.0],
        PARAMETER["Direction",1.0],
        UNIT["Foot_US",0.3048006096012192]]]


texts: I built a small Openlayers/GeoServer application. I'm trying to change the size of the LayerSwitcher icon "+" (right) and the one of the standard zoom icon (left). I tried to modify CSS but can't increase theirs sizes in order that they could be used easily when displayed on the screen of a mobile phone where they are very small.


texts:
I'm trying to add the ppa:ubuntugis/ubuntugis-unstable repository to my ubuntu.
I type:

sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable

And I'm getting:

Cannot add PPA: 'ppa/ubuntugis/ubuntugis-unstable'.
Please check that the PPA name or format is correct.

I can ping ppa.lauchpad.net and apt is working (just did an upgrade). Can anyone spot what is wrong?


texts: Can a custom command be placed in attribute table window toolbar in ArcMap?

texts: Is it possible to place custom command on ArcMap's attribute table window toolbar? As far as I understand I need GUID or ProgID of this toolbar in order to find appropriate ICommandItem with ICommandBars.Find method. But I cannot find this ID.


texts: Combining fields from different related tables to configure an ArcGIS Field Maps Form

texts:
I am trying to create forms for field data collection in ArcGIS Field Maps. I have four different related tables which are related to four different feature layers.
I would like to create one form that allows for users to collect data related to all four tables, instead of creating 4 separate forms for each related table. Does anyone know if this is possible in ArcGIS Field Maps? Is there a potential workaround using ArcGIS Collector?


texts: split multi-band raster to separate rasters in ERDAS IMAGINE

texts: I am currently using ERDAS IMAGINE 2013. I have a 28 Band MODIS image. Is there any way in IMAGINE I could split the 28 bands of the MODIS image into single band images?


texts: Mongodb data store parameter on Opengeo Suite 4.1.1

texts:
I'm using Opengeo Suite 4.1.1 with built in Mongodb data store plugin on Ubuntu 12.04 LTS and Windows 8.0. Geoserver 2.5 snapshot and Mongodb 2.6 versions are used here.

I was about to try Mapping #WorldCup with OpenGeo Suite and MongoDB by using my own spatial data, but when I create new data store there was an error message as its shown below. I also don't set any user or password on Mongodb before.

I can't figure out what is the problem and how to solve it.

Any ideas?


texts:
CAD file does not appear in ArcMap while in Autocad it is showing and working correctly.
Even the attribute table is empty.
What could be the reason?


texts: Importing shapefile into AutoCAD Map 3D?

texts:
I'm trying to import shapefiles into a DWG using diferent layers names and during my web search I found this post. I know you did this 2 years ago but my problem is very similar and I wonder if you could help me.
Basically I've got a shapefiles of pipelines and I want to use the attribute name to sort the features into different CAD levels in teh same layer.
I tried the import and although soem people say that "you can set the import to use data field" I can't see any option to do it and I'm really struggling. Any help appreciated.

I'm running on AutoCAD Map 3D 2010.


texts: Making polygons from lines (polyline to polygon) in QGIS?

texts:
I'm trying to remember how to do polygons from lines, I remember it was a very simple procedure. have a layer of lines intersecting or touching, use the tool and voila, qgis took the lines layer  and created a layer of polygons  with the spaces between the lines. very simple tool with Polygonize here http://confound.me.uk/maps/ppv4.pdf

However today I try, I can not get a good result. For this exercise I made a layer of lines with different shapes as you can see below.

A= it is a single line that does not close (in the table object id 0)

B= a square with lines in, that joined to form a single object (in table object id 1)

C= a triangle made of different lines that are touching, for this I used the snapping tool (in the table objects id 2,3,4)

This is the result of: vectorial-> Geometry Tools -> lines to polygon

As observed the tool close the object A to forms a good polygon (table object id 0), object B is formed with errors and under a single polygon (table object id 1) and the C object (the triangle) is completely ignored

This is the result of: processing-> vectorial geometry -> lines to polygons

As observed the tool close the object A to forms a good polygon (table object id 0), object B is formed with errors and under a single polygon (table object id 1) and the C object (the triangle) is completely ignored

This is the result of processing-> vectorial geometry -> poligonize

the poligonize tool gives a different result, only a general polygon shape without taking into account the interior lines of the B object and the table is filled with the area and perimeter of this.

As you can see the results are not what I expected, as I recall it was very easy to make and very good results were obtained and usually had to make small adjustments to the polygons.

and I read this answer from 2014:

Making polygon from intersecting lines in QGIS using Polygonize or similar?

with a very similar problem where the possibility that the tool is BROKEN , however I dont know if this will be the case or I doing something wrong with the tool

QGIS: 2.14.3
Installer: standalone QGIS-OSGeo4W-2.14.3-1-Setup-x86_64
OS: Windows 10 64bits (1115 10586.318)


texts: Filling in Null Data Gaps in Raster Image

texts:
I am looking to fill in small gaps of no data/null values in my raster image within ArcMap.

Are there any good techniques to approach this, while also not degrading the image in the process?


texts: How to filter a heatmap layer with QGIS Atlas?

texts:
I have a dataset with student route node collections from 20 different schools that I want to drive heatmap atlas pages with.

Can the heatmap layer in QGIS have a filter applied, either based on the atlas feature, or a spatial intersect?

I haven't seen anything in QGIS 2.18 or 3.0 that might allow this, but perhaps there is a method I haven't found?


texts: Gdal ogr2ogr update a PostGIS table without breaking views and relations

texts:
Context

I'm trying to update a PostgreSQL+PostGIS table from an ESRI Shapefile using the ogr2ogr too from gdal.
The Shapefile is being updated from external sources on a regular basis.
I don't want to append its content, I prefer starting again from scratch.

This is the command I run for the moment;

ogr2ogr -lco OVERWRITE=yes -nlt PROMOTE_TO_MULTI -nln vector_data.lines \
-f "PostgreSQL" PG:"host=localhost user=username dbname=my_database" \
-a_srs EPSG:4326 "${shapedir}/el_lines.shp"

Issues

1:

I get this warning message:

Warning 1: Layer creation options ignored since an existing layer is
         being appended to.

And the features are being append to the table, hence doubling the number of rows.

2:

If I add the -overwrite option, features (i.e. records in the table) are being successfully updated, as I expect, but the downside is I lose all the views and relations which have a link to the table I want to update. Needless to say I don't want to lose these views and relations.

Question

How to wisely use ogr2ogr so that it builds the table as if it's newly created (such as the really first time I ran ogr2ogr), but while keeping all relations to this table in the database?

Related questions

ogr2ogr update failing to update shapefile int PostGIS
ogr2ogr/python overwrite PostGIS table

Environment

PostgreSQL:

"PostgreSQL 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1) on x86_64-pc-linux-gnu, \
compiled by gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0, 64-bit"

PostGIS:

"2.4 USE_GEOS=1 USE_PROJ=1 USE_STATS=1"

Gdal:

$ ogr2ogr --version
GDAL 2.4.0, released 2018/12/14


texts: How to place multiple symbols on one polygon centroid?

texts:
I am using QGIS for visualizing the health conditions of elderly living in an old age home, some of the elderly have multiple medical device with them and I want to show them on the map.

Suppose I have one bed for each elderly, I have created a centroid for each bed using ftool, then I join this label with my csv table, and then use Style tab in the layer properties.

In the csv table, I have 4 columns named A, B, C, D and each represent the presence/absence of a medical device. Currently I am using rule-based in the Style tab and use Offset X,Y to fine tune the position of the dots so that they don't overlap with each other completely.

I don't like the Offset X,Y method, because if I need to change the position of those symbols, I need to do it manually one by one, and I have 30 elderly homes that I need to work on. Is there a better way?


texts:
Can anyone tell me how can I project a TILE cache/PNG raster image from WGS1984 coordinate system to a different coordinate system?

Is it even possible to project a TILE cache?

Ive tried the Project raster tool and It didnt work. Can someone help me?


texts: Get vertice information and apply to line segments using ArcGIS for Desktop (or QGIS)?

texts:
I've recently started tracking bike treks using Strava and I thought it would be interesting to do some analysis on my treks. I am able to import the GPX file into ArcMap and convert it to a point file, and then convert the point file to a line file.

However, when you do that, ArcMap creates a single-part line that has no attribute information. I can split the line into a multi-part line file using the Split Line at Vertices tool, but I am unsure of how to get information about the vertices (point file) for each line segment. The main statistic I want from the point file is the amount of time traversed on each segment. I have time data in the point field, but I am unsure how to get that information moved over to the line file.

I have ArcGIS 10.1 Advanced License as well as QGIS installed, and I am comfortable with ArcPy, ModelBuilder and the QGIS python libraries.

I've screenshotted some of my data below:


texts:
Does anyone know where I can find good contour layers for Oregon?

I do not have spatial analyst, so I can not make my own.


texts: Dissolving polygons on distance condition using PostGIS?

texts:
I'm tying to group some polygons in same layer, on geometry & attribute conditions: within 0.8m from each other and with same value in a column.

With answers I've found here I've got something like that:

SELECT ST_Dump(ST_Union(a.geom)).geom as newgeom
FROM foo a, foo b
WHERE ST_Intersects(ST_Buffer(a.geom,0.4),ST_Buffer(b.geom,0.4))
AND a.column = b.column
AND a.id != b.id
GROUP BY a.column

This is the closest I made to the result. However, the difference with all others answers here is that using ST_Dump in order to get singlepart geometries makes my distance condition totally useless, as all geometries will be split even if within 0.8m.

I'm not very experienced in SQL.


texts: Keeping features with 0 buffer width in output shapefile?

texts:
Using ArcGIS 10.3, I am working with a shapefile with millions of small polygons. I am using python to assign buffer widths to each polygon as an attribute. The buffer widths vary, and some polygons are assigned a buffer width of 0. This presents two issues when I use the buffer tool:

Polygons assigned a width of 0 receive Warning 000636, because the buffer tool assigns them a null geometry. The sheer volume of these warning messages results in a crash if using the python interpreter in ArcMap (useful for code demonstrations).
The polygons themselves are excluded from the final output.

I still need the excluded polygons in the buffer output. I would also prefer not to return a few thousand warnings. For now, my workaround is to assign a buffer width of 0.001 instead of 0. Can anyone give me a better workaround for this issue?

Note: I have found ArcGIS Buffer tool leaves out zero width buffers? that addresses this issue, but the answer does not provide the guidance I am looking for.


texts:
I work with 3 polygon layers (with the same CRS) from different data source each.

I try to merge those layers with MMQGIS plugin. The problem is that only 2 layers merged:

While i expected to get this result:

How can i solve this issue?


texts: regarding to manage and install plugins not access

texts: I am a new QGIS user and I am trying to add the qgis2leaflet plugins. I went into 'Manage and Install Plugins'. However, whenever I try to search for the plugin, it never shows up as on option. In the dialog box I wrote out 'qgis2leaflet' and no option show in plugin manager for uninstall and reinstall.


texts:
Running enterprise SDE on Sql Server 2008, ArcGIS 10.1, SP1. The issue is old locks on all feature classes within a specific feature dataset that aren't being released. When viewed with an admin connection through ArcCatalog, these locks were acquired over a year ago, and have no owner. View User comes up with nothing, and Disconnect User returns an error.

Any ideas on what could be causing these locks/why they are persisting in the seeming absence of a connection, and how to get rid of them?


texts: All of cell's values are "1" into stream network. Later, stream link seperates the segments using stream order tool. And, each stream segment has different grid codes. How do Stream Order discriminate the pixels of the same value "1"? If it considers the junction between links, how is it getting the value?


texts: Finding distance to nearest polygon of type A for every point type A using ArcGIS Desktop?

texts:
I should calculate the short distance between points and polygons of the same type.

I have more than 2000 points of 60 different types.
And shapefile with 60 polygons of the different species.

The Tool "Near" in ArcGIS Desktop, should work, but you cannot assign to the Input and Near Features "a common field", in order to automatically distinguish which type of polygon corresponds to each point type.

Is there any method in ArcGIS Desktop to deal with it?


texts: Creating polygon from list of coordinates: QgsGeometry.fromPolygon has unexpected type list

texts:
I do have a script that collects coordinates from map canvas clicks and stores them in a list called coordinates.

Now I want to create a feature, set its geometry and attributes and add the feature to the data provider. However, I do get the error saying "QgsGeometry.fromPolygon(unknown-type): argument 1 has unexpected type 'list'"

Here's my code:

from PyQt4.QtCore import *
from PyQt4.QtGui import QColor, QInputDialog, QLineEdit
from qgis.core import QGis, QgsMapLayerRegistry
from qgis.gui import QgsMapToolEmitPoint, QgsRubberBand, QgsMapTool

# Create new virtual layer
vlyr = QgsVectorLayer("Polygon", "temporary_polygons", "memory")
dprov = vlyr.dataProvider()

# Add field to virtual layer
dprov.addAttributes([QgsField("name", QVariant.String),
                     QgsField("size", QVariant.Double)])

vlyr.updateFields()

# Access MapTool
previousMapTool = iface.mapCanvas().mapTool()
myMapTool = QgsMapToolEmitPoint( iface.mapCanvas() )

# create empty list to store coordinates
coordinates = []

# Access ID
fields = dprov.fields()

def drawBand( currentPos, clickedButton ):
    iface.mapCanvas().xyCoordinates.connect( drawBand )

    if myRubberBand and myRubberBand.numberOfVertices():
        myRubberBand.removeLastPoint()
        myRubberBand.addPoint( currentPos )

def mouseClick( currentPos, clickedButton ):
    if clickedButton == Qt.LeftButton and len(coordinates) == 0:
        # create the polygon rubber band associated to the current canvas
        global myRubberBand
        myRubberBand = QgsRubberBand( iface.mapCanvas(), QGis.Polygon )
        # set rubber band style
        color = QColor(78, 97, 114)
        color.setAlpha(190)
        myRubberBand.setColor(color)
        #Draw rubberband
        myRubberBand.addPoint( QgsPoint(currentPos) )
        coordinates.extend(currentPos)
        print coordinates
    if clickedButton == Qt.LeftButton and len(coordinates) > 0:
        myRubberBand.addPoint( QgsPoint(currentPos) )
        coordinates.extend(currentPos)
        print coordinates

    if clickedButton == Qt.RightButton:

         # open input dialog
        (description, False) = QInputDialog.getText(iface. mainWindow(), "Description", "Description for Polygon at x and y", QLineEdit.Normal, 'My Polygon')

        #create feature and set geometry
        poly = QgsFeature()
        geomP = QgsGeometry.fromPolygon([coordinates])
        poly.setGeometry(geomP)

        #set attributes
        indexN = dprov.fieldNameIndex('name')
        indexA = dprov.fieldNameIndex('size')
        poly.setAttributes([QgsDistanceArea().measurePolygon(coordinates), indexA])
        poly.setAttributes([description, indexN])

        # add feature
        dprov.addFeatures([poly])
        vlyr.updateExtents()

        #add layer
        iface.mapCanvas().refresh()
        QgsMapLayerRegistry.instance().addMapLayers([vlyr])

        #delete list
        del coordinates[:]

myMapTool.canvasClicked.connect( mouseClick )
iface.mapCanvas().setMapTool( myMapTool )

My understanding from reading similar question is that QgsGeometry.fromPolygon() requires a QgsPolygon object and that I probably have to use geometry.asPolygon() in order to get one. However, I fail to do so. Could s.o. enlighten me please?


texts: How to edit symbol diameter related to the catchment area?

texts:
I have a table with column Catchment area (in km2), and I need to set symbol diameter based on that column. I need to get .sld file so I'm working with uDig but if you know better software for this, I will accept your advice.

EDIT:
I found out how to do it, but result is not acceptable because symbols are too big. There is no any normalization option in uDig or QGIS.

Thank you.