texts: Added lines to an existing feature class and geometric network are not included in a geometric network trace

texts:
I have a stream layer for a watershed.  These streams are topologically correct where each line's geometry stores the correct flow direction and each end connects to the start of the next downstream end.  I am able to create a geometric network from these lines and execute an upstream trace on these data.

I also have a distribute of points (parcel centers with data) and I need to connect these points to the lines such that the points are coincident with the lines.  I generated a near table and used XY to Line to create line from each point to the stream lines.  I have manually copied and pasted the point-lines-to-stream-lines data into the original stream network.  I have split the original stream at the intersection of the point-lines-to-stream-lines data. I have snapped data to ensure connectivity.  I can build a geometric network from these data without error but when I run a trace upstream accumulation on the resulting network only the original stream geometry gets selected.  I have included two images.  The first image shows an example of the resulting stream data (blue arrows), the coincident points are shown in red, and the geometric network flags are shown in blue.  The second image shows the result of the upstream accumulation output and the un-highlighted lines are the connections that I added.

Why can I not trace the point-lines-to-stream-lines data in my geometric network?

Note,  If I use select by location tools I can get a selection from the point-to-stream lines.


texts: ArcObjects: esriSRGeoTransformation enum for WGS_1984_Major_Auxiliary_Sphere_To_WGS_1984

texts:
There is geoTransformation named:

WGS_1984_Major_Auxiliary_Sphere_To_WGS_1984

I know it exists because I can access it with Projection Tool in ArcToolbox.  But for the life of me I cannot find it any of the geoTransformation constant lists (esriSRGeoTransformationType, esriSRGeoTransformation2Type, esriSRGeoTransformation3Type). How do I access the enum for this geotransformation with ArcObjects?


texts:
I am trying to divide a DTM model in subbasins but I have set specific outlet points for the subbasins, and not to use a thershold.

Is there a tool similar to r.water.outlet but with multiple outlet points that allows to do that on QGIS?


texts:
I am trying to apply atmospheric correction to Landsat 8 scenes using i.atcorr. After tons of tests I am still struggling with the correct input and output range.
The results deriving from radiance as input and from reflectance as input are different!
I have radiance and reflectance from i.landsat.toar and try to get the i.atcorr results. I try several combination of input and output range and the only ones that seem to produce a nice RGB are:
Input: the full range of radiance (Lmin, Lmax)
Output: 0,1 or the full range of reflectance (computed by dividing Lmin and Lmax by the factor that converts radiance to reflectance and is computed by i.landsat.toar)
Or in case of reflectance
Input: Lmin, Lmax divided by the convertion factor mentioned above
Output: the same as radiance

In both cases the resulting values are different which cannot be correct (Radiance and reflectance should produce the same outcome) and when I examine the resulting RGB, the result is almost exactly the same as the digital number image before the atmospheric correction.

Does anyone really uses i.atcorr to perform atmospheric correction to Landsat? And if so, which is the right way (input/output range)?


texts: Table not displaying all rows in ArcGIS Desktop?

texts:
I'm working with a txt file in ArcGIS. When I display the table and scroll down it seems to encounter an error and won't display any records past about 10,400. There are roughly 200,000 records.

It then gives me the error:

  Could not load data from the data source. If you can correct the
  problem, press the refresh button to reload data. Possible problems
  can include bad network connection, invalid field, etc.

The txt file is on my computer so it's not a network connection. Any thoughts?


texts: Decreasing resolution of NetCDF data with GDAL

texts:
I have wind speed data which is in NetCDF format and lat=4320 lon=8640 and I want to convert it to a NetCDF file with lat=360 and lon=720. In other words, I want to change the resolution of my data whose resolution is 0.0416 degrees (1/24th), and convert it to 0.5 degrees. (By lon and lat, I mean longitude and latitude.) I have already used this code but I have some errors. Could you please help me?
gdal_translate -of netCDF -tr 0.5 0.5 WS.nc WS_1.nc

Warning 1: No UNIDATA NC_GLOBAL:Conventions attribute

Input file size is 8640, 4320

0Warning 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid
argument".

...10...20...30...40...50...60...70...80...90..Warning 1: Recode from UTF-8 to CP_ACP failed with the error: "Invalid argument".

.100 - done.


texts: Use LatLng Double to query GeoTiff in geotrellis (scala)

texts:
I am currently trying to read bigtiffs into geotrellis in Scala to read single band terrain geotiffs. I can load them successfully, and query data/access CRS and extent info by

val tiffPath: String = "/Users/vb/Misc/testTiffs/00N46E006.geotiff"
    val geoTiff: SinglebandGeoTiff = GeoTiffReader.readSingleband(tiffPath)
    val tile = geoTiff.tile
    val extent = geoTiff.extent
    val crs: CRS =   geoTiff.crs
    println(tile.getDouble(100,1))

However I want to be able to access the value by something like

tile.get(latitudeDouble, longitudeDouble)

Where latitudeDouble and longitudeDouble are real values on this tile. Using the Value reader functionality seems promising, but this isn't a multilayer tiff, so i'm not sure it's the right thing.

http://geotrellis.readthedocs.io/en/latest/guide/spark.html#value-readers


texts:
I am trying to calculate the length of lines, which were convatede before from gps to Shapefile (vector layer). I tried it with "feldrechner" (matrix calculator?) and the most time I got 0, or in the other times I got a very unrealistic result.

I also tried it with measurement of lines. There I got a good result. But I think, because of tracing the line by hand it is not so exact.

Does anybody know how I can get my exact length or/and area?

Both my results were:
e.g. this result (first way): 2.74556577576214e-07
In my other way I got in this case 35,555m.


texts: How to select specific feature classes nested within several folders?

texts:
I have hundreds of shapefiles that are stored in separate folders, which are within several other folders. Among the shapefiles I only need the ones that are named 'LAP010'.

How do I get that specific shapefile, merge them all together, then clip?

I know how to do it in ModelBuilder using an iterator, but I need to do this process 175 times and creating a script would be much more ideal in this situation. Currently in the model I have Iterate Feature Classes -> Collect Values -> Merge -> Clip. This works, but only 1 shapefile at a time. Unfortunately I do not have arc on my home computer and I am not able to access the normal internet from my work computer. So any help would be great.

I'm new to python, so any help and being able to break it down to a super simple understanding would be awesome.

Runing arcgis. 10.2


texts:
I'm using a map service which shows points for oil and gas wells.  It's useful to view them in ArcMap, but what I'd really like to do is be able to export them for use in another program, such as AutoCAD.

I don't have the option to right-click and export any of the layers.  I can't select the layers or view an attribute table.

Is this typical behavior with a map service, or is there some way I can export these points (with attributes) to a separate layer?

I'm using ArcMap 10.2 (Basic).  The map service is located here.


texts: Extract a LineString from LineString by two Points

texts:
I am using PostGIS2.0 and PostgreSQL9.3. I have LineString in Spatial-Ref 4326 like

geom:= ST_GEOMETRYFROMTEXT('LINESTRING(60.7014631515719 56.8441322356241,60.7023117507097 56.8445673405349,60.702948200063 56.8447993944193,60.703902874093 56.8448574076656,60.706236521722 56.8447993944193,60.7094187684889 56.8449444273664,60.7121236782406 56.8450894597515',4326);

And 2 Points in Spatial-Ref 4326 like

point1:= ST_GEOMETRYFROMTEXT('POINT(60.703902874093 56.8448574076656)', 4326);
point2:= ST_GEOMETRYFROMTEXT('POINT(60.7023117507097 56.8445673405349)', 4326);

Both points have been extracted from given LineString. So it is guaranteed, that both points are inside the given LineString. No neared points will be used.

It is not guaranteed, that the points are in the same order like in given LineString (see example: point1 is point #4 and point2 is point #2 of the LineString). They can be ascending or descending.

Is there any function or operator to extract a LineString from a given LineString by the points?

I want to do someting like

sub_geom:= ST_???(geom, point1, point2);

to get a LineString geometry that contains all Points from the given geometry from point1 to point2 (points are included)?

Expected result:

sub_geom == ST_GEOMETRYFROMTEXT('LINESTRING(60.7023117507097 56.8445673405349,60.702948200063 56.8447993944193,60.703902874093 56.8448574076656',4326)

The order of the points of the result geometry does not matter. It can be ascending or descending. The result is only used for visualisation.

It would be nice, if you can show me a solution for my problem.


texts: Loading USGS 1:24,000 quads into Garmin GPS-receiver — how to convert to a kmz Garmin understands?

texts:
I have downloaded USGS 1:24,000 topos (the classic one, not the useless US Topo) from the USGS Map Locator & Downloader.  How can I load those into my Garmin GPSmap?

Following advice at this forum post, I converted a PDF to KMZ using:

gdal_translate -of KMLSUPEROVERLAY UT_Cannonville_248430_1966_24000_geo.{pdf,kmz} -co FORMAT=JPEG

The resulting kmz looks fine in Google Earth, so clearly the georeferencing information is present in the PDF.  But when I mount my GPSmap 62 and copy the kmz to the Garmin/CustomMaps directory (as instructed here or here), it does not show up on the device.  The problem may be related to what is reported here.  How do I convert the kmz to a format that Garmin understands?


texts: Allocating distance on the road element in ArcMap

texts:
I have 2 input files- Road. shp with road names and excel table with road names, and start and end measures in Meters (Join field (Road names) The road has different directions, after dissolve or creating routes, start and end points are not sorted correctly.
Does any one has any experience with it, how can i fix that?


texts: Deciding variables for unsupervised image classification?

texts:
The results of an unsupervised image classification may vary A LOT depending on the variables you use from the beginning. These are the variables for the tool in ArcGIS:number of classes, minimum class size & sample interval.

But you can reply me in any homologous tool of the software of your choice.

I'm interested to know how do you decide these variables. For instance, it is said than the minimum class size should be approximately ten times the number of bands.

But what about the others?

In my experience there are not any "fixed" rules and it is more a test-error process. But I'd like to know how other users decide these variables and if you follow any special rule.


texts: Automatize spatial join when creating an new feature

texts:
I'm working with QGIS an I have a polygon and a line layer. The polygon layer defines a certain area and each polygon has its own specific ID (something like "ARC1" oder "GZT2"). I was wondering if its possible to join this ID to the line layer while creating new features within a polygon.
But it doesn't stop here. While creating a line, the type of the line is chosen via dropdown menu (something like "OG" or "HSBV"). My final goal is to connect this information with the ID from the polygon layer. A final addition is a sequential number. In the end the ID for a line should look like this: "ARC1_OG_001".
I think I could work my way around once the information from the polygon layer is contained in the line layer. My idea is using something like "concat" but I have no idea how to do this spatial join automatically. It would be nice to have a user friendly ID generation for those lines.


texts: Making GRASS GIS 7 Ubuntu bash file work on Windows 7

texts:
I have created this bash file (.sh) while working on watershed analysis stochastic simulation in GRASS GIS 7.0.2RC1, which is running on Ubuntu. It worked perfectly and I received the correct results.

r.surf.random --overwrite output=frequency min=0 max=0
for (( n=1 ; n<21 ; n=$n+1 ))
do
    r.surf.random --overwrite output=mistakes min=-15 max=15
    r.mapcalc "fixed_terrain = terrain@exrcs1 + mistakes@exrcs1" --overwrite
    r.watershed --overwrite elevation=fixed_terrain@exrcs1 accumulation=accum$n
    r.reclass --overwrite input=accum$n@exrcs1 output=drain$n rules=C:\\Users\\Hynek\\exrcs1_reclass_rules
    r.mapcalc "frequency = drain$n + frequency" --o
done

The bash file is using reclassification rules that are set in the file exrcs1_reclass_rules. And this is my question - how to make this bash file work for Windows 7 located GRASS GIS 7.0.2RC1? I knew that there would be a problem in the directory containing the reclassification rules file. I tried to change the path file to rules=C:\\Users\\Hynek\\exrcs1_reclass_rules instead of Ubuntu path rules=/home/user/exrcs1_reclass_rules, and it was able to read this file, but then this error appeared in GRASS terminal:

WARNING: Unable to rename null file
        'C:\Users\Hynek\Documents\grassdata/utm/exrcs1/.tmp/unknown/34012.1'

        to
        'C:\Users\Hynek\Documents\grassdata/utm/exrcs1/cell_misc/frequency/nul
l':
        File exists
WARNING: Unable to rename cell file
        'C:\Users\Hynek\Documents\grassdata/utm/exrcs1/.tmp/unknown/34012.0'

        to
        'C:\Users\Hynek\Documents\grassdata/utm/exrcs1/fcell/frequency':
        File exists

So far this bash file created all twenty desired accumulation and drain rasters, that are fine, but desired frequency raster is completely yellow-coloured and with zero values. This is obviously wrong. Do you have any idea how could I fix this?


texts: Is it possible to create tiles with transparent background using Qtiles?

texts:
I had created the tiles from shapefile using qtiles plugin in QGIS and that shapefile layer is a label layer created using MMQGIS plugin. But the thing is I want that tiles with transparent background. Can anyone shed some light on this?

Update: I already tried with layer properties 'transparency' along with qtiles 'transparency' it didn't worked well. The generated tiles were not clear.


texts:
I followed instructions at http://www.mapserver.org/installation/unix.html
but it didn't work well.

My system is ubuntu 14.04 and I'm a total rookie when it comes to unix/compiling/working with the terminal

First Question: Is there a functioning script which can be executed in the terminal? ( I don't know c - compiling well and don't know how to get all required packages)

All I did so far is set up the Apache2. When I browse localhost with Firefox, I get the "Apache2 Ubuntu Default Page".

Second Question: I want to make a mapserver and a mapclient as WMS-server which is based on geotiff and shapefiles.

Where can I find information to get things started?


texts: Is there in QGIS a function or a plugin that works similar to Legend Limiter in ArcGIS? The attribute I want to show in my legend has many possible values, I want my legend to only show those values that are visible on my view in the print composer.


texts: Simplifying Multiple neighbouring Polygons, removing gaps and overlaps

texts:
My main goal is to simplify multiple polygons, avoiding overlaps and gaps between them.

My initial approach was:

Find intersections for each polygon
so that I end up with an array of polygons, each having a number of intersections.

Example: [
{polygon:{feature}, intersections:[linestring,linestring]},
{polygon:{feature}, intersections:[linestring,linestring, linestring]},
{polygon:{feature}, intersections:[linestring]}
]

Assuming a polygon can be represented by its intersections and external lines (e.g. lines no intersecting with any other polygon).

Slice a polygon into multiple linestrings.
Simplify each individual linestring
Concatenate the linestring to form a polygon

Example:

Polygon A = simplify(A1) + simplify(A2) + simplify(Polygon A - (A1 + A2))
Polygon B = simplify(B1) + simplify(Polygon B - B1)
Polygon C = simplify(C1) + simplify(Polygon C - C1)

where A1 = B1 and A2 = C1

My question is, is this a good way to simplify multiple neighbouring polygons, or could you recommend a library or and algorithm for this task?


texts:
I am using ArcGIS 10.2.2 for Desktop.
Can I turn the text boxes which I have inserted on my map into a layer which keeps the same aspect ratio with the map?


texts: I generated a grid with 300m spacing but the ids generated from top to bottom in sequential oder. How could I get in horizontal from left to right sequence.


texts: Filling a polygon with lines using Postgis

texts:
I need to calculate a specific distance in an area. The distance is calculated from parallel lines in a polygon, And I need to find out how many parallel lines (with x meters distance to each other) can a fill in a polygon. Is there some ready function for this operation in postgis or mapscript? Or do I need to implement it myself?

Here is sample image for what I want to do:

I want to calculate how many orange lines can I put in polygon, and total length of these lines.


texts:
I was just trying to render a point layer with classes using a symbol circle.Below is the part of the code.

DATA 'E:\SBI\GIS\Growth\Growth11-12.shp'
METADATA
  'ows_title' 'Growth11-12'
END
STATUS on
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'datum=WGS84'
'no_defs'
END
CLASSITEM 'GROWTH SCA'
CLASS
  NAME "GROWTH SCA = 0_POOR"
  EXPRESSION "0_POOR"
   STYLE
     SYMBOL "circle"
     SIZE 5.25
     OUTLINECOLOR 0 0 0
     COLOR 255 0 0
   END
END
CLASS
  NAME "GROWTH SCA = 1_BAD"
  EXPRESSION "1_BAD"
   STYLE
     SYMBOL "circle"
     SIZE 5.25
     OUTLINECOLOR 0 0 0
     COLOR 212 42 0
   END
END

The other polygon layer renders fine. But this particular point layer doesn't render and throws the following error message:

  msDrawMap(): Image handling error. Failed to draw layer named
  'Growth11-12'. msLoadMSRasterBufferFromFile(): General error message.
  unable to open file /ms4w/apache/htdocs/xyz/map/circle for reading.

Could anyone suggest what am I missing here?


texts: How do you create a legend for the bucket divisions in a fusion table map?

texts: I am creating a map using Google fusion tables.  I have divided the data into "buckets" using the Configure Map Styles window. Is there a way to add a legend to the map telling the readers what the colors (buckets) relate to?


texts: Automatically insert file path in QGIS table

texts:
I'm using R to create some plots that refer to specific values of some point in QGIS. Each plot is saved into a directory and for each point in QGIS I added a column with the path to the file.

I know 2 different method to display these plots in QGIS:

using the Action tool (Open file)
using the Field tab of the Properties menu of the layer changing the Widget from Modify value to Photo

What if I have to do tons of plots or if I have a large point dataset? Is there a way to add automatically the path to the file in the attribute table? I tried to use the field calculator but I cannot figure out the problem.

Thanks to all

BTW: QGIS 2.1.0 master on Debian 7.3


texts: PostGIS: ST_Transform function conversion problem

texts:
I'm inserting map data from a GML file with srid EPSG:27700 into a PostGIS database table with srid EPSG:4326. I'm using the ST_Transform function as in this snippet:

 ST_Transform(ST_GeomFromGML('<gml:Point srsName="EPSG:27700">
    <gml:coordinates>527347.0,181346.0</gml:coordinates></gml:Point>'), 4326);

After the data was inserted in the database I tried to find if its geometry intersects with an existing table's geometry using the ST_Intersects function. The function returned FALSE in all cases, but I knew that the two geometry layers should intersect.

So, I loaded the layers in QuantumGIS to see what's happening. The PostGIS layers indeed don't intersect, but when I loaded the GML data directly from the GML file using the original srid (EPSG:27700) the map data correctly appeared on top of the pre-existing layer with srid 4326, with which I knew it should intersect. The problem is that the ST_Intersects function (as well as all the others of the same kind) works only for geometries with the same srid, so I need to solve the transformation issue.

Apparently there's either a problem with the ST_Transform function, or I'm missing something that I should know. I use PostGIS 1.5.3. Any help will be greatly appreciated.


texts: Figuring downhill gradient slope to riparian area on ArcGIS 10.5

texts:
I am currently working on constructing a countywide riparian area, which normally consists of the integration of water bodies, wetlands, wildlife corridors, flood prone areas and hydric soils. We perform such analysis before but this time around we would like to add the component of Steep slopes (15% or more) that are directly adjacent to riparian features that associated with a waterway. In other words, steep slopes that are directly adjacent to waterways or directly adjacent to any other riparian feature associated with the waterway will be included.

Figuring and extracting steep slopes is straight forward, the challenge remain on the proper methodology and tool to determine the slopes that flow directly down to other riparian components of a waterway. I cannot just extract the steep slope and merge wherever it intersect with the existing riparian area, since many of them do not facing the river. I need to figure out some steps to “draw” a line.

I am aware that some Hydrology tools from the Spatial Analysis can be used to define Watershed (such as using the function Fill, Fill Direction, Flow Accumulation, Snap Pour Point etc from the DEM file) I am not sure (a) if these procedures are applicable to what I am looking for, and (b) I wonder if is that a necessity to carry out all these procedure in order to get a particular section of the slopes that happens to flow downhill to riparian area.

Do anyone of you have any takes or suggestions on these?

Update:
I have done the following so far:

Construct the Riparian based on Wetland, Wildlife Corridor, Floodplains, Alluvial Soils & Water Bodies.
Using the Spatial Analysis on the DEM to find out the slope.
Using relcass to find out the steep slopes that are more than 15%. Convert that DEM to vector format to select those steep slopes.
Then it come to the way to determine the "Cut-off" line to get the slopes going downward to the features. I assume I need perform hydrology analysis on the DEM again. Should I do the Flow Direction next from the Hydrology Tools? And then Flow Accumulation?

Am I doing that correctly? Is there any step by step procedure can be provided?


texts: jQuery tabs into OpenLayers switcher layers

texts: How can I put jQuery UI tabs in openlayers layerswitcher? I can not imagine how this can be done ...


texts: Merging different resolution DEMs in ArcMap?

texts:
I have 4 DEMs I would like to merge/mosaic together into 1 - each have a different cell size. I am using ArcMap 10.6.1

Things to note:
 - All have 1 band
 - There is 1m, 2m, 5m & 10m DEMs
 - There are no overlaps between the DEMs

I have tried to use the "Moasic to new Raster" tool but got a "999999" error.


texts: Parsing path and calculate value in model builder

texts:
I am experiencing an issue with the model only tool Calculate Value. I am attempting to use the Parse Path and Calculate Value model only tools to force a feature dataset into the Create Topology tool.

The first parse path tool is taking the path
The second parse path tool is taking the file (Feature dataset)
The calculate value tool is combining the two strings and changing the data type to feature dataset using this expression ("%Path%"+"\%File%")   (which will connect to the create topology tool)
The problem is when combining the two strings, the calculate value tool is truncating a portion of the path name, specifically the number in the path name.

When running this model on a path with no numbers in it, it runs fine.

I also tried using the the calculate value tool again to replace the truncated characters with the correct ones, and still it breaks the model.

There is some issue with calculate value not accepting numbers in path names.

Can anyone help with this issue?


texts: How to install the Python module shapely for QGIS use?

texts:
I'm using QGIS 1.8.0 on a Mac with OSX 10.6.8 (Snow Leopard).
I've installed QGIS including GDAL, GSL, UNIXImageIO, Freetype, and Matplotlib all from www.kyngchaos.com.

When installing the plugin Contour I get the error that the Python module Shapely.geometry isn't present at my system. So I have to conclude that this module isn't a part of QGIS nor of Matplotlib and also not of the plugin Contour.

Where do I find this module and how do I install this on a Mac? I'm new to a Mac.
In Windows this isn't a problem, everything works correct, also the Contour plugin.


texts: Timing external javascript with ArcGIS Online embedded map

texts:
I have an ArcGIS Online time-enabled map on a webpage. When the map loads, the time slider begins moving. I would like to have a chart that moves along with the time slider, but I don't think ESRI has an option for embedded animated charts (please correct me if I am wrong).

I can place an animated chart below the iFrame, however the biggest issue is that my chart is loading faster than the ESRI map and it throws the timing off. I'm not quite sure what I could use as a mutual variable between the embedded ESRI map and my animated chart. Any suggestions here on how to animate a chart in time with an ESRI embedded map?


texts:
I am using Qgis 1.7 and I want to refresh the mapcanvas
so I am using refresh() function of QgsMapcanvas class
and Nothing is happening to the Map Canvas.
I am using Python for customizing


texts: FME Desktop - json Extractor Transformer Error

texts:
I have a workbench which takes a JSON file and uses the following transformers to parse the data: JSONFragmenter, JSON Extractor and a vertex creator.
I am getting warning errors in my translation log when writing to a postgis database. The errors are as follows:

"JSONExtractor (JSONQueryFactory): The JSON query
'json["data"][geomaster_name][*]' contains an invalid index at column
14.  An index must be a non-negative integer, a quoted string, or a * (wildcard) character"

The source data is coming from a url here:
https://data2.unhcr.org/population/get/sublocation/root?widget_id=211460&sv_id=39&population_group=5081&forcesublocation=0&fromDate=1900-01-01
I'm not sure if this is the correct avenue, but I inspected my output from the json extractor and referenced line 14. Line 14 is as follows:
{"geomaster_name":"Paraguay","geomaster_id":7513,"geo_sv_id":"7513","admin_level":"Country","centroid_lon":"-57.5244140625","centroid_lat":"-25.20494115356912","lat_max":-18.242430491113,"lon_max":-51.88671875,"lat_min":-30.965801735895,"lon_min":-65.88671875,"source":"Government","date":"2020-12-31","month":"4","year":"2018","published":false,"sv_published":"0","individuals":"2531","name":"Paraguay","numChildren":"0","color":"#3c8dbc"}


texts:
I am trying to style my WMS map using sld_body parameter as explained in GeoServer working with SLD docs. I tested with simple SLD file as below,
var sld = `<?xml version="1.0" encoding="UTF-8"?>
  <StyledLayerDescriptor version="1.0.0"
   xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
   xmlns="http://www.opengis.net/sld"
   xmlns:ogc="http://www.opengis.net/ogc"
   xmlns:xlink="http://www.w3.org/1999/xlink"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <NamedLayer>
      <Name>default_polygon</Name>
      <UserStyle>
        <Title>Default Polygon</Title>
        <Abstract>A sample style that draws a polygon</Abstract>
        <FeatureTypeStyle>
          <Rule>
            <Name>rule1</Name>
            <Title>Gray Polygon with Black Outline</Title>
            <Abstract>A polygon with a gray fill and a 1 pixel black outline</Abstract>
            <PolygonSymbolizer>
              <Fill>
                <CssParameter name="fill">#AAAAAA</CssParameter>
              </Fill>
              <Stroke>
                <CssParameter name="stroke">#000000</CssParameter>
                <CssParameter name="stroke-width">1</CssParameter>
              </Stroke>
            </PolygonSymbolizer>
          </Rule>
        </FeatureTypeStyle>
      </UserStyle>
    </NamedLayer>
  </StyledLayerDescriptor>
  `;

Then I tried to add the style as below,
var layer = L.tileLayer.wms(
    "http://localhost:8080/geoserver/wms/reflect?sld_body=" + sld,
    {
      layers: "topp:layer_name",
      format: "image/png",
      styles: "",
      transparent: true,
      attribution: "mylayer",
    }
  );

Now I can't access my WMS layer. In geoserver log file, it shows the XML error as below,
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber:
814; XML document structures must start and end within the same entity.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.geotools.xml.styling.SLDParser.parseSLD(SLDParser.java:470)
... 122 more

In GeoServer docs, it explains The SLD XML must be URL-encoded. So I tried to encode this SLD using encodeURI as below,
sld = encodeURI(sld)

var layer = L.tileLayer.wms(
    "http://localhost:8080/geoserver/wms/reflect?sld_body=" + sld,
    {
      layers: "topp:layer_name",
      format: "image/png",
      styles: "",
      transparent: true,
      attribution: "mylayer",
    }
  );

The layer is still not visible. I checked the GeoServer log and found this error,
Caused by: org.xml.sax.SAXParseException; lineNumber: 20; columnNumber: 43;
XML document structures must start and end within the same entity.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at org.geotools.xml.styling.SLDParser.parseSLD(SLDParser.java:470)
... 122 more

I verified that the same SLD is working when I uploaded it to the GeoServer.


texts:
Has anyone worked with ArcGIS server, when the data is stored in SDE with ArcFM?

While researching this Issue for a friend, I found out that ArcFM Server would be needed.
What is not clear, is if a Map can be published, and consumed via Flex or Silverlight API.

Has anyone successfully done something like this? Any pointers would be gladly appreciated.


texts:
I'm curious as to why the UTM zones are incomplete for NAD 83 in QGIS?  I have a WGS84 shapefile that I would like to project to NAD83 UTM Zone 30N but can't find it in the QGIS CRS list.

I see how one could create a custom coordinate system but the cut and paste I did of proj.4 code for zone 15 (simply changed it to 30) didn't work.

Thanks for pointing me to proper proj.4 code or how to project this shapefile from the UK.


texts: QGIS Modeler: Where is output from algorithm 'Set style for vector layer'?

texts:
I am writing a model that takes a polygon shapefile as input, converts it to polylines, explodes it to individual lines and finally applies a (tested) style, khLineLength1.qml, which labels each line with its length.

Here is the log:

Algorithm Polygon_Sides starting...
Prepare algorithm: QGISPOLYGONSTOLINES_1
Running Polygons to lines [1/3]
Parameters: INPUT =C:/Users/DAZ/QGIS_maps/Kaihu/epsg3706/routes_PG.shp
Converting outputs
OK. Execution took 0.187 ms (1 outputs).
Prepare algorithm: QGISEXPLODELINES_1
Running Explode lines [2/3]
Parameters: INPUT =C:\Users\DAZ\AppData\Local\Temp\processing\98fbdd36b519415f9e9bc25e9939916d\OUTPUT.shp
Converting outputs
OK. Execution took 0.234 ms (1 outputs).
Prepare algorithm: QGISSETSTYLEFORVECTORLAYER_1
Running Set style for vector layer [3/3]
Parameters: INPUT =C:\Users\DAZ\AppData\Local\Temp\processing\140dc16954394bd58455470538e300e9\OUTPUT.shp, STYLE =khLineLength1.qml
Converting outputs
OK. Execution took 0.123 ms (1 outputs).
Model processed ok. Executed 3 algorithms total
Converting outputs
Loading resulting layers
Algorithm Polygon_Sides finished

According to this
https://docs.qgis.org/2.6/en/docs/user_manual/processing_algs/qgis/vector_general_tools/setstyleforvectorlayer.html
 the Set style for vector layer algorithm should have a definable output Styled layer. The modeling dialog is allowing me to define the parameters Vector layer and Style file but that is all.

To clarify: In the modeler, for example, when I edit the Explode lines  algorithm, I see a title Output layer and beneath it a box with the hint [Enter name if this is a final result]. I do not see this for the styling algorithm and this seems to 'dead-end' the event sequence, preventing rendering and disallowing further styling and the successful execution of any subsequent algorithm.

This is a 'first experience' with the Modeler. Apart from 'little grey cells', what am I missing here?

Supplementary diagram


texts: How to use rbind with SPDFs when the number of columns of arguments do not match?

texts:
I'm looking to use rbind to combine the SPDFs of different European countries. However, I'm looking to use SPDFs of different levels of regions. Unfortunately, I'm getting the following error:

library(sp)
library(raster)

France_map <- getData(name = "GADM", country = "FRA", level = 0)
Germany_map <- getData(name = "GADM", country = "DEU", level = 1)
Belgium_map <- getData(name = "GADM", country = "BEL", level = 2)

test <- rbind(France_map, Germany_map, Belgium_map, makeUniqueIDs = TRUE)

Error in rbind(deparse.level, ...) :
  numbers of columns of arguments do not match

How do I need to treat the individual SPDFs so that they can be bound together?


texts: Finding only one class (stones) in aerial image using SAGA GIS

texts:
I have a color infrared image of a mountain with trees, meadows, clusters of stones and single stones. For my work I need to identify only the pixels that cover stones, everything else is secondary. I tried supervised classification in SAGA GIS, but that requires me to specify more than one class.
What would be a method to get this done?


texts: Add Layers to Map Display from script with default symbology

texts:
I have a script that runs IDW iterations and I'd like for the files to be automatically added to the map display after they are produced and contain the default symbology that ArcMap generates when you run the tool.

I'm not sure how complicated that is, but I hope it's possible.

Note: I am a novice at scripting.

My script:

# Import arcpy module
import arcpy
from arcpy import env
from arcpy.sa import *

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

# Allows overwrite of files
arcpy.env.overwriteOutput = True

inPointFeatures = arcpy.GetParameterAsText(0)

fieldList = arcpy.GetParameterAsText(1)

# IDW - Define local variables
cellSize = 250.0
power = 2
searchRadius = RadiusVariable(12)

for fieldName in fieldList.split(';'):

    # Iterate IDW
    outIDW = Idw(inPointFeatures, fieldName, cellSize, power, searchRadius)
    # Save the output
    outIDW.save("C:/temp/idw_out_{0}.tif".format(fieldName))


texts: Is there a public repository of common formating styles for QGIS? Specifically for Tiger data?

texts:
I have downloaded the Tiger data for a map I'm working on and wonder if there is somewhere I can download the common formatting styles for these shapes so I don't have to reinvent the wheel.  For example, interstates are blue with the number in an interstate symbol, highways red, water is blue, etc. etc.

Obviously I can manually go in and set that for everything, but I wonder if that has already been done somewhere so I don't have to spend the hours reinventing what I'm sure has been done countless times before.


texts: Why is the legend symbol alignment in Print Composer worse than in the main window layer list?

texts:
I created a point layer where point-symbols' size depends on a column of the attribute table. When they appear in Layers Panel, symbols look like this (every circle's centroid has the same "X-value" on an imaginary axis):

But when it appears in Print Composer as a Legend, it looks like this:

So nice arrangement disappears and all become a bit wobbly.
Why does it happen?


texts: Install the Pgadmin3 shapefile importer plugin on a Mac(10.8)?

texts:
I'm new to GIS related things and I'm setting up a Postgre/Postgis database for geospatial queries. I'd like to import various shapefiles into the database and I found that Pgadmin3 has a shapefile importer. How do I install the shapefile import plugin for pgadmin3 (I'm on Mountain Lion 10.8)?

Right now, the plugin menu is empty, and I have the very latest of Postgres and Postgis. See my comment below about what I've seen elsewhere on this topic.


texts: How to load a module in Google Earth Engine Python API?

texts:
I want to translate an analysis JavaScript file from JS to Python.
It starts with the loading of a module :
var temporalSegmentation = require('users/wiell/temporalSegmentation:temporalSegmentation') // Load module

but if I translate it to Python :
# load module
temporalSegmentation = require('users/wiell/temporalSegmentation:temporalSegmentation')

I get the following error

NameError: name 'require' is not defined

which makes sense as require is not a Python function. So is there a way for me to load this module from the JS file or do I need to rewrite everything into Python?


texts: Add hour and seconds to CartoDB/Torque animation

texts:
A while ago I made a CartoDB/Torque animation that displayed hours and minutes while playing. Sujay v. helped me out with the code here:

https://groups.google.com/forum/#!topic/cartodb/xpxF4fSV7ZI

Essentially I changed some lines in the torque.js file as below:

torque.clock.set('' + date_arry[0] + ' ' + date_arry[1] + ',  ' + date_arry[2] + ' ' + date_arry[3] + '');

However I've come back to needing to do something similar, and the torque.js file has changed alot and I can't figure out how to implement something similar now. Would someone be able to advise? The source code is here:

https://github.com/CartoDB/torque/blob/master/dist/torque.uncompressed.js

Apologies I can't do this myself. I'm pretty good at SQL and GIS, but lacking the .js skills. :-(

Thanks

James


texts: Installing and Starting QGIS server on Windows 7

texts:
I have downloaded and installed QGIS server as per the instructions on the web page  https://docs.qgis.org/3.4/en/docs/user_manual/working_with_ogc/server/getting_started.html#installation-on-windows, and have installed apache too. I have apache running. But in testing the QGIS server with the GetCapabilities phrase, I get
Error message: End of script output before headers: qgis_mapserv.fcgi.exe
with an Error 500.

I have searched for advice on the web, but it all seems to either replicate what was on the Getting Started webpage, or is old - 2012 to 2015 - and does not reflect what I have. Can anyone shed some light on a 2020 installation and setup of QGIS server please?


texts: Instructional ArcGIS Online resources in Arabic or Farsi or Pashto or Turkish?

texts:
I work for a school district with a wide variety of immigrants and quite a few refugees. Many children come in not knowing any English or very limited.

I have found that maps transcend language barriers but on ArcGIS Online the resources are in English, German, Spanish, French, Japanese, Simplified Chinese, and Russian.  I would like to get some instructional lessons in other languages with the idea of allowing everyone to participate in making a Story Map or other web map (we have Chrome books and the Esri K-12 free license to work with). I think the product could be a beautiful map with as much English writing as they can handle but still conveying an idea/story.

I know GIS analysts come from all over the world, so I am crossing my fingers I can get some advice on what to look for translated/new materials (my previous search came up with ArcGIS youtube videos in Arabic but those were for desktop)


texts: arcpy and ArcGIS Pro: update Z values of a pointMZ geometry

texts:
I am trying to "reverse" the values of Z in a pointMZ geometry with arcpy.da.UpdateCursor.
Anyway, I am not able to find a way to achieve this, although my script seems to work (no errors, printing the new Z values gives me the right output, but geometry always looks the same...). My try:

 import arcpy

 with arcpy.da.UpdateCursor('my_feat.shp', "SHAPE@Z") as cursor:
     for row in cursor:
         row[0] = -1 * row[0]
         print(row[0])
         cursor.updateRow(row)

My pointMZ geometry always looks the same (in terms of points displayed in my scene view), while I expected to set its Z values to their opposites and see them upside down.


texts: Removing duplicates in lines using PostGIS?

texts:
I have a new polyline and need to remove duplicating parts from it. New polyline is compared to other polylines stored in PostGIS table.

I have a query that removes duplicates from line newTrack comparing it to existTrack.

SELECT ST_AsGeoJSON(ST_Difference(newTrack.newGeo::geometry, existTrack.existGeo::geometry))
FROM (SELECT geography as newGeo
    FROM binndr_road
    WHERE id = 39267) as newTrack,
    (SELECT geography as existGeo
    FROM binndr_road
    WHERE id = 39274) as existTrack;

But I have no idea how to compare newTrack with all lines stored in the table.


texts: Can you use nested properties to style features in CartoCSS

texts:
I've imported a GeoJSON layer into TileMill and am having trouble styling based on the properties in the features. The features' properties objects have objects nested within them, and I haven't found any examples of using nested properties in selectors. I have tried something like the following:

#geojsonlayer[submission_sets.comments.length=1] {
  marker-width:2;
  marker-fill:#f45;
  marker-line-color:#f45;
  marker-allow-overlap:true;
  marker-ignore-placement:true;
}

But I get a "missing closing ] of filter" error. Is this construction valid? Is there some other valid construction that allows me to do something similar?

Edit:

For reference, here's a sample feature that I'm trying to style:

{
   "type":"Feature",
   "id":166995,
   "geometry":{
      "coordinates":[-75.1694440842,39.9707152354],
      "type":"Point"
   },
   "properties":{
      "description":"...",
      "updated_datetime":"2014-03-28T01:31:29.492896+00:00",
      "visible":true,
      "created_datetime":"2014-03-07T17:10:00+00:00",
      "attachments":[],
      "url":"http://data.shareabouts.org/api/v2/mjumbewu/datasets/philly-bike-share/places/166995",
      "_imported_id":1402,
      "id":166995,
      "submission_sets":{
         "comments":{
            "length":1
         }
      },
      "name":"20th and Ogden Street",
      "dataset":223
   }
}

(from http://data.shareabouts.org/api/v2/mjumbewu/datasets/philly-bike-share/places?format=json&page=5)


texts: Read (and write) SVG from Geopackage with QGIS

texts:
There is the possibility to save the style of a layer in a geopackage:

Layer.saveStyleToDatabase

This style can be read by QGIS without additional code.
But is there a way for QGIS to read SVG symbols from a gpkg?

I could write the SVG by code, but reading should be done without additional code.


texts: Explanation on band conversion from radiance to reflectance final value

texts:
I've watched few video on conversion of radiance to reflectance for landsat band, most of them recommended to use formula below to to make sure the final reflectance value lies in between 0 to 1. My question is, is this method also categorized as method to NORMALIZE landsat image bands. Secondly, what value does the unknown represent?
Formula that I am referring to:
(B1 le 0)*0+(B1 ge 10000)*1+(B1 gt 0 and B1 lt 10000)*float (b1)/10000

your response/thoughts are very valuable to me.


texts: Can GeoEXT 1.0 be used along with ExtJS 4.0?

texts:
On the GeoExt website their tutorial page has some instructions on how to setup up a application to use GeoEXT. This is the page I am referring to.
It mentions that you should download GeoEXT 1.0 and ExtJS 3.2. I have since noticed that Sencha has released ExtJS 4. Can ExtJS 4 be used along side GeoEXT 1.0 without any issues? Or should I go by the book and install ExtJS 3.2?
Thanks
Ando


texts:
I am trying to publish maps from QGIS Map Composer.

I would like to automatically add the credits of the background layers displayed in the composition (like OSM, Bing, ...)

I am aware of such a feature in main QGIS window using
View -> Decorations -> Copyright label but

this data is not shown in composer
I am looking for an expression to adapt the text depending of the active layer

(Currently using either qgis 2.18 or 3.4)


texts: Changing name of geometry column for feature class in file geodatabase?

texts:
I'm converting geopackages to features in a file geodatabase using Copy Features. For some reason the geometry column is named geom instead of the usual Shape and I want to rename it to Shape:

I have tried:

Alter Field but the geometry column is greyed out
Make Feature Layer of the geopackage and renaming column then Copy Features but the column is still named geom.
I have read this thread How do you change the geometry field name?, but the solution seems to require manual loading of data

How can I rename the geometry column?


texts: Display selected features with same point geometry

texts:
I have a point layer and some features have exactly the same geometry. When I make a selection it seems that some features are not selected because they do not display with the "Selection color" as they are "under" an other feature that is not select.

The only way i find to see my selection is to create a new layer with the the selection and display it on the top of the project layers. It's very "costly"...
Is there an other solution ?


texts: algorithm for displaying holes in a polygon by translating it into several hole-less polygons?

texts:
I'd like to plot polygons with holes on a framework that doesn't support holes. The approach to me seems to be to translate the single polygon into several ones adding up to the whole polygon, leaving out the holes.

Is there a standard algorithm for that? Maybe even with code? Or is there another standard way to solve the problem of plotting polygons with holes?


texts: SLD combine interpolate+categorize function and pass threshold

texts:
In my requirement I have a float atribute (value) containing values between 0 and 10.

I want to use the interpolate function to color values between 0 and the threshold=5 in green colors and to interpolate the values between 5 and 10 with red colors. So it's somehow a combination of the interpolate and the categorize function of SLD. Is that possible?

<CssParameter name="stroke">
  <ogc:Function name="Interpolate">
                     <ogc:PropertyName>VALUE</ogc:PropertyName>
                     <ogc:Literal>-9999</ogc:Literal>
                     <ogc:Literal>#000000</ogc:Literal>
                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#000000</ogc:Literal>
                     <ogc:Literal>0</ogc:Literal>
                     <ogc:Literal>#A51C1C</ogc:Literal>
                     <ogc:Literal>5</ogc:Literal>
                     <ogc:Literal>#FF9A9A</ogc:Literal>
                     <ogc:Literal>5</ogc:Literal>
                     <ogc:Literal>#00FF00</ogc:Literal>
                     <ogc:Literal>color</ogc:Literal>

Additionally I want to use the env parameter function of geoserver to pass the threshold value (5) in the WMS url. But I didn't find an example how to make that threshold dynamic.


texts: Representing a Shapefile with OpenLayers3

texts:
I'm trying to represent a shapefile over an ICC raster map using OpenLayers3. I'm quite new to OpenLayers3 and GIS, so I'm still trying to figure out how it works.

So far I've deduced I need to transform my .shp file to GeoJSON in order to load it as a vector layer in my map. So, using QGIS I've saved my data as a GeoJSON. This is what my sample Shapefile looks like in QGIS:

My resulting GeoJSON has an array of near 2850 features like this:

"features": [{
    "type": "Feature",
    "properties": {
        "ID_Segment": 50,
        "NACHr10000": 0.723431,
        "NACHr1200": 0.998081,
        "NACHr1600": 0.979102,
        "NACHr2000": 0.961284,
        "NACHr2400": 0.935882,
        "NACHr3000": 0.901504,
        "NACHr400": 1.145995,
        "NACHr5000": 0.821419,
        "NACHr800": 1.012412,
        "NACHrN": 0.64815,
        "Segment_Le": 15.553003
    },
    "geometry": {
        "type": "LineString",
        "coordinates": [
            [431676.733607147063594, 4581831.752044225111604],
            [431692.099358807899989, 4581834.158185890875757]
        ]
    }
},...]

I'm loading my map (the map works fine) and my GeoJSON this way:

var map = new ol.Map({
  target: 'map',
  layers: [
    new ol.layer.Tile({
      title: 'Global Imagery',
      source: new ol.source.TileWMS({
        url: 'http://geoserveis.icc.cat/icc_mapesbase/wms/service?',
        params: {LAYERS: 'mtc10m', VERSION: '1.1.1'}
      })
    }),
    new ol.layer.Vector({
      title: 'Sample',
      source: new ol.source.Vector({
        url: '/data/layers/sample.geojson',
        format: new ol.format.GeoJSON()
      })
    })
  ],
  view: new ol.View({
    projection: 'EPSG:4326',
    center: [2.17, 41.2],
    zoom: 8,
    maxResolution: 0.703125
  })
});

The fact is I can't see any data over my map but I don't get any error on the console either. So I have two questions:

I don't really know which coordinates system is using my shapefile. Does [431676.733607147063594, 4581831.752044225111604] makes any sense to my EPSG:4326 View?
How could I style those LineString features in order to make them really visible on the map (maybe they are there and I just can't see them...)


texts: Fetch\read extent of a georeferenced PDF file

texts:
How to read\retrieve the geospatial extent of a georeferenced pdf file ? Is this information stored as metadata with the PDF file ?

is there any API in python or other language that can read \ fetch this information ?


texts: How to reproject a raster in QGIS with Python

texts:
I would like to to reproject a satellite image in QGIS with Python. I have tried to execute the GDAL Warp(Reprojection) algorithm via the Python Console, but it does not give me the output. I did not see any error message in the console as well.

My codes are shown below:

import processing
processing.runalg ("gdalogr:warpreproject",
                   {"INPUT":"L:/minor/PyQGIS programming manuals/qgis_data/SatImage.tif",
                    "SOURCE_SRS":"ESPG:4326",
                    "DEST_SRS":"ESPG:3722",
                    "NO_DATA":"0",
                    "METHOD":0,
                    "RTYPE":5,
                    "COMPRESS":0,
                    "BIGTIFF":2,
                    "OUTPUT":"L:/minor/PyQGIS programming manuals/qgis_data/warped.tif"})


texts: How to add hyperlink in geojson popup in Leaflet?

texts:
I am trying to add a geojson layer with interactive functionality to my leaflet map. I am mostly using this (dated)blog: http://palewi.re/posts/2012/03/26/leaflet-recipe-hover-events-features-and-polygons/

My result to date: http://185.19.29.113:8080/cresh_map/mapgeojson.html

Could anybody help me with this question:

How can I show feature.url_temp as a hyperlink in the popup?


texts: Calculating total cost along multiple polylines using ArcGIS Desktop?

texts:
I'm looking to create a new sewer line. Part of the process includes making a cost analysis, which mainly centers along elevation. Areas that are lower than the treatment area need to be pumped, areas above can be gravity driven.

Normally, I'd use a Cost Path analysis to get the shortest/most cost effective path, but in this case, I have only a couple of optional paths (areas with public right of way).

With polylines determining my right of way, and a raster of my cost criteria, how can i determine which right of way is least cost?


texts: I'm building a model in arcmap 10.7 model builder to determine zonal statistics for multiple raster in a geodatabase. The model works, but only when i run it through model builder. When I try to run it as a tool I get error 000964 - specified extent is invalid. Also, when I add tools to the model, I will often get the error, breaking my model. I get this error whether or not I use a raster or shapefile as my feature zone. All data I'm using is in the same projection. Relevant pictures are below.


texts:
I would like to know if it is possible to auto digitize a satellite image on ArcGIS 10.5. I need the building shapefile of a large remote area.

I tried manual digitizing but its been stressful. I'm using ArcGIS 10.5.

Below is the image I'm trying to digitize. I need to show the roads and buildings.


texts:
I figured out a way to filter a raster by using the r.mapcalculator or the raster calculator. The problem is that I have to use Qgis 2.2 because some of my models doesn't work with 2.4. In 2.2 the raster calculator doesn't work within models. So I have to use the r.mapcalc tool.

...now to my problem...

My raster file is full of useless grids (extreme values) which I want to filter by condiotions. First I created maps <2*STDV and >2STDV. Now I wanted to use the following string "ifelse(A

I hope you understand my problem.


texts: Setting OpenLayers filter with PropertyName?

texts:
I'm trying to get a feature with a getFeature request that filters features by their unique id with IsLike. This is the filter on the POST request:

<GetFeature xmlns="http://www.opengis.net/wfs" service="WFS" version="1.1.0" outputFormat="application/json" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
    <Query typeName="CP:CadastralParcel" srsName="EPSG:25830">
        <Filter xmlns="http://www.opengis.net/ogc">
                <PropertyIsLike wildCard="*" singleChar="." escapeChar="!">
                <PropertyName>CP:nationalCadastralReference</PropertyName>
                <Literal>1010001</Literal>
            </PropertyIsLike>
        </Filter>
    </Query>
</GetFeature>

The problem is that the request returns an empty feature collection. Also tried with PropertyIsEqualTo (EqualTo filter) but I'm still getting an empty feature collection.

{"type":"FeatureCollection","totalFeatures":"unknown","features":[],"crs":null}

The features are like this: Feature example

I have the id=1010001, so I can get/identify the feature with

<CP:CadastralParcel gml:id="ES.RRTN.CP.1010001">
<base:localId>1010001</base:localId>
<CP:nationalCadastralReference>1010001</CP:nationalCadastralReference>

How can I set this in the OpenLayers filter? Note that so far I have implemented it this way:

var featureRequest = new WFS().writeGetFeature({
   srsName: 'EPSG:25830',
   featurePrefix: 'CP',
   featureTypes: ['CadastralParcel'],
   outputFormat: 'application/json',
   filter: likeFilter('CP:nationalCadastralReference', '1010001')
});


texts: How to determine scene tile's x, y and z on tile server?

texts:
At the core, I would like to get part of scene from planet labs tile server (png image). In short, what is the math between (long, lat) coordinate in EPSG:4326 to tile (x, y, z) values?

Planet Labs tile server url (needed values are marked in curly braces):

  /v0/scenes/ortho/20151104_205545_0c03/{Z}/{X}/{Y}.png?api_key=PL_API_KEY

Successful result would be something like this for coordinates (-111.872430526; 40.1277639813) [coordinates are approximate, not exact]:

  /v0/scenes/ortho/20151104_205545_0c03/16/10767/24780.png?api_key=PL_API_KEY

I have not been able to find specification for planet labs tile server (or of any other tile servers in fact).

I followed a tutorial where openlayers does exactly what is needed - requests parts of scene at given coordinates, generates (x, y, z) values returns png image.
And I am on to road of extracting needed part from the openlayers source, so at some near future point I will succeed.


texts: Problem installing QGIS on Mavericks. Says I need 10.6.8

texts: Trying to install QGIS for first time on a Mac OS X 10.9 (Mavericks). Loaded up all the prerequisites (GDAL, etc.) but the QGIS installer tells me "QGIS requires Mac OS X 10.6.8.". Saw that QGIS is supposed to work on Mavs but can't find what I'm doing wrong.  Help??


texts: QGIS: String formatting when creating a virtual field

texts:
I would like to join US census population estimates with county boundaries.
The population estimates layer (co-est2019-alldata) contains STATE and COUNTY fields with state and county FIPS codes, like this:

STATE
COUNTY

36
51

1
15

The county boundary (cb_2018_us_county_5m) layer contains the same values but with slightly different formatting and additionally a GEOID string field that combines the two:

STATEFP
COUNTYFP
GEOID

36
051
36051

01
015
01015

QGIS doesn't support joining on multiple fields, but a common workaround is to create a new virtual field that combines the target attributes. I want to create a virtual field in the population layer that matches the GEOID field in the county boundary layer.
This would be simple if there were a function equivalent to sprintf, because then I could just write:
sprintf('%02s%03s', "STATE", "COUNTY")

...but as far as I can tell, no such function exists. What's the best way to handle this?


texts: Adding serial number text to Layout view using ArcPy?

texts:
I have 250 maps (in separate MXD's). In each map, in the Layout view there is "aaa" text. the element name value is aaa.

I try to find a way to add serial numbers to each map, so each "aaa" text will converted to serial number. The result should be like that:

The serial number will start from 1 till 250.

I wonder if it possible to do it automatically, and not doing it manually?

I work on ArcGIS 10.3.1 with python 2.7.8 versions.


texts:
I have code that suppose to break multipart geometry into single part by generating list of coordinates for each polygon.

The code works perfectly for small amount of polygons,
but today when I tried to use it for 212 polygons, I got the next error message:

  Geometry.coordinates: GeometryCollections do not have coordinate
  lists. Use geometries().

So I have cnged my code from this:

var geometry=ee.Geometry.MultiPolygon(geometry.geometry().coordinates());

to this:

var geometry=ee.Geometry.MultiPolygon(geometry.geometries().coordinates());

but then I got this error message:

  geometry.geometries is not a function
      in , line 29

*the polygons in small appear also in "big", but big has more polygons

here is the link for my code so you can test the problem:
https://code.earthengine.google.com/83cef59549623c2d16a83eb108afdaaf

big=all the polygons
small= selected few polygons out of "big"

My end goal:

1. To be able to convert the big geometry into list of coordinates like the small

2. to understand why this error occures


texts: Adding polygon feature from one data to another

texts:
I am using ArcGIS 10.2. I have two polygon files: Data A and Data B. I am trying to add a couple polygons from Data B to Data A. In the editing mode, is there a way to pick the shape of a polygon (Data B) and add it into Data A?
(without using the trace tool)


texts: Is the GDAL-2.2.1.win32-py2.7.msi python binding compatible with gdal-202-1500-core and python 2.7.8 on Windows7?

texts:
I am installing GDAL and cannot get python to load the module GDAL. After deinstalling and reinstalling I noticed that the names of the win32 files for the python bindings and gdal core are slightly different - gdal2.2.1 for the bindings and gdal-202 for the core. Is the 2.2.1 binding compatible with the 202 core?

My python installation comes from ArcGIS 10.3. Do I have to do anything else to configure the python bindings?


texts: EPSG 3857 or 4326 for GoogleMaps, OpenStreetMap and Leaflet

texts:
The discussion at What is the difference between WGS84 and EPSG4326? shows that 4326 is just the EPSG identifier of WGS84..

Wikipedia entries for Google Maps and OpenStreetMap shows that they both use  WGS 84.

http://wiki.openstreetmap.org/wiki/EPSG:3857 states that

EPSG:3857 is a Spherical Mercator projection coordinate system popularized by web services such as Google and later OpenStreetMap.

Leaflet's help states:

EPSG3857 The most common CRS for online maps, used by almost all free and commercial tile providers. Uses Spherical Mercator projection. Set in by default in Map's crs option.|

EPSG4326 A common CRS among GIS enthusiasts. Uses simple Equirectangular projection.

This is confusing - it seems that Google Maps and OpenStreetMap use EPSG3857 but they use WGS84 which 'is' EPSG4326. Something can't be right here, most likely my understanding.

Could someone help me understand?


texts: Each time I open a my project, it starts to index and takes as long as up to 4 hours at times. My project has some layers that are stored in a remote database. How do I bypass the indexing process?


texts: Spatial join for not perfectly overlapping polygons?

texts:
I have 2 maps with the district borders of a country and I want to combine their features based on their location on the map but the borders of the districts don't overlap perfectly. I tried to use spatial join but in many cases it mixes the features of one district with the features of the neighboring districts.

For example

In the picture above the blue polygon is the district border of the 1st map and in the background I have border of the 2nd map. When I use spatial join it combines the features of the blue polygon with those of the top right polygon (the one with the red sign)

How can I combine the features of the proper polygons?


texts: QGIS Processing Script will not Validate

texts:
I am writing a script for QGIS that will identify the perimeter of only external facing walls.

The script is probably a little long to post directly into this post, but it is accessible here.

The script works when I am in QGIS's script editor and hit run i.e. the dialog box comes up and all runs as expected.

However upon using the 'add script from file' button (Processing > Toolbox > Add script from file) I am greeted with the error:

The selected file does not contain a valid script

Unfortunately I can't seem to get any break down or tracestack of why this is the case. I've tried examining the GitHub page for the function responsible but am unable to uncover any answers.


texts:
I am trying to migrate my Flex eSearch widget to the CMV Search widget.  The query is not working.  What can I do to make it work?
Flex query:

<value prompt="Example: MN or MNPC">upper(ICAOcode) LIKE upper('%[value]%')</value>

CMV query = expression:

(upper \arpt_name\ LIKE upper \'%[value]%'\)


texts: Select single feature from multiple types with WFS in OpenLayers

texts:
I have a WMS base and from that create a Vector Layer for selections. Then I create 3 Control.GetFeature() controls, each using WFS to select a different feature type upon clicking the map (the 'featureselect' event). Doing it this way, however, I end up with as many as 3 Features being selected, when I want a maximum of one.

Now, ideally I'd like GeoServer to pick the best (closest) feature to the mouse click, but even using Javascript in the browser, how would I detect when all the features have come in via WFS so I can test the geometries? And what would be the best way to test them? (mostly multilines and multilinestrings)

Here's the simplified code to give you the idea of what I've got now:

function init() {
    var mapOptions = { /* yada yada */ }
    var map = new OpenLayers.Map('map', mapOptions);

    var wmsOptions = { /* yada yada */ }
    var wmsLayers = 'parcelshape_lin,wmain_lin,wservice_lin,buildings_pol';
    var wms = new OpenLayers.Layer.WMS(
        "Testing",
        baseUrl+"/geoserver/wms",
        { layers: wmsLayers },
        wmsOptions
    );

    var select = new OpenLayers.Layer.Vector("Selection", {
        styleMap: new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])
    });

    map.addLayers([wms,select]);

    var BuildingsControl = new OpenLayers.Control.GetFeature({
        protocol: OpenLayers.Protocol.WFS.fromWMSLayer(wms, {
            url: baseUrl+"/geoserver/wfs",
            featureType: "buildings_pol"
        }),
        hover: false
    });
    BuildingsControl.events.register("featureselected", this, function(e) {
        select.addFeatures([e.feature]);
    });
    BuildingsControl.events.register("featureunselected", this, function(e) {
        select.removeFeatures([e.feature]);
    });

    var WaterMainsControl = new OpenLayers.Control.GetFeature({
        protocol: OpenLayers.Protocol.WFS.fromWMSLayer(wms, {
            url: baseUrl+"/geoserver/wfs",
            featureType: "wmain_lin"
        }),
        hover: false
    });
    WaterMainsControl.events.register("featureselected", this, function(e) {
        select.addFeatures([e.feature]);
    });
    WaterMainsControl.events.register("featureunselected", this, function(e) {
        select.removeFeatures([e.feature]);
    });

    map.addControl(BuildingsControlCtrl);
    map.addControl(WaterMainsControl);

    BuildingsControl.activate();
    WaterMainsControl.activate();
}


texts: Geocoder widget find() method does nothing

texts:
According to https://developers.arcgis.com/javascript/jsapi/geocoder-amd.html#find the geocoder widget has a method "find" which seems to be a manual way of forcing the widget to start the geocode.

I put this method into one of the esri samples but it never actually does anything.

Here is a JSFiddle of the Esri sample code plus the line geocoder.find()

My intent here is that I want to be able to have an address be automatically located to when the user loads the map.


texts: Create list of shapefiles names from shapefiles in a folder, if folder does not contain shapefile type, print a statement stating this

texts:
I am creating a list of shapefiles names from files in a folder:
items = os.listdir(r'E:/folder/test')

print('checking directory...')
print('your files are: ')
print()
filenames = []
for names in items:
    if names.endswith(".shp"):
        filenames.append(names)
        print(filenames)
        print()
    else:
        print("there are no files ending with .shp in your folder")

If there are no files in the folder that are .shp files, I want the if/else conditional to print a statement saying this. My code is currently doing both, any solution?


texts: Controlling position of popup's actions?

texts:
Using the ArcGIS Server JavaScript API v4.12, how can I control the position of the popup's Actions pane?

To illustrate, see the sample at https://developers.arcgis.com/javascript/latest/sample-code/intro-popuptemplate/index.html

Click on a polygon at the top of the map, and the Zoom To option is shown at the top of the popup:

Now click on a polygon at the bottom of the map, and the Zoom To action is shown at the bottom of the popup:

How can I over-ride this default setting and force the position of the Zoom To action to the bottom of the popup, so it's consistently placed?


texts: Displaying sum of field in cluster symbology using QGIS?

texts:
Using QGIS, I have a point layer of wind turbines. One of the fields is MW (megawatts produced by the turbine).

I want to display the turbines by clustering. But I to show the sum of MW in the cluster rather than the @cluster_size default.


texts:
I am using ModelBuilder in ArcCatalog 10.1 to convert an ASCII files to TIFF and add spatial reference. I have hundreds of files to convert so I'm using the Iterators. After doing 10-20 files successfully I get the following error.

Executing (ASCII to Raster): ASCIIToRaster "D:\Users\Documents\#Data\# New Data\LIDAR\todo\nz4626_dsm_1m.asc" "C:\Users\Data\# New Data\Lidar2.gdb\nz4626_dsm_1m" FLOAT
Start Time: Thu Aug 15 14:59:06 2013
ERROR 999999: Error executing function.
Workspace or data source is read only.
Workspace or data source is read only.
No spatial reference exists.
ERROR 010067: Error in executing grid expression.
Failed to execute (ASCII to Raster).
Failed at Thu Aug 15 14:59:06 2013 (Elapsed Time: 0.00 seconds)

After using command prompt to remove read only tag from the source and destination folders and restarting ArcCatalog the process can be run again for a few more files before failing again.

What is causing the folders to become read only and how do I stop it?


texts: Making 8-day composites from daily data in ENVI

texts: I have daily data of NDVI in .tif format for 18 years and I want to make 8-day composites from it. How can I do so in batch processing?


texts: PostGIS Raster: raster2pgsql was not found in /usr/lib/postgresql/9.3/bin

texts:
I have installed sucessfully Postgresql-9.3-postgis on Ubuntu 12.04, following this instructions:
http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS21UbuntuPGSQL93Apt

Having done that, I have spatially enabled a database and all the GIS functions seems to be ready (1047). But I don't find raster2pgsql function in order to import a raster to Postgis.

Is there something extra to install or any setting that I am missing?

Regards,


texts: Publish a Leaflet map with vector overlay on a WMS server (e.g. GeoServer)

texts:
Is it possible to set up a WMS server (I am a bit familiar with GeoServer so this would be my preferred option but of course I'm open to learn something new...) that publishes an instance of a Leaflet map together with some vector overlays (e.g. GeoJSON, shapefile, whatever..)? Or am I mixing up things completely here because maps created in JavaScript cannot be published like this?

This would be nice to have for my usecase as I have set up a nice map with Leaflet which receives map tiles from our company's own tile server, does some styling, uses Leaflet plugins to display interesting stuff etc.

I would like to do some automated GetMap requests on that map for bounding box extents that I generate programmatically and save the resulting images to disk.

The closest I could think of would be to use MapProxy to combine my custom tile layer with my vector overlays (directly or prepared by and connected through GeoServer) and publish that as a WMS server. However, this would lack the styling and plugin stuff that I can do in Leaflet.


texts: How to Intersect a variety of Polygons with lines?

texts:
I am using QGIS.

I have a certain numbers of areas (shp) and different channels (shp). Now i want to know how many meters of  the different channels are within the individual areas. the Intersect tool only allows to choose individual


texts: Downloading shapefile from geoserver after applying CQL filter?

texts:
I have managed to download a zipped shapefile from geoserver but now I want to be able to download part of the layer in a shapefile. This is what I did in order to download the whole layer as shapefile:

http://localhost:8080/geoserver/wfs?format_options=charset%3AUTF-8&typename=something%3layer_1&outputFormat=SHAPE-ZIP&version=1.0.0&service=WFS&request=GetFeature

I have also managed to apply a single CQL filter based on the answer of Passing Filter Parameters to GeoServer WFS via URL?

How can I apply multiple CQL filters in the same URL? I read Passing Filter Parameters to GeoServer WFS via URL? that I need to encode the 'and' string in the CQL part of the URL. Is there an example illustrating this?


texts: How to access an wms layer that requires authorization via OpenLayers?

texts:
Is there a way to send username and password parameter to a wms layer that needs authorization?

If not, I guess it's perhaps a non-spatial thing to solve so that you before the javascript sends a wms request you initiate a httprequest to the server where the wms service is hosted. If anyone have an good example of how to do that from java, html or javascript I would really appreciate it.

If you use firefox you could add http:\username:password@wmsurl and its solved and the information is the stored in the session/cache ...

Thanks for the help
Mike


texts: How to install QGIS 2.8/2.10 on Ubuntu 14.1?

texts: I have installed QGIS 2.0.1 on Ubuntu 14.1, yet I am not able to update to 2.8 or 2.10 since the proposed repository paths installations do not work. Anybody who can guide me through with a click instruction?


texts: Adding Vector File Server Layer In QGIS w Plugin?

texts:
I'm using QGIS 3.8 and trying to connect to the following vector tile server layer using the latest version of the vector tile reader plugin: https://www.arcgis.com/home/item.html?id=e370f9e3a3b941d68f37632b6e16e601#overview.

On the website, the layer links to https://tiles.arcgis.com/tiles/pWwHCwVEtR8QoS9x/arcgis/rest/services/Uniti_Leasing_Fiber/VectorTileServer and the View Styles button links to https://tiles.arcgis.com/tiles/pWwHCwVEtR8QoS9x/arcgis/rest/services/Uniti_Leasing_Fiber/VectorTileServer/resources/styles/root.json?f=pjson.

No matter how I configure the input in the "Edit Connection" in QGIS, I get the error "The field Vector Layer' is required but not found.  This is an invalid Tile JSON."

How should the edit connection fields be filled out to avoid this error and pull in the data?


texts: Can you change the add-in filename without changing the Visual Studio project name?

texts:
My solution has several projects in it, one of which is an Add-in project, and I'd like to keep the naming convention of all of the projects intact but change the filename of the generated .esriaddin file.  Can the generated .esriaddin filename be changed automatically without without changing the Visual Studio project name or do I need to make a post-build event to rename it?

Thanks


texts: ST_MakeLine is changing the y-coordinate of some points

texts:
I was attempting to make a polygon out of a set of points when I ran into this problem. I'm gathering the points into an array and passing to to ST_MakeLine. When I query the same point index after using MakeLine, the point value has been rounded.

if NOT(ST_Equals(pointArray[0], ST_StartPoint(ST_MakeLine(pointArray)))) then
   raise notice 'Point Array: %, Line: %', ST_AsEWKT(pointArray[0]), ST_AsEWKT(ST_MakeLine(pointArray));
end if;

Output:

NOTICE:  Point Array: SRID=4326;POINT(55.5 46), Line: SRID=4326; LINESTRING(55.5 45.5,55.5 46,56 46,56 45.5,55.5 45.5)
NOTICE:  Point Array: SRID=4326;POINT(53.5 50), Line: SRID=4326;LINESTRING(53.5 49.5,53.5 50,54 50,54 49.5,53.5 49.5)
NOTICE:  Point Array: SRID=4326;POINT(48.5 46), Line: SRID=4326;LINESTRING(48.5 45.5,48.5 46,49 46,49 45.5,48.5 45.5)

Is this a bug?

VERSIONS:

PostgreSQL 9.5.4, compiled by Visual C++ build 1800, 64-bit

POSTGIS="2.2.2 r14797" GEOS="3.5.0-CAPI-1.9.0 r4090" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.0.2, released


texts: ArcPy - Strip leading and trailing blank spaces from records in table

texts:
I have a feature class in ArcMap which for many rows in numerous fields has records with leading and/or trailing blanks spaces.

I want to remove iterate through the fields and rows and remove any leading or trailing blanks spaces using 'strip'.

I have had a go a writing this in python below (using ArcMap 10.3.1)

FC = r"C:\Data\Survey.shp"
AllFields = [f.name for f in arcpy.ListFields(FC)]
with arcpy.da.UpdateCursor(FC, AllFields) as cursor:
    for row in cursor:
         row.strip()


texts: QGIS: Is there any interactive tool to select previous or next points using fid/attribute table order?

texts:
I have a huge point file (4933873 points, currently in GeoPackage)) looking this way:

imported from a CSV of following structure:

Captured Time,Latitude,Longitude,Value,Unit,Location Name,Device ID,MD5Sum,Height,Surface,Radiation,Uploaded Time,Loader ID
2016-11-04 01:00:07,37.4932,139.93305,38,cpm,,101,e40768be06169b47c412cdbc8b50ee51,,,,2016-11-04 01:00:07.805856,
2016-11-04 01:00:03,37.366713,140.53097,27,celcius,,100079,0654275d9d656aac8f1ee06eaf2ca8d0,462,,,2016-11-04 01:00:03.691745,
2016-11-04 01:00:02,37.366713,140.53097,11,cpm,,100072,b48a5a4b821d04d2071d233d99fc9bf5,462,,,2016-11-04 01:00:03.149019,
2016-11-04 01:00:01,37.366713,140.53097,56,cpm,,100071,654c26d9ad16aa776613db4913a6ee95,462,,,2016-11-04 01:00:01.932265,

And I need to remove those orange / red straight lines (airborne data) and keep the rest (ground measured data - car/walk etc.). Unfortunately there is no altitude so I cannot easily filter it out.

Is there any better way to select consecutive points (after selecting one to begin) without need to load attribute table for a whole layer?


texts: Last SEXTANTE (Processing) update results in missing RScripts examples

texts: I have installed today the new version of the Processing plugin on QGIS 2.8 (on Windows 7 x64) and I cannot anymore find the RScripts example that were available (and functioning) before the udpate. Any idea why this have happened? And which are the changes introduced with the latest version of the plugin?


texts:
I have a set of rasters that I've had trouble reprojecting to Robinson. It fails without errors, the crs changes but the extent doesn't convert to metres and it doesn't plot properly. Sources say EPSG:32663 is deprecated.

Projecting raster with '+init=EPSG:4326' and the proj4 string together doesn't make a difference

r <- projectRaster(r, crs='+init=EPSG:4326 +proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs')

But, setting the crs this way, followed by projecting with the proj4 string does

crs(r) <- "+init=EPSG:4326"

r <- projectRaster(r, crs='+proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs')

I need to do this across a list of rasters but am having trouble getting the syntax right for setting the CRS inside a function, example

for (i in 1:length(filenames)){
   crs(filenames[[i]]) <- "+init=EPSG:4326"
   # projectRaster(eval(as.name(filenames[[i]])),crs='+init=EPSG:4326 +proj=robin +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs')
}

gives the following error

Error in (function (classes, fdef, mtable)  :  unable to find an inherited method for function ‘crs<-’ for signature ‘"character"’

This is the raster I'm working with

ftp://ftp.star.nesdis.noaa.gov/pub/sod/mecb/crw/data/5km/v3.1/nc/v1.0/monthly/2019/ct5km_baa-max_v3.1_201901.nc

class      : RasterLayer
dimensions : 3600, 7200, 25920000  (nrow, ncol, ncell)
resolution : 0.05, 0.05  (x, y)
extent     : -180, 180, -90, 90  (xmin, xmax, ymin, ymax)
crs        : +init=EPSG:32663 +proj=eqc +lat_ts=0 +lat_0=0
+lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs
+ellps=WGS84 +towgs84=0,0,0
source     : /Users/traveler/Desktop/Reefs/alert-
animation/raw/ct5km_baa-max_v3.1_201607.nc
names      : bleaching.alert.area
z-value    : 1122811200
zvar       : bleaching_alert_area


texts: Dealing with invalid multipolygons while transforming WKB to geometry format

texts:
I have a big problem when I want to convert my WKB binary column to a geometry one using the function ST_geomFromWKB(wkb_geometry). It works only for valid multipolygon but when I take the overall data, it gives me the following error:

ERROR:  Polygon must have at least four points in each ring

Moreover, I cannot use the function ST_IsValid or ST_IsValidReason because it gives me always the same error :

ERROR:  Polygon must have at least four points in each ring


texts: I'm using QGIS 3.2 and want to manually move a few labels on a layer but when I try to use the move labels tool I can't move them. I can however rotate and change them using those tools. I looked in the Auxilliary Storage and it seems like the move tool is not creating new fields for the movement whereas the rotation and change tools can. Is there any reason the move isn't working while the others area?


texts: How to get GDAL to create statistics for GTiff in Python

texts:
I regularly create my own GeoTIFF rasters with GDAL in Python, e.g.:

from osgeo import gdal
from numpy import random
data = random.uniform(0, 10, (300, 200))
driver = gdal.GetDriverByName('GTiff')
ds = driver.Create('MyRaster.tif', 200, 300)
band = ds.GetRasterBand(1)
band.WriteArray(data)
ds = band = None # save, close

however when the result is viewed with ArcCatalog/ArcGIS, it looks either black or grey, since it has no statistics. This is solved either by right-clicking the raster and choosing "Calculate Statistics..." in ArcCatalog (there are several other ways to do this), or using gdalinfo in a command prompt:

gdalinfo -stats MyRaster.tif

will generate MyRaster.tif.aux.xml, which is used by ArcGIS to properly scale the raster. The PAM (Persistent Auxiliary Metadata) file contains the statistics, most notably the minimum and maximum values:

<PAMDataset>
  <PAMRasterBand band="1">
    <Metadata>
      <MDI key="STATISTICS_MINIMUM">0</MDI>
      <MDI key="STATISTICS_MAXIMUM">10</MDI>
      <MDI key="STATISTICS_MEAN">5.0189833333333</MDI>
      <MDI key="STATISTICS_STDDEV">2.9131294111984</MDI>
    </Metadata>
  </PAMRasterBand>
</PAMDataset>

My question: is there a built-in way of getting GDAL to create a statistics file (other than using the gdalinfo -stats command)? Or do I need to write my own?


texts: How do I get these points on Open Street Map with QGIS 3.03

texts:
I'm totally newbie with any GIS. I have an excel file with few coordinate points that I would like to have on Open Street Map at QGIS 3.03.

I can see the points and I can see the map, but points are not on the map. I guess there is something wrong with the coordinates, but I can't figure out what. Points should be in Helsinki, Finland.

The points are (XY):

25504048.339295186,6678318.63569837
25498570.47469425,6681280.528837938
25498588.903816383,6676346.348857614
25501320.605564777,6683454.164717192
25499216.654747352,6684094.233741575
25505079.153743148,6672807.205711159

What should I do to show them in correct location?
(Simple and every step instructions, please)

I would also like to know, how to get shortest route between the points.


texts: How to convert sinusoidal to EPSG:4326 using GDAL in the polar regions of MODIS 43A4?

texts:
I'm using GDAL to create EPSG:4326 geometries (polygon or multipolygon) from MODIS rasters in sinusoidal.  The script below works for tiles on the antimeridian (returning a multipolygon split by the antimeridian) except for vertical bands v00, v01, v16, and v17:

gdal_translate 'HDF4_EOS:EOS_GRID:"MCD43A4.A2017174.h13v01.006.2017187183922.hdf":MOD_Grid_BRDF:Nadir_Reflectance_Band1' band.tif
gdaltindex -tileindex location band-extent.shp band.tif
ogr2ogr  -segmentize 100000 -t_srs EPSG:4326 -lco RFC7946=YES -lco WRITE_BBOX=YES band-epsg4326.geojson band-extent.shp

In those 4 bands, I get a Polygon instead of a MultiPolygon, but with coordinates that would seem to be correct were it not for the "connecting" square in the middle:

Perhaps there's GDAL flag that I'm missing? Or maybe those polar regions need to be handled specially?


texts: Calculating emissions from points in road network using ArcGIS for Desktop?

texts:
I have GPS data (X,Y, speed, CO2 and fuel consumption) for one truck for one trip. I want to import them in ArcGIS and to join them with the road network (map matching). I was thinking of applying "near" to the data points so that they can get road segments' id and then "summarize" to get data for the entire road segment and join them afterwards with the road network.

My question is "near" reliable enough?
For CO2 emissions if i have two points recorded in a road segment should i take the total or the average?


texts: Are QGIS feature subsets incompatible with table joins?

texts:
When using QGIS 2.8.2, I am unable join a table to a layer that has a feature subset (Layer Properties > General > Feature Subset).

For example, creating a feature subset on a layer prior to joining an attribute table to that layer always results in no joined records.

Conversely, I cannot create a feature subset on a layer after joining an attribute table to that layer because the feature subset query builder button is greyed out.

Thus, I cannot combine Feature Subsets with table joins.

This appears to be a bug, or am I missing something?


texts: Error Opening MXD - The last successfully loaded component was: esriGeometry.ProjectedCoordinateSystem

texts:
Why are we getting this error when trying to open some MXD files?

Myself and another coworker are getting this same error when opening several MXDs  (see Error Message 1 below). We have all verified we are on ArcMap 10.4.1. The person who created the MXD also verified they are on 10.4.1 (usually there is no problem opening other MXDs she creates). This is only happening to 2 out of 5 people in the office. This error is also different than the normal error message regarding opening an MXD saved with a newer version (see Error Message 2 below for the normal error message).

Edit: Per response to original question I tried MXD doctor on the original and a copy on the server. I also backed up to local machine and tried it on that. All attempts resulted in the same error message below.


texts: No route calculated when using direction=true

texts:
I am using pgr_dijkstra to calculate routes on OSM data.

When using this call:

SELECT *
FROM pgr_dijkstra('SELECT id, source, target, cost FROM referentie.ref_osm_edges '
                  ,768576
                  ,537705
          ,false
          ,false ) a

I got 10 records like this:

0;768576;1351316;0.0288615485
1;768565;1334459;0.00095542657
2;771650;981098;0.0074186646
3;771649;1334458;0.00101160459
4;771651;1022868;0.012433637
5;801545;1022859;0.000870379
6;801544;1022864;0.00048865133
7;801541;1022857;0.0011667417
8;768567;1334465;0.0122069924
9;539063;1366175;0.00064540192
10;537705;-1;0

This is OK.
When using this call (with directed=true):

SELECT *
FROM pgr_dijkstra('SELECT id, source, target, cost FROM referentie.ref_osm_edges '
                  ,768576
                  ,537705
          ,true
          ,false ) a

Then I got no results, also no error just:

Total query runtime: 81 ms.
0 rows retrieved.

So I try to find out why dijkstra cannot find a route based on direction?

Hans


texts: Display Integer Data in Format of String in the Shapefile Table

texts:
I have a Field in a Shapefile which has 3 unique Integer values as

[1, 2, 3]

but I want to display them in table as string like

1 - A
2 - B
3 - C

so eventually in the table will be A, B or C but keep the actual data in integer format behind the scene
Can you please let me know how to do this is ArcGIS


texts:
I have calculate distance from one point to a linestring. I have used the following query

WITH data AS (
SELECT geom::geometry AS road_network from linestring)

SELECT  ST_Distance(ST_Line_Interpolate_Point(road_network, ST_Line_Locate_Point(road_network,ST_GeomFromText('POINT(90.402 23.753)'))), ST_GeomFromText('POINT(90.402 23.753)'))  as Dist

FROM data

ORDER BY Dist
Limit 1

Its returning the following result

0.000501079237817185

I want to get the result in Meter. How can I convert it? I am using WGS84 projection system. I know the ST_Transform function but I need a perfect query where I use this function.

Thanks


texts: How do you set sea level elevation to white in terrain analysis?

texts: I have ASTER files I am working with to create a shaded relief background for some other vector shapefiles. In experimenting with different color-elevation options, I am unable to have the Terrain Analysis tool make the surrounding ocean white in color. I have tried manually adding a white color for elevation values 0.0 to 0.0, but no dice. Going to the Table of Contents->Properties and selecting a different color scheme just replaces the Terrain Analysis colors and I have to re-do Terrain Analysis (although that is likely because I don't know how to 'undo' the color change when the 'undo' option is not available). Does anyone have a solution?


texts: Export 3d model from qgis2threejs with vector data

texts: Im trying to export a 3d model from qgis2threejs plugin in Qgis, but all I've managed is to export my DEM, without any data. Is it possible to export a 3d model in some of its extensions (STL, COLLADA, Wavefront) to look like a model in qgis2threejs pluging, with data and colored DEM?


texts:
I have python code that I am executing but it gives me following error:

<sqlite3.Cursor object at 0x7f3c7666dc00>

when I execute the cur.execute(statement). the code that is below the cur.execute is not read and nothing gets written. here is part of the code  i am using

statement = 'select "index",path,id from %s' %(table,) + " WHERE done IS NULL AND job = '%s';" %(job,)
cur.execute(statement)
for row in cur:
    print row
    pszFilename = row[1]
    name = os.path.basename(pszFilename)
    foo = int(name[2:4])
    if foo%2 == 0:
        meridian = foo + 1
    else: meridian = foo
    print 'meridian: ',meridian


texts: Network analysis not working correctly in GRASS GIS?

texts:
I have a problem with the Network Analysis function v.net.iso in GRASS. I tried it so many times but the function doesn't work correctly.

I tried to calculate isolines via the function v.net.iso, based on a street shapefile (OpenStreetMap, Geofabrik) and a point shapefile with grocery stores (My own). I created the network via v.net and used the v.net.iso function for isolines (here in the picture 50, 100, 150 meters and so on). The result can be seen in the picture. It seems that only some of the street lines are used for the calculation (the ones with colors like red, yellow,...) and others are not (the black ones).

It's not a problem of colors.
Important note: The streets are completely connected with each other! There are no minimal gaps between them.

Does anyone have any idea?


texts: QGIS Gazetteer query without adding data to canvas

texts:
I have a PostGIS database with 30 million gazetteer points, each have an X Y coordinate. I want to query this and then zoom map to location. However, I don't want to add the data to the project because it takes forever to load 30 million points.

I started looking at creating my own QGIS plugin but all tutorials I have seen, seem to add vector data directly to the map canvas first.

Pseudo Code:

Click button
Dialogue Box
Enter PostGIS database connection fields (host, dbname, user, password)
Enter gazetteer value
Finds match
Zooms and centers on point.

If anyone has a better idea or knows of a plugin that would be very useful


texts: How do I get osgeo4w apache install to allow my regular windows account access?

texts:
I have just installed QGIS server on my Windows 7 machine. The installation went fine after some googling to find all the bits and pieces that needed to be done and I can fetch my get capabilities document and see the test.qgs project I added to the server.

However I can't seem to successfully connect to the service in QGIS, I get the error below.

Is there something on the apache configuration that I have missed which would allow or deny users access to the service?

Thanks

EDIT: Platform: Windows 7, and installed Apache through the OSGEO4W Installer. Okay so I installed apache and QGIS Server through an admin account which was setup by our service desk then it was taken away after the install. So when I run QGIS under my normal account I get the error in the above picture. I asked for the admin account again, chose to open QGIS by going "Run as administrator" and everything worked just fine. I could connect to the wms and see my test service. How do I modify apache to allow access for my regular windows account?

Ando


texts: Combining features with same value using ArcGIS Desktop?

texts:
I’m looking to combine several features with same value (in same layer) so the remaining attributes of that combined feature are united together in the same cell and organized comma separated or similar. I know Global Mapper has this tool.

Is it posible to achieve this in ArcGIS Desktop?


texts: Updating coordinates of vertex in polyline using Python and ArcGIS for Desktop?

texts:
I want to update the point coordinates which are not correct on polyline. I tried many times to update it using python, but my script didn't work. The first attribute table is the station_id and its correct coordinates that need to update in polyline.

The second is the polyline's attribute table.

For example, the from_id "18 " in polyline is not correct, it need to be update to correct coordinates accoring to table 1.

How to find these wrong station_id (in From_id or To_id field) and replace it according to table 1 using python.


texts: Leaflet, defining a specific region for a canvas to draw upon

texts:
Using leaflet, you can draw on a given map by adding a Canvas layer.  Some instructions are given here, http://leaflet.cloudmade.com/reference.html#tilelayer-canvas

var canvasTiles = new L.TileLayer.Canvas();

canvasTiles.drawTile = function(canvas, tilePoint, zoom) {
    var ctx = canvas.getContext('2d');
    // draw something on the tile canvas
}

However, I'd like to to draw at a specific lat-long location on the map, can that be done?


texts: Is there a plugin for autocreating code from actions like in SPSS?

texts: I want to be able to change an edit I did 4 steps ago without having to redo all those 4 steps. Is this possible in a more accessible format than PyQGIS maybe through a plugin?


texts: Launching QGIS with specific user profile

texts:
By default, when you launch QGIS, it shows the most recent user profile you worked with. It's not convenient because I have settings in various languages and locales and have to switch frequently between profiles.
Is it possible to start QGIS specifying the desired profile using a command for CLI in macOS, Windows, and Linux?


texts: Resampling raster with categorical data in R?

texts:
I have a covertype raster layer which is categorical data (1,2,3...19), and I want to change its resolution, coordination system, column numbers and row numbers to fit with other raster layers. But after I did the resample with "ngb" method, it turned out to have continuous numbers, instead of discrete numbers.

The code is like:

covertype<-brick("/Volumes/Covertype/covertype.tif")
newproj<-"+proj=utm +zone=47 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"
covertype1<-projectRaster(covertype, crs=newproj, res=30)
e<-extent(597568.9, 795028.9, 2340412, 2499892)
s<-raster(e, nrows=5316, ncols=6582, crs=newproj)
covertype2<-resample(covertype1, s, method="ngb")

I thought using method of "ngb" would not yield numbers different from the original raster layers, but "covertype2" has numbers like 10.00000023.

What is wrong here?


texts: Convert an OSM file to a Shapefile with the same attributes

texts:
I am trying to use OGR2OGR to convert an .osm file to a .shp file:

ogr2ogr.exe --config OSM_USE_CUSTOM_INDEXING NO -skipfailures -f "ESRI Shapefile" output.shp input.osm

OGR2OGR does this pretty nicely, and converts the .osm file to four .shp files in the "output.shp" folder: lines.shp, multilinestrings.shp, multipolygons.shp, points.shp.

What I would like to do, is to force all four resulting .shp files to have equal number of attributes (or "keys" in openstreetmap terminology).
For example, a polygon would certainly not have an attribute highway. While a line could have. But I still want to force the multipolygons.shp file to have the highway attribute.
To make it clear, I am not interested in specific attributes.
I would just want all of the upper 4 .shp files to have the same attributes, and the same number of attributes.

Can this be done somehow by editing the upper command?
Or is this exclusively done by editing the osmconf.ini file? If yes, then how?


texts: Performing SQL Server Geometry to geography conversion?

texts:
I have imported a number of Shapefiles from the ordnance survey using shape2SQL

These have been imported as geometry however i would like to convert them to Geography and specifically to srid 4326

the shape when imported contains a number of polygons

ultimately i'm trying to ascertain if a number of lat/long  coordinates i hold fall within one of these polygons (so i suppose i also need to alter the coordinates to geog (which i can see has been answered before))

finally the plan is to display this on an SSRS report or onto a Bing Map display (hence why at this stage i believe i require SRID 4326)

How do I import the shape as SRID 4326?


texts:
I need to make a training on geonetwork 2.10.
OSGeolive is a good option for me, as I would not have to worry about the installation.

The current version, Osgeolive 9.5, has geonetwork 3.0 which interface is way too different from geonetwork 2.10.
Which version of OSgeolive could I donwload to have geonetwork 2.10?


texts: How to use XML data retrieved from WMS GetFeatureInfo?

texts:
I use WMS layer in my app and could successfully retrieved Feature Info by click like so: http://openlayers.org/dev/examples/getfeatureinfo-control.html

My question is: Is there any way to export the retrieved data in separate variables? So that I can organize the popup instead id this table. I see that its an XML file but still can't find a way to handle it.


texts: How to remove clouds with the cf_mask.tif file provided from landsat 8 surface reflectance data?

texts:
I just downloaded my first group of landsat 8 surface reflectance data files. In this package contains sr bands 1-7 (I hope to use some of these to create an NDVI) as well as numerous files called: sr_cloud, cf_mask, and cf_mask_conf (all tif files). I am using arcgis.

I am assuming that these files are utilised to help remove cloud coverage from the images. However, I have never dealt with any of these types of files (srcloud, cfmask, etc.) and I have no idea regarding how they work or how to use them to effectively remove clouds. Does anyone have any experience working with these kinds of files and know how I may effectively use to remove clouds?


texts: Shapefile downloaded from GeoServer has attribute data (in Farsi) changed?

texts:
I added many shapefiles and PostgreSQL database into GeoServer!

However, when I downloaded this Shapefiles again why is my attribute data not legible in Farsi characters?