texts:
I am running the Viewshed (Spatial Analyst) tool with OFFSETA and OFFSETB existing as fields in the observer feature class.

See firstly the single observer point (a star) I am using with the terrain raster (5m resolution):

See here the viewshed using OFFSETA = 2m and OFFSETB = 50m:

See here the viewshed using OFFSETA = 50m and OFFSETB = 2m:

There is a difference between these results. My understanding is that this should not be. If the observer can "see" the receiver then the receiver can "see" the observer.

Or to view it another way, regardless of the shape of terrain in between, if a 2m tall person at Point A can see a 50m tall structure at Point B then a theoretical  50m tall person at Point A could see a 2m tall structure at Point B.

I have reviewed the ESRI documentation for this:
http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=How%20Viewshed%20works

However I still do not see the reason for the difference.

All coordinates are projected to the same planar coordinate system in the same units so I don't think there is any issue with the relation between X,Y and Z values.

What is the error in my understanding or my approach?


texts: How to save a Temporary Column in PostgreSQL?

texts:
I have a vector layer consisting of polygons. I'm calculating the area of each area by the query:

SELECT *, ST_Area(the_geom::geography,true) alan FROM pl_park

I'm using Carto to query the data. The result is as I wanted:

But when I want to continue with this query and select, let's say, areas greater than some value, I simply can't, because I can't save the column.


texts:
i've some georeferenced images that have the size of 1280 X 960. I need to cut the outer pixels to have a size of 1220 X 900 (i need to cut 30 pixel for each borders).

Can i do this using GDAL or a python script using numpy array?

I try using Gdal warp:
gdalwarp -to SRC_METHOD=NO_GEOTRANSFORM -te 30 30 1250 930
input.tif output.tif

But in this case the result is a not georeferenced image.


texts: Generating TIN and/or DTM from point feature data

texts:
I have parameter data that is linked to points within a polygon area. I am trying to find ways of creating an interpolated layer for the extent of the polygon within which the points are located as either a TIN or DTM layer, based on these geolocated points and their values.
I have read about an Interpolation plugin in QGIS that would have tools within it that might be a start. However that plugin no longer seems to be available.
Ideally I would like to be able to achieve this in PostGIS or by adapting some code that might be available for doing something similar. From experience could anyone offer some advice on the best approach to take and what tools they might be aware of that so far I may not have come across in my searching


texts:
I am running mapinfo 15.2 (64bit). I have downloaded multiple Landsat 8 scenes with multispectral data. I can combine the bands of a single scene into a single mrr file using the Raster combine function.

Is there any way to process all scenes at once?


texts: Taking parameters from users in ArcPy via IDLE?

texts:
I wonder if we can use arcpy.GetParameterAsText(0) in Python IDLE to get a parameter from a user?

I am using ArcGIS Desktop 10.4 and Python 2.7.10 that comes with ArcGIS. Actually I want to know how to use arcpy.GetParameterAsText() to get an input from a user or I should use input() function insted. If so, what is the use of arcpy.GetParameterAsText()?

import os
import arcpy

arcpy.env.workspace = arcpy.GetParameterAsText(0)

in_featureclass = arcpy.GetParameterAsText(1)
out_workspace = arcpy.GetParameterAsText(2)

out_featureclass = os.path.join(out_workspace,
                                os.path.basename(in_featureclass))

arcpy.CopyFeatures_management(in_featureclass, out_featureclass)

and I got the following error:

Traceback (most recent call last):

  File "C:/Data/s2.py", line 14, in <module>

arcpy.CopyFeatures_management(in_featureclass, out_featureclass)

  File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\management.py",
line 2335, in CopyFeatures
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000735: Input Features: Value is required
ERROR 000735: Output Feature Class: Value is required
Failed to execute (CopyFeatures).


texts: Packing tiled rasters into a Geopackage in QGIS 3.0.3 whilst maintaining the colour

texts:
I have a folder containing 79 tiled Geotiff rasters making up a basemap of the UK. My goal is to efficiently store these in a Geopackage which already contains some vector data also used for base mapping.

The tiled images are all single band paletted images, and are 8 bit unsigned integers.

Here is an example segment:

So far I have tried merging all tiles into a mosaic using the merge tool in QGIS 3.0.3. I enabled the "Grab psuedocolor table from first layer" option and then tried selecting an appropriate data type. They did not have 8 bit unsigned integer so the closest I got was 16 bit unsigned integer (I am not sure if this messes things up).

I then used the translate tool to save it into the geopackage but the results come out as below:

Is it possible to nicely stored these into a Geopackage or is it not possible yet?


texts:
I have a group of shapefiles already loaded into QGIS.
How do I export them to a .shp, .dpf, and .shx file that I can put into a folder and load onto another instance of QGIS?


texts: how to show some markers on a static image using openlayers 3

texts:
I am trying to show some marker on the static image ie.

Given a static image of certain size in feet and set of point in feets how mark some image or a marker on the static image using OpenLayers 3.

I understand we have a provision in  OpenLayers 3 to use the static image as the base layer of the map.

I am not getting how to show the marker on the static image (base layer) for given certain plots on the image.

I am showing the static image as the map as shown below:

<!DOCTYPE html>

    <title>Static image example</title>

    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">

    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ol3/3.6.0/ol.css" type="text/css">

But I have no idea how to plot the markers the plots are JSON given to plot is some thing like below:

[{
   x:1.234,
   y:3.34,
   units:feet
},
{
   x:2.234,
   y:4.34,
   units:feet
},
{
   x:7.234,
   y:9.34,
   units:feet
}]


texts: Draw Map using JTS API And PostgreSQL database

texts: I use PostgreSQL for storing data. I want to create map based on it using JTS. I want to create geometry object from list of rows. Such geometry object to used as draw polygon,point etc.


texts: Arcobjects event on featurelayer symbology change

texts:
I am working on an Java AddIn project for ArcMap. I need to find the event when user changes the symbology for a layer added in TOC.

So far my best bet is to useIActiveViewEvents class on map, and read the symbology after every refresh of the map. That seems to work but does not sound efficient.

Is there anyway to add an event listner which listens on FeautreLayer`s symbology
Or
Is there a way to add event on legend
Or
is there a way to add an event on the IFeatureRenderer of the layer?


texts: Publish map with qgis2web with pop-up webimage

texts:
I'm want to publish with qgis2web my qgis project. The shapefile, point type needs to be a pop-up image, this image must be from Google Drive.

From Google Drive I made to image public and copy the image link to the atribute field is exactly this: https://lh6.googleusercontent.com/NattSenOrovPTKCV3xl7mN4HevVW_BIThT4t5Ew605fZDrT6QeFnftVtS8fJn1Vlg-7Wto-cnxe5WHI=w1920-h858

But result is only a weblink and not a nice pop-up image.

How do I solve it?

I use: Qgis 2.14, Windows, Chrome, Qgis2web 2.33 version (latest version)

Existing Q&As about this subject are:

Link QGIS attribute table with Web Image?
Displaying pop-up picture in QGISCloud?
Adding hyperlinks to pop-up data in qgis2web?


texts:
I'm trying to import a laz file in GRASS using the command:
r.in.lidar input=3dm_32_322_5593_1_nw.laz output=count_1 method=n resolution=1 -o -e -n
and get:

ERROR 6: EPSG PCS/GCS code 7837 not found in EPSG support files. Is this a valid EPSG coordinate system?

The projection is 25832 and I can open the file in QGis with LAStools without any problem.
Here a metadata snippet from the lasinfo tool:

GeoKeyDirectoryTag version 1.1.0 number of keys 5
key 1024 tiff_tag_location 0 count 1 value_offset 1 - GTModelTypeGeoKey: ModelTypeProjected
key 3072 tiff_tag_location 0 count 1 value_offset 25832 - ProjectedCSTypeGeoKey: ETRS89 / UTM 32N
key 3076 tiff_tag_location 0 count 1 value_offset 9001 - ProjLinearUnitsGeoKey: Linear_Meter
key 4099 tiff_tag_location 0 count 1 value_offset 9001 - VerticalUnitsGeoKey: Linear_Meter
key 4096 tiff_tag_location 0 count 1 value_offset 7837 - VerticalCSTypeGeoKey: Deutsches Haupthoehennetz 2016

To me it seems that GRASS confuses the projected and vertical CRS. Has anyone an idea how to fix the error or a workaround? Is there a way to skip the projection check (-o flag doesn't seem to work in this case) or to define the EPSG code any other way?
The dataset can be found here:
https://www.opengeodata.nrw.de/produkte/geobasis/hm/3dm_l_las/3dm_l_las/


texts:
I'm implementing a recipe from Paolo Corti's PostGIS Cookbook (by the way, a great help!) in order to import track points from multiple GPX files into a PostGIS table in two steps (pages 87-88):

1 Creating table by a query file

CREATE TABLE myschema.mytable(
    fid serial NOT NULL,
    the_geom geometry(Point,4326),
    ele double precision,
    "time" timestamp with time zone,
    CONSTRAINT activities_pk PRIMARY KEY (fid)
);

2 Importing multiple files with a batch

@echo off
for %%I in (Tracks\*.gpx*) do (
    echo Importing gpx file %%~nxI to myschema.mytable PostGIS table...
    ogr2ogr -append -update -f PostgreSQL PG:"dbname='db' user='me' password='pw'" Tracks/%%~nxI -nln myscheme.mytable -sql "SELECT ele, time FROM track_points"
)

My question is maybe a really beginner's question but I would like to include one column in the PostGIS table indicating the file's name, where each track points come from.

As far as I know, I may first consider a column for the file's name in the Query file (for instance using varchar(20)) but I don't know how to fill it in the second step.


texts: I need to create a map series that highlights a single tax parcel on a 800 scale map.  On the same map, I have a separate data frame that zooms into the highlighted parcel. I'm trying to get it to where DDP will zoom into each individual parcel in the second data frame. However it needs to zoom to the parcel, and adjust scale to always have a tight zoom on the given parcel. The main frame MUST stay at 800 scale, and the smaller should always be a tight zoom on the parcel. I'm not having any trouble on the main frame, but how using DDP can I get it to auto zoom in on the parcel in the smaller data frame? I've attached a map example of What it should look like.


texts:
I have placed coordinates in my map,but i want these in meters.
Please help me how to convert these.

    Simple Map

      html,body,#map{
      height:100%;
      width:100%
      }

      var map,overviewMapDijit;

  require(["esri/map",
           "esri/dijit/OverviewMap",
           "dojo/parser",
           "esri/geometry/webMercatorUtils",
           "dojo/dom",
           "dijit/layout/BorderContainer",
           "dijit/layout/ContentPane",
           "dojo/domReady!"], function(Map,OverviewMap,parser,webMercatorUtils,dom) {
    parser.parse();
    map = new Map("map", {
      basemap: "streets",
      center: [82.45, 22.75],
      zoom: 5
    });
    overviewMapDijit = new OverviewMap({
      map: map,
      visible: true
    });
    overviewMapDijit.startup();

    map.on("load", function() {

      map.on("mouse-move", showCoordinates);
      map.on("mouse-drag", showCoordinates);
    });

    function showCoordinates(evt) {

      var mp = webMercatorUtils.webMercatorToGeographic(evt.mapPoint);

      dom.byId("info").innerHTML = mp.x.toFixed(5) + ", " + mp.y.toFixed(5);
    }
 });
</script>


texts: Data layers with same coordinate system in QGIS 3.10 LTR are not aligning on basemap when redefining projection

texts: I was able to get the data layers lined up with the basemap using EPSG:102004 - USA_Contiguous_Lambert_Conformal_Conic. However when I re-define the projection to EPSG: 2246 the coordinates are way off. I'm doing this because most of our data is in the EPSG: 2246 NAD83 Kentucky North coordinates. Any thoughts on why this might be happening? Data is for Louisville, Ky.


texts: Why does the QGIS 'project properties' option disappear in Ubuntu?

texts:
For some reason my 'project properties' button has disappeared for good. I'm using Ubuntu 12.04 and QGIS 1.8.

Sometimes it would straight up disappear, to return later, but now its just 'gone'.

I'll try to re-install, but has anyone else noticed this?

I have uninstalled the QT framework (to combat some bugs in QGIS and Scribus).


texts:
I have made this map:

The intention of the map is to make it clear that the distances is shorter from Luleå than from Rome. As you can see that is not the case here.

Which ways are there to make that more clear? I've been trying to change map projections but that isn't possible for some reason? What projections is recommended?


texts: IndexError Out of bounds for Graphic Element

texts:
I have this error that I'm confused on how to resolve getting this North arrow graphic element from the map document.

Code:

result = arcpy.mapping.ConvertWebMapToMapDocument(Web_Map_as_JSON, templateMxd, noteGDB )
mapDoc = result.mapDocument
export(mapDoc, pdfPaths)

   # reset map variable to point to a new map document based on the mxd path passed into it
def getMap(templateMxdForPopup):
    global mapDoc
    del mapDoc
    print "Map Doc will be:" + templateMxdForPopup
    mapDoc = arcpy.mapping.MapDocument(templateMxdForPopup)

getElements(mapDoc)
#graphic element
def getElements(mapDocBeingPassed):
  graphicElm = arcpy.mapping.ListLayoutElements(mapDocBeingPassed, "GRAPHIC_ELEMENT", "north_arrow")
  if (graphicElm.count > 0):
    northArrow = graphicElm[0]

Error:

> Traceback (most recent call last):   File
> "C:\Workspace-TT\pythonprint\customPrint.py", line 248, in <module>
>     getMap(templateMxd)   File "C:\Workspace-TT\pythonprint\customPrint.py", line 178, in getMap
>     getElements(mapDoc)   File "C:\Workspace-TT\pythonprint\customPrint.py", line 221, in getElements
>     northArrow = graphicElm[0] IndexError: list index out of range
>
> Failed to execute (CustomPrint).


texts: How to calculate Lat,Long,Alt of a pixel in an Image where lat/long/alt corresponding to one of the pixels in the same image is known?

texts: I have an image taken using a mobile phone like the one attached below. Let's say that I know the location(lat/long/alt) from where this image was taken, which is probably the center of the red circle (lets say pixel x,y), annotated in this image. I want to have any suggestions on how to go about estimating the approximate lat/long/alt coordinates of the annotated traffic signal?


texts: Adding additional features to exported QGIS2web layer

texts:
I have created a QGIS2web map and deployed it via GitHub pages but would like to add an additional feature to one of the .js-layers:
{ "type": "Feature", "properties": { "Source": "Munster Express 1860-current, 03.08.1918; page 4 ", "Unit no.": "none ", "Function": "woodwork sub-depot (men's section) ", "Work party \/ supply depot address": "The Castle", "Town": "Carrick-on-Suir ", "Full Address": "Carrick-on-Suir Ireland ", "County (ancient)": "Tipperary ", "County (modern)": "Tipperary ", "Opened": "Jan. 1917 ", "Closed": "[1919] ", "Established \/ run by (last name)": "Rev. Canon Kellett (from Piltown, Kilkenny) ", "First and middle names": "", "Gender": "m ", "Marital status": "", "Collaborators": "" }, "geometry": { "type": "Point", "coordinates": [  -7.41306, 52.34917 ] } }

This breaks the map, so I am wondering where else I need to make changes.
The layer files are, of course, referenced in many other files, but I cannot find an instance where the individual features in the layer files matter, or where the number of feature per layer is counted. Any ideas?


texts: Calculate surface area from horizontal area and angle

texts:
I have a shapefile includes polygon features of tilted solar panels and I  used "Calculate Geometry tool" in ArcGIS to find out the projected area of solar panels (horizontal area).

I am looking for ArcGIS tool or an accurate algorithm to calculate surface area, assuming the tilt angle of solar panels is 40 degree.

I found the following formula:

Surface Area = Planimetric Area / cosine(Slope Angle)


texts: How to convert MultiLineStringZ object to MultilineString object?

texts:
I have CAD-data which I transformed to shapefiles. Currently after the transformation the objects still have a Z value which is useless to me.

My question is: How do I convert a MultiLineStringZ-object to a MultiLineString-object?


texts: Generating Hough transform (Hough line transformation) of binary image using QGIS

texts:
How do I generate a Hough transform (Hough line transformation) of a binary image in QGIS?

I tried in GRASS and I got Error: unable to fetch interface description for command
I found from the link: Many GRASS add-ons do not work with QGIS?, "if you want to use an add-on, you need to install GRASS GIS and not the version installed with QGIS which is designed to work with a QGIS interface (grass plugin and processing). The error means that the plugin cannot build his GRASS interface".
I tried r.houghtransform on GRASS GIS but it yielded no results. The raster file can be accessed with the following link: https://drive.google.com/drive/folders/1YL6m41eAGEMHhBDr8hjyHa906FSKgbNQ?usp=sharing
I followed the following steps in GRASS GIS but no results was rendered:
Step 1: Import raster data> Simplified raster import with reprojection [r.import]

Step 2: In Console: r.houghtransform

Step 3: r.houghtransform User Interface

Step 4: Select Run


texts: Parts of WMS layer are missing in layout export

texts:
I am having problems with the print composer. A successful printing do not always occur.
In particular, if the scale is high (e.g. 1:1.300.000), it always fails.
As you can see some parts of the map are missing.

If I work with lower scales the chance of a good result increases.

The underlying map is a WMS resource obtained from a regional institution.


texts: Identifying similar and crossing lines in the same layer

texts:
I have a single layer that contains similar geometry that may or may not cross, that is a result of imported geometry having a slightly different position.  I need to identify the geometry that is close (i.e. within 5m) or cross; below is an example of the data. This is showing data in the same layer, I have just displayed the problematic geometry in red which I need to identify.

I have a PostGIS solution for the geometry that crosses (B), which is shown below.

select row_number() over() as qgisid, a.geom as geom
from roads a inner join roads b
on st_crosses(a.geom, b.geom)

However, I am struggling to find a method for geometry that is very close to other geometry within the same layer (A).  Does anyone have any ideas on how to identify geometry similar to that marked as A?


texts: How to access BLOB file from database table published to ArcGIS REST service

texts:
I have published a query table that contains a BLOB field to ArcGIS REST and have not been able to access the images. I tried using esriRequest, but the response type that returns is text, and I think it should be image. I don't know if this is because there is something about the files the REST service doesn't like, or if I am missing something in the code. The images are currently being served out using PHP the query the SQL database. Here is the code I am trying to use to get the images:

var imageUrl = "https://ocean.floridamarine.org/arcgis/rest/services/.../MapServer/1/7";
    var params = {
        url: imageUrl,
        handleAs: "blob"
    }
    console.log("request params ", params);
    var imageRequest = esriRequest(params);
    imageRequest.then(requestSucceeded, requestFailed);
    function requestSucceeded(response, io) {
        console.log("esriRequest response ", response);
        var reader = new FileReader();
        if (response.type == "image/png") {
          //if working with image data
          reader.readAsDataURL(response);
          console.log("image response ", response);
        } else {
          reader.readAsText(response);
          console.log("reader response ", reader.readAsText(response));
        }
    };
    function requestFailed(error, io) {
       temp = temp + "

No Image Available
";
       console.log(error);
    }

The url points to this, but not sure if I should be seeing an image here:

Here is a screenshot of the console:

As you can see, the response type is text (should be seeing an image?)

What I am doing wrong? Is a better way to go about this?


texts: How can I change the date of a multitemporal layer on leaflet?

texts: I am creating an app where given a certain date, the app can return the multitemporal layer of that date. Is there a way to do that in leaflet?


texts:
I'm using GDAL. I have created a .HDR and .BIL file from a .TIF but I want to have .HDR file in format as it displays in GenBin not like default or EHdr or ENVI format.

My desired output:

{{{
BANDS:      1
ROWS:    6542
COLS:    9340
...
}}}

but the output I'm getting is like:

BYTEORDER      I
LAYOUT         BIL
NROWS          4096
NCOLS          4096
NBANDS         1
NBITS          16
BANDROWBYTES   8192
TOTALROWBYTES  8192
PIXELTYPE      UNSIGNEDINT


texts: Getting bad quality map when exporting as PDF?

texts:
When I export a map to PDF the points are blocky and not sharp, as you can see in the picture.

When I exported the map the first time it was sharp and stayed sharp when zooming in.

First I used the simpel marker symbol and now the character marker symbol from Esri. But when I use the simple marker symbol again it also becomes very blocky.

I already tried different export settings, but it only became worse.

I changed the transparency of a layer and this was the PDF result:

They are indeed sharp now, but the circles are still not circles.

Where can I find the problem?

I used the simple marker and now they are smooth and sharp, but some of them are oval..

What can I do about it?


texts: What to add as "measure" to a linestringM in PostGIS?

texts:
I am kind of new into the GIS world. I have a couple of GPS data in a CSV file as LonLat coordinates.

I used PostGIS to create points from those coordinates using ST_MakePoint().
Then I tried to recreate the route of those points using the ST_MakeLine() function. The output of the function is of geometry type Linestring.

So, I used a repository to map match the recreated route to the real routes on a map. However, that repository requires you to use geometry of type LinestringM. I come upon this post: Adding M coordinate with different measurings in PostGIS and it says to use the function ST_AddMeasure() to create the M dimension.

My question is: What do you use as dimension M? Do you use the length of the linestring between each GPS point? Can you use timestamp as a form of measurement? Is it any arbitrary measurement you want to define?


texts: How to start creating a map and exporting it as a raster MBTiles file

texts:
I am new to this whole GIS thing (my background is software-development, but not GIS) but I am super interested in making maps.
So I started playing around with TileMill and was making my first steps there.
Now I know the basics of where to get data from, CartoCSS, Elevation Data, GeoTiffs and so on...

My goal: A outdoor map as an MBTiles file with raster data in it. The data should cover parts of Europe.

Alright... I guess I should start by asking the following questions:

Tools:

Which tool would you suggest for that job?
  Would TileMill work?
  Will I have problems with TileMill2 if I want to render raster data? (Would this tool help?)

I need to add GeoTiff overlays as well. TileMill2 wont be able to do that right?
I also don't want to add the raster data on top of the rest, but as a layer in the middle.

I am on a Mac, so Tools that would run on my machine would be best :)
But if there is like THE tool for it that only runs on Windows or Linux I should be able to get my hands on it as well... Oh, and inexpensive/free tools are preferred

Data:

Where do I best get my data from?

When playing in TileMill1 I downloaded data from geofabrik. Now it seems as if the data isn't complete in there. Especially information about mountains... where there is forest and so on is pretty limited it seems...

So I went over to TileMill2 and started playing around there. The "Mapbox Streets V4" layer has quite some information in there... But then I get very little information about f.e. where buildings are.

Are there any other remote sources I can add to TileMill2? Some that are more suitable for an outdoor map?

Style my map:

In MapQuest when you zoom out you get this nice world map with sand in Africa, green in Europe, Ice at the poles.... how do they draw that? Is that the Humanitarian Data Model?

I already learned how to get elevation data and how to make it visible with gdal. Is this the way to go?
But then I would need a tool (like TileMill1) where I can add this raster layer. TileMill2 wont support that, right?

So many questions! Thanks in advance for any tips!


texts: How can I get raster layers to display when I switch to them, even if the zoom is too high for them?

texts:
I am using OpenLayers 3.15 and have an application that mostly does what I want it to do. However I do have a little issue with displaying some layers when I first switch to them.

You can see it if you go to http://mapping4ops.org/ShowMapsDev/M4OPS-index.html?OPS=HcN&Layer1=No%20layer, and zoom in 4 times. Now switch the base layer to eg Bartholemew, 1897-1907, and that layer does not display. I presume it is something to do with maxResolution and maxZoom for the layer, but I do not really understand these.

If you now zoom out 4 times, the layer displays, and if you zoom back in 4 times the layer remains displayed (fuzzily). I would like the layer to display when you first switch to it, even though it is fuzzy.

To do the switch in js I am using:

thismap.getLayers().removeAt(layerindex);
thismap.getLayers().insertAt(layerindex,layer);

I get the same problem with all of my raster layers (some served by tileserver on my own server, and others from geo.nls.uk), when the map is at too high a zoom level. They all appear when I zoom out enough and then remain when I zoom back in.

I have considered various ways to force the layer to display when I first switch to it, but not found one that works. I see applications that do not seem to have this problem, so how do I solve this?


texts: Extract values from raster using point data with buffer in R

texts:
I'm little bit worried, because of this:

  satellite_buffered <- raster::extract(satellite_raster, hila_FI_WGS84, buffer=7000)

If buffer is in meters the code works, but if I use degrees, it won't. Using degrees I will get only one raster value to each point. Raster is 0.05 degree grid and originally point data is 10km*10km grid (metric projection ETRS-TM35FIN and after transformation to lat/lon it is not any more a regular grid)

Data structures:

  str(satellite_raster)
  Formal class '.RasterFile' [package "raster"] with 13 slots

  @ projargs: chr "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"

  and
  str(hila_FI_WGS84)
  Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots

  @ projargs: chr "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"


texts: Seeking tool for mapping Metropolitan Statistical Areas (MSAs) to addresses

texts:
My team and I ran a series of zip codes from addresses within our data set against MSA to Zip Code data found on The Census' website here. We found that a relatively high number of the addresses did match, or potentially fall within the limits of any MSA. However, we want to verify that in fact the 1000 or so address that did fall within any MSA based on Census data simply do not lie within the geometric bounds of any particular MSA.
What tool could I use to verify this?
For example, If I have a series of addresses that I ran through an algorithm to retrieve their Lat Long points, I could use something like LatLong.net to verify the correctness of the said algorithm to some degree.
Is there an equivalent tool other than say using PostGIS and running the Lat Longs through a geometric comparison function within Postgres (Our database is a Postgres DB by the way)?
I am not well versed in PostGIS to know offhand how to use it to solve this problem.


texts: Georeferencing/rectifying multiple images of different shapes and sizes at once using ArcGIS for Desktop?

texts:
A couple of weeks ago I georeferenced a set of 7 scanned maps (.tiffs). Although the scans all have different shapes and sizes, the outline of all the maps on there is the same, and after having georeferenced them, the maps align quite nicely.

Today I found out that the southern area should be referenced differently. The same mistake has been made for all images: the northern part is allright for all maps, but the southern boundary of my maps should be shifted upwards a bit. I don't want to do the tedious job of aligning all tiffs by hand again.

Does anybody know if there is a way to rectify them all at once? Can I relate the tiffs in some way?


texts: Displaying operational layers in the overview map

texts: Does anyone have the code to display an operational layer within the overview map?


texts: Issue with GEOS not creating buffer correctly for use in Django

texts:
Currently in my django I use the following function to take a point, buffer it by 2000 meters, and produce a circle polygon:

updatequery = str("update table_events set event_geo = ST_Multi( ST_Transform( ST_Buffer(ST_Transform(ST_GeomFromText('POINT({0})',4326), 3395), 2000), 4326)) where table_events.source_id = '{1}';").format(geomstring, idstring)

This works great but I'd like to do this more pythonically through GEOS as opposed to passing a raw stringed SQL call to my Postgresql/PostGIS backend. I have tried the following code:

from django.contrib.gis import geos
from django.contrib.gis.geos import MultiPolygon
from datetime import datetime
lat = 34
lon = 38
center = geos.Point(lon, lat)
center.srid = 4326
center.transform(3395)
poly = center.buffer(2000)
poly.transform(4326)
entry = events(event_date=datetime.now(), event_geo=MultiPolygon(poly),value=99)
entry.save()

When I go into QGIS to look over the output I have a circle that is the size of the world. What am I doing wrong?


texts: Georeferencer - Transform is not solveable

texts:
I am attempting to georeference a plat map. As others have reported, after loading a .png or jpeg raster, the georeferencer reports that the transform is not solveable. I have created new mapfiles, and ensured that all CRSs and projections are consistent. I cannot find any duplicate points.
I had no issues digitizing another raster the last time I needed to. Here are the GCPs and some screencaps of the georeferencer and QGIS:


texts: How to uninstall and re-install a stable version?

texts:
I just posted about a DEM problem after installing the latest nightly build...now I am completely screwed.  I uninstalled the latest nightly build and associated files, hoping to resort back to the stable version, which had been working great...until my great idea of checking out the developer version.

I just want to get the stable version up and running again.  I thought I could just uninstall everything, then reinstall, then bingo...but it's not happening.  Maybe I am missing some files somewhere that I never deleted?  Any help would be most appreciated.  Just so you know, I am a computer idiot...only very basic skills when it comes to technical troubleshooting.

Oh, and I'm running Mac OS X 10.8 Mt. Lion on a 2007 intel based macbook pro.


texts: Non-uniform grid/raster/cell sizes in GIS

texts:
I'm writing Shapefiles through Fortran with success, writing points, lines, and polygons. The next step in this project (separate from the previous step) is to write grids such that each cell can be coloured to correspond to a value/field. Seems to me that a raster would do this perfectly, if my data was simply rectilinear (the Esri ASCII raster would be fitting). However, I'm working with curvilinear grids, and each cell does not have the same size as the next. Additionally, the grid might be rotated, depending on the location. For example, say I have a river that doesn't necessarily run just North-South. The grid is created based on the river and is rotated to match the river. Parts of the river that are especially twisty or have a varying river bed will have smaller or more cells to compensate. And then the grid would be coloured accordingly, depending on temperature, or salinity, or whatever. I'd be able to do this easily as well in Matlab or something but the client specifically wants to be able to view everything in ArcGIS 10.1/10.2.

I'm not sure how to go about this, I've tried searching this site and the internet, using combinations of words like 'non-uniform', 'curvilinear', 'cell sizes', etc. but I haven't managed to find what I need. I've attached an example image of what I'm working with and what I'm looking for. Notice that the cells are not all the same size and are also at an angle.

I would have added tags like 'non-uniform grid' or 'curvilinear' but I can't yet, so hopefully this sentence helps with searchability.


texts: Do you know any free available books related to GIS ?


texts: Interpolating SpatialPointsDataFrame to RasterLayer using autoKrige in R

texts:
I have a SpatialPointsDataFrame with elevation data and 51'257 elements. I also have a RasterLayer object of dimensions c(114,210) covering roughly the same area (all the spatial points are within the raster). I now would like to interpolate the spatial points to a grid of the same size and resolution as my RasterLayer object. In particular, I would like to use the automap::autoKrige() function to do so.
Here is how I proceed:
# generate dummy data:
x.vals <- runif(n = 51257, min = 2603330, max = 2608098)
y.vals <- runif(n = 51257, min = 1135929, max = 1138178)
elevation.vals <- rnorm(n = 51257, mean = 0, sd = 1)

# make a SpatialPointsDataFrame from dummy data:
elevation.spdf <- SpatialPointsDataFrame(coords = cbind(x.vals,y.vals),
                                       data = data.frame(elevation.vals),
                                       proj4string = CRS("+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333 +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel +towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs"))

# generate a dummy raster:
my.raster <- raster(nrows = 114, ncols = 210, xmn = 383187.5, xmx = 388437.5,
                    ymn = 5136362, ymx = 5139212, vals = NULL,
                    crs = "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0")

# reproject the SpatialPointsDataFrame to the target raster projection
elevation.spdf.reproj <- spTransform(x = elevation.spdf, CRSobj = CRS(my.raster@crs@projargs))

# create a new_data object of type sp to be used in the autoKrige() function:
spatial.points <- SpatialPoints(coords = coordinates(my.raster),
                                proj4string = CRS(my.raster@crs@projargs))
spatial.grid <- SpatialPixels(points = spatial.points)

# now do the interpolation:
automap::autoKrige(formula = elevation.vals ~ x.vals + y.vals,
                   input_data = elevation.spdf.reproj,
                   new_data = spatial.grid)

However, when I do that, I get the following error from the autoKrige function:
Error in locs[valid.pattern, ] : (subscript) logical subscript too long
In addition: Warning messages:
1: 'newdata' had 23940 rows but variables found have 51257 rows
2: 'newdata' had 23940 rows but variables found have 51257 rows

It seems that my SpatialPointsDataFrame has too many elements.
Alternatively, I tried the approach described here, producing a convex hull around my spatial points to interpolate to. However, I get a similar error message:
automap::autoKrige(formula = bedrock.vals ~ x.vals + y.vals,
                   input_data = elevation.spdf.reproj,
                   new_data = create_new_data(obj = elevation.spdf.reproj))

Error in locs[valid.pattern, ] : (subscript) logical subscript too long
In addition: Warning messages:
1: 'newdata' had 5006 rows but variables found have 51257 rows
2: 'newdata' had 5006 rows but variables found have 51257 rows

My intuition is that my SpatialPointsDataFrame is too large (larger than the grid I want to interpolate to) and therefore the Kriging fails. I tried randomly thinning my SpatialPointsDataFrame, but the same problem still occurs when the number of elements is lower than the number of cells in my.raster. Curiously, the autoKrige seems to work when I thin the SpatialPointsDataFrame to exactly 23940 elements, but the computations take forever (I aborted after 36 Minutes).
I am aware of the explanations provided here and here, but they both do not use the autoKrige() function.
Does someone have an idea of what is going on here and how to solve it?
System information:
R version 3.6.2 //
RStudio version 1.2.5033 //
Mac OS 10.14.6


texts:
I have a shapefile with 1475 records, and I want to generate a shapefile for each record.

What can I do to generate them avoiding selecting and exporting each record to do that?


texts: QGIS split line into segments on polygon

texts:
Is it possible in QGIS to split a line into segments given which polygon it falls within? I am using 2.8.

For example, a line that passes through three polygons will become three separate lines. Each time it crosses from one polygon into another it'd become a new line.

So in this case, where the green is a line, I would like to split it into three separate lines. Once for each time it crosses the black border of a polygon.


texts: Projections for a region spanning multiple UTM zones

texts:
I have a problem which is sort of similar to the one here:

Dealing with data that spreads across UTM Zones?

Essentially I am looking for a projection for this region:

https://www.openstreetmap.org/export#map=10/57.7910/12.3253

The projection should have as little distortion as possible so I can use geospatial data structures. I tried using UTM, but the rectangle spreads across the zones 32,V and 33,V. Could you recommend some other projection? More generally, do you know how to get a good projection for an arbitrary bounding rectangle?

Is there a projection which is already implemented in jscience or a similar library?


texts:
I am wanting to use the LANDFIRE rasters in QGIS, but I cannot get all the files to load.  I load the w001001.adf file in the directory that contains the data, but I cannot access the attribute table, change the style, etc.

I have searched around in Google and have not found an answer.

Happy to give more info!


texts:
I have bunches of .csv.gz file and want to convert into GeoTIFF format.
the csv.gz file contains information as below
Line 1: Date/time
line 2: latitude
line 3: longitude
line 4: col
line 5: row
line 6: the resolution
line 7: scanning rotation
line 8: angular angle
line 9 and below: data
and this the view of the data in CSV format

I do unzip all the files via the bash script. I try using gdal_translate to convert into GeoTIFF but unsuccessfully.
gdal_translate -a_srs EPSG:4326 -co "COMPRESS=LZW" -co "PREDICTOR=2" ${FNAME}.d ${FNAME}.tif
the error: RT_20180909_000_004.d not recognized as a supported file format.
How can I solve this?


texts: How to add another layer to GeoPackage in QGIS?

texts: QGIS 2.12 has support for saving a layer on the map in the GeoPackage format and that is great. However, I don't see a way to add another layer to the GPKG file, even though GeoPackage supports multiple layers. Is this functionality that is yet to come in QGIS or is there a way to do  it with QGIS 2.12?


texts: Performing supervised classification on Sentinel images

texts:
I'm looking for python code which predicts the LULC of my data(other raster files apart from refernce data band1, band2 and soon) using svm classifier with rbf kernel based on reference data (truth data shapefile). Values underneath band columns are pixel values of different raster files corresponding to that particular point geometry( band1, band2... are my different raster files, Class 1 indicate land use and class 2 is vice-versa).
ref_data =gpd.read_file(MyGeometries.shp)
ref_data.head()
    lon           lat        band1                band2      band3       band4 class geometry

0   72.144033   15.837863   1.069935e+09    -14.396156  -20.063754  -20.359174  2   POINT (72.14403 15.83786)
1   72.144165   15.837762   1.072870e+09    -14.444141  -20.558783  -20.649671  1   POINT (72.14416 15.83776)
2   72.144086   15.837899   1.069935e+09    -14.396156  -20.063754  -20.359174  1   POINT (72.14409 15.83790)
3   72.143932   15.837984   1.069935e+09    -14.396156  -20.063754  -20.359174  2   POINT (72.14393 15.83798)
4   72.144117   15.837962   1.070610e+09    -14.383173  -20.112496  -20.536721  1   POINT (72.14412 15.83790)


texts: Polygonize function doesn't overlay the shapefile over the raster file

texts:
To convert the raster into a shapefile I use raster->conversion->polygonize but QGIS doesn't open the new layer overlayed the first (the raster) but reflected above it.

I read this question Polygonize problem but it is incomplete and there are no solutions. I've changed CRS I used EPSG:4326 for both or User Defined but nothing...

I've changed image format, .tiff .jpg, nothing!

This is the original .bmp file:

These are the metadata of the shapefile:

General:
Storage type of this layer: ESRI Shapefile
Source for this layer: gisprovavector
Geometry type of the features in this layer: Polygon
The number of features in this layer: 2
Editing capabilities of this layer: Add Features, Delete Features, Change Attribute Values, Add Attributes, Delete Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries
Extents:
In layer spatial reference system units : xMin,yMin 0,0 : xMax,yMax 962,500
Layer Spatial Reference System:
+proj=longlat +ellps=WGS72 +towgs84=0,0,1.9,0,0,0.814,-0.38 +no_defs

I use QGIS 1.8.0 in Windows XP!


texts: Print Composer with semi-transparent raster but full opacity in legend

texts: I am trying to make a map with a semi-transparent (60%) raster layer overlying an areal photo (raster) base map.  This works fine and looks good but when I add a legend to display the values of the raster overlay, the legend items for the associated raster are transparent as well and end up looking like pastel versions of the colors in the raster.  Is there a way to make the legend items fully opaque while the raster is semi-transparent?  See the image below and note how red shows up as pink etc.


texts: Determining area of county land mass without water features using ArcGIS Desktop?

texts:
Here are the layers that I have:

State / Province polygon file (With Area Field)
County / Ward polygon (with no area field), but all the polygons are within the state boundaries
Water ways for the whole province / state. (includes rivers, lakes, creeks, brooks, etc) with no area fields

Here is what I want to do:

Determine the gross land area of counties without the rivers and lakes.

Notes:

The area doesn't have to be extremely precise (nearest 5 sq km is fine with me)
Has to work on ArcMap


texts: Any example for Google like the Bing OpenLayers examples?

texts:
I would like to restrict zoom levels in OpenLayers for a Google Map.  A Bing example shows how to limit the extent of the Bing tiles:

var road3 = new OpenLayers.Layer.Bing({
    name: "Road tiles with 3 zoom levels",
    type: "Road",
    key: apiKey,
    maxResolution: 76.43702827453613,
    numZoomLevels: 3
});

But I cannot find a Google example which does this same thing in OpenLayers.

Found OpenLayersAndGoogleMapOverlays but didn't work.  I used it to build this Fiddle which also doesn't work.


texts: Applying mask to Kriging shape in ArcGIS Desktop?

texts:
I'm trying to apply an mask to a Kriging image for after apply a Density Sampling Network, but unfortunately I'm not getting good results.

I tried to apply on mask on Density Sampling Network and is the same that apply nothing the tool runs for all Krinhing model.

Some one have an idea how to do that using ArcGIS Desktop??


texts:
My problem is that my CRS will not change. I have looked at all the other posted questions regarding a similar problem. However hopefully the screen shots provided will indicate my issue.

Figure 1 --> I downloaded a shapefile with the orginial CRS of OSGB 1936 / British National Grid

Figure 2 --> The data plots bird densities and I want to create a buffer around the selected feature (yellow point) with the Map units selected as either Meters or Kilometers

Figure 3 --> This indicates that in its Original CRS form the Buffer will display the Map units in Meters

Figure 4 --> I know I need to change the default CRS, so I click on the data point --> Export --> Save Feature as

Figure 5 --> I change the default CRS from OSGB 1936 / British National Grid to EPSG:4326 - WGS 84 and save it

Figure 6 -->

Figure 7 --> This identifies the bottom shapefile (is the orginal), the middle (is the saved shapefile in the new CRS) and the top shapefile (I uploaded manually, however is the new shapefile CRS as well)

Figure 8 --> When I now open the buffer and input the new shapefile in the WSG84 CRS which I require. the distance Is only available in degrees. Does anyone know what I am doing wrong? Are my CRS projections not changing? I am confused if they are not as my newly changes CRS shapefiles are data points lie in the exact same position as the original data.


texts:
We currently have a Windows Presentation Foundation (WPF) application that is using the WPF runtime SDK to display and handle base maps and data maps. By default we always place the base map at the very back of the map control. The issue we are encountering is the base map has grids like (township etc.) but when other map service are added (for polylines and polygons) the grid names and lines are overlapped with it but we need to be able to see the grid names and lines. We have tried updating the polygon's transparency but it still overlaps the base map.

My question is, if there are any other way to handle the transparency between map services?

Worst case scenario is that we have to publish both the base map data and other data in to one map service and handle the transparency through the layers.


texts:
I am trying to install r.roughness in GRASS 6.4.3.
It starts compiling but at the end I get this error:

ERROR: Module did not install properly

I cannot identify the problem.
Can somebody that has come across the same error help me?


texts: Fixing Histogram selectionChanged from Carto Airship 1.04 to 2.00?

texts:
I have spent quite a bit of time playing around with this generous example provided by Jorge Sanz of Carto:

https://gist.github.com/jsanz/8025628d669f1d9d0647f658f5511774

One thing I've gotten stuck on that I can't seem to resolve is updating the version of Airship that is being incorporated from 1.03 to 2.05.

Based on a review of the changelog it seems that a "breaking change" occured in version 2.00 regarding "Histogram selectionChange" in order to allow category histograms as well as numerical. I'm guessing this is the change that is breaking Jorge Sanz's example above [when referencing the new airship.js], but after several evenings of trial and error I figured I'd reach out for help.

If I had to guess I believe the issue is either in lines 31-38 of vue-component-histogram.js  :

        widget.addEventListener('selectionChanged', event => {
            this.$emit(
                'selection-changed',
                event.detail !== null
                ? event.detail
                : []
            )
});

or lines 65-68 of vue_config.js

            if (this.population.selection && this.population.selection.length == 2){
                const [minSel, maxSel] = this.population.selection;
                filterConditions.push(`between($pop_max,${minSel*1e6},${maxSel*1e6})`);
}


texts: how to make mapnik style raster, not just render as solid color

texts:
I have set up Mapnik with mod_tile and renderd.  I replaced the default osm.xml file with my own xml file, which is shown below.

My problem is that all images are being created as solid blue tiles as per the #8db0d3 background-color param in the xml file.  I can change that, and the tiles will change their colors, so I know that the setup is paying attention to the xml file.

What do I need to do to make Mapnik render tiles for the specified Layer according to the given Style, and not just as a default solid background color?  I expect solid-color tiles for most of the world, just not for the small area along the Connecticut coast that the given image details.

I feel like it might have something to do with the srs parameter to the map and/or layer, but I am not sure.

I can run a python script using this xml file and the output image is colored appropriately, so it would seem to be something to do with the interaction with renderd/mod_tile

Also, for what it's worth, I do not have any OSM data downloaded...though I wouldn't think that would stop it from working.

<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" background-color="#8db0d3" maximum-extent="-20037508.34,-20037508.34,20037508.34,20037508.34">
  <Style name="DISCRETE RAINBOW">
    <Rule>
      <RasterSymbolizer>
        <RasterColorizer default-mode="discrete" default-color="yellow" >
            <stop color="red"    value = "0"  />
            <stop color="orange" value = "5"  />
            <stop color="yellow" value = "10" />
            <stop color="green"  value = "15" />
            <stop color="blue"   value = "20" />
            <stop color="indigo" value = "25" />
        </RasterColorizer>
      </RasterSymbolizer>
    </Rule>
  </Style>

  <Layer name="dataraster" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
      <StyleName>DISCRETE RAINBOW</StyleName>
      <Datasource>
          <Parameter name="file">/data/srtm/n41w073.hgt</Parameter>
          <Parameter name="type">gdal</Parameter>
          <Parameter name="band">1</Parameter>
      </Datasource>
  </Layer>

</Map>


texts: QGIS 2.14.9 refuses to open GeoPackage file

texts:
I tried to open in QGIS 2.14.9 a .gpkg file but this action resulted in an error message stating that the file is not a valid or recognised data source. However, QGIS includes support for the GeoPackage format, it can see the file listed in its directory when I choose this type of file in the "Open" window (for vector layer) and lets me select it to perform the "Open" action.
Any ideas about what may be wrong? The file in question has been downloaded from this service:
https://land.copernicus.eu/pan-european/corine-land-cover/clc2018?tab=download
(SQLite Database option)


texts: Convert WGS84(DD) to British national grids

texts: I have received a couple of GIS layers with WGS84(DD) and GCS_WGS_1984 Geographical Coordinate System (GCS). I used Arcmap to convert GCS_WGS_1984 to British National Grids using Petroleum transformation to get an accurate conversion and no problem. But when I tried to convert WGS84(DD) to British National Grids, I could not select the Petroleum transformation as the  parameter list  menu was empty and I got a warning massage said “A datum transformation is expected, but the parameter is empty”. “No transformation was found based on the input and output coordinate system and the extent of data”. Any idea how to solve this issue and get accurate transformation between WGS84(DD) and the British National Grids?


texts: Database Connection window inaccessible in background / hidden

texts:
I have built an ArcGIS script tool that requires a connection to an external SDE geodatabase. When the script starts, it must first connect to that external Oracle database via the "Database Connection" window, which pops up briefly, but gets "grayed out" as soon as you try to fill in the credentials:

I have checked the "Always run in foreground" option for the script tool, but this doesn't fix the problem.

Any suggestions to fix this, either via the script tool properties or in the script itself?

Here are the relevant sections of code:

arcpy.ClearWorkspaceCache_management()
arcpy.env.workspace = wrkSpcBCGW

#create variables for SDE Features Classes:
vri = r"Database Connections\BCGW.sde\WHSE_FOREST_VEGETATION.VEG_COMP_LYR_R1_POLY"
forCov = r"Database Connections\BCGW.sde\WHSE_FOREST_VEGETATION.RSLT_FOREST_COVER_POLY"
rsltOpen =r"DatabaseConnections\BCGW.sde\WHSE_FOREST_VEGETATION.RSLT_OPENING_SVW"


texts: GDAL: Get Feature Names of intersecting Shp-Files

texts:
I am looking for all Featurenames in a shapefile (shp2) which intersect with a given Featurename ('MyFeatureName') in another shapefile (shp1).
The following code works (python), however I am wondering - instead of looping through all features of shp1 and shp2 - if there is an easier/faster way to achieve this?
from osgeo import gdal
import ogr

vector1 = ogr.Open(path_to_shp1)
vector2 = ogr.Open(path_to_shp2)
layer1 = vector1.GetLayer()

for i in range(0, layer1.GetFeatureCount()):
    feature1 = layer1.GetFeature(i)
    if str(feature1.name) == 'MyFeatureName':
        vectorGeometry1 = feature1.GetGeometryRef()
        layer2 = vector2.GetLayer()
        for j in range(0, layer2.GetFeatureCount()):
            feature2 = layer2.GetFeature(j)
            vectorGeometry2 = feature2.GetGeometryRef()
            intersection = vectorGeometry1.Intersection(vectorGeometry2)
            wkt = intersection.ExportToWkt()
            if str(wkt) != "GEOMETRYCOLLECTION EMPTY" and str(wkt) != "POLYGON EMPTY":
                print(feature2.name)


texts: Stopping javascript apps overwriting auto calculated field values?

texts:
I have a feature service with an SOI. The SOI automatically calculates some field values for new features. The SOI itself works fine. However arcgis online maps are not aware of the autocalulated fields after a new feature has been created, the attributes show up null values. It takes a map refresh or several pans for the new attributes to show up. Worse still is that if an editor updates the new feature before it has been refreshed from the server the autocalulated values are overwritten back to null.

Is there a way to force apps to not cache layers after an edit? I also looked at the responseProperties parameter of the SOI request handler but from what I can see the only options are success or failure, there is now way to pass the updated feature.


texts: Are there open source alternatives to ArcCatalog?

texts: I'm looking for open source alternatives to ArcCatalog. The software should run on both Win and Linux and support the usual file formats (shp, kml, gml, ...) and databases (especially PostGIS, additional SpatiaLite support would be great). I'd like to browse and search for datasets and probably rename (renaming all parts of a shapefile at once) and delete files.


texts: 32 bit QGIS 2.10 Problems with GDAL WMS TMS Google Maps layer

texts:
I have been using GDAL WMS layers to view various base maps in QGIS. I am using this technique rather than OpenLayers because with this I can reproject GDAL WMS layers as needed.

When I get close to the max zoom on my Google layer my images become discolored (sometimes all in blues, other times yellows).  I have checked my layer settings to ensure that my color band settings are correct.

I only have this problem when using a Google Maps layer, I have not seen any problems with other GDAL WMS layers.

I have checked for this problem in both the 32 bit and 64 bit versions of QGIS on multiple Windows 7 computers.  I only observed this problem on the 32 bit version.

Also is there any way to make QGIS log my tile requests?

The layer XML is below:

<GDAL_WMS>
  <Service name="TMS">
    <ServerUrl>http://mt.google.com/vt/lyrs=y&amp;x=${x}&amp;y=${y}&amp;z=${z}</ServerUrl>
  </Service>
  <DataWindow>
    <UpperLeftX>-20037508.34</UpperLeftX>
    <UpperLeftY>20037508.34</UpperLeftY>
    <LowerRightX>20037508.34</LowerRightX>
    <LowerRightY>-20037508.34</LowerRightY>
    <TileLevel>19</TileLevel>
    <TileCountX>1</TileCountX>
    <TileCountY>1</TileCountY>
    <YOrigin>top</YOrigin>
  </DataWindow>
  <Projection>EPSG:3857</Projection>
  <BlockSizeX>256</BlockSizeX>
  <BlockSizeY>256</BlockSizeY>
  <BandsCount>3</BandsCount>
 <Cache>
<Depth>2</Depth>
<Extension>.jpg</Extension>
</Cache>
</GDAL_WMS>


texts: how to overlay GPX data on rasters in QGIS

texts:
Possible Duplicate:
  Overlaying GPX data on rasters in QGIS

When both layers are displayed in QGIS, they are not even visible in the same display. The coordinates displayed for each are wildly different and are not of the same magnitude. how to solve that problem?


texts: Show only features within current Atlas feature

texts:
In QGIS 2.14 is there any way of just showing features within the atlas from another layer. In the image the atlas feature is the red "Estates" layer and the blue buildings are the "buildings" layer.

I have created over 30 plans showing different estates. I wish to only see the buildings that are within the estates boundary and none of the others. Is this possible?


texts: Standalone program for converting coordinates in shapefiles

texts:
Does anyone know of a standalone program that will convert the coordinates in a shapefile to another coordinate system?
By this I mean a program outside of a full GIS package. I have customers who need to convert shape files from one coordinate system to another so the file can be displayed in one of my company's programs. I know that there are several shareware GIS programs that can do this. But I am trying to avoid having to help my customers install and learn how to use a whole GIS package just to do coordinate conversions.
My ideal program would be one where the user points to the shapefile, picks the target coordinate system, then the program writes a new shapefile, using the target coordinate system.


texts: How to select landlocked countries in Africa using Select By Location?

texts:
I wish to select the landlocked countries in Africa using just Select by Location.

I have already dissolved the boarders to get one big polygon and I thought I might combine these two telling ArcGIS somehow that I just want the countries to be selected that are not touching the outside borders, but how can I do the next step?


texts:
I'm new with CityEngine and I'm currently trying to alter the display of a point dataset which are representing a number of sensors.

I am unsure of how to alter their height (obviously I don't want to extrude them) and also how to change the size! They are tiny! I've attached a screen shot as an example. I can't find much information on the internet for this...

As you can see, they aren't very well displayed! I have had to highlight one to make it obvious where they are, the rest look like specs.

I have also attached a screengrab of the attributes.


texts: Adding points along the centre lines with QGIS

texts:
I'm trying to solve a spatial problem in QGIS. I have a set of polygons which I would like to add points along the centre line of each polygon. These points should be placed at 3 metres between each other. I've used different tools such as 'Points along geometry' or a plugin called 'QChainage' but the result is what you see on the picture below.

Could you help me with this?

Either using a tool/plugin in QGIS or a script in python that I can save anywhere.


texts: Using memory layer for processing algorithms in QGIS 3

texts:
I would like to run a processing algorithms in QGIS3 with a memory vector layer as result.
When I define the memory layer as shown in the following, I get the error

Incorrect parameter value for output

while in the Python Error window output is indicated as QgsVectorLayer and nodesLayer.isValid() returns True:
   crs = str(inputLayer.crs().authid())
outputLayer = QgsVectorLayer('Point?crs=' + crs , "points", "memory")
processing.run('grass7:v.net',
                {"input":inputLayer,
                 ...
                "output": outputLayer})

If I use a path to the output layer, everything works fine:
   outputLayer = r"path_to_file\output.shp"
processing.run('grass7:v.net',
                {"input":inputLayer,
                 ...
                "output": outputLayer})

Any idea on how to correctly create a memory layer in QGIS 3?


texts: Added shapefile is not visible when I zoom

texts:
The CRS on all three layers are the same. I have tried deleting the PRJ file and reloading. I have also tried Vector> geometry tools> check validity with no errors.

]1


texts: Deleting empty Geometry in shapefile using GDAL command-line GDAL utilities?

texts: How empty geometries be deleted from shapefile using the command-line GDAL utilities?


texts: Spatial Analysis - Identifying Regions with Common Boundaries

texts:
I have the shape file for DC PSA's as defined in 2012 (see below).  I would like to be able to identify in semi-automatic fashion which PSA's are neighbors - that is, which PSA's are nearest neighbors to one another (for example, 201 and 401 are nearest neighbors).

With this information, one could define a sort of spatial distance metric between PSA $i$ and PSA $j$, call it $d(i,j)$, populating a distance matrix, call it $D$.  Then $d(i,j)=0$ is pure autocorrelation (it is the diagonal of $D$).  If $d(i,j)=1$, you have nearest neighbor spatial autocorrelation.  One can then handle $d(i,j)>1$ separately.  With certain physical systems this seems like a simplistic but natural way of thinking about distance.

Does anyone know of a simple way to be able to calculate $d(i,j)$ as define here, without doing it manually?


texts:
I want to take a network of roads and lanes and reduce them to a schematic that shows their relationships but not their geographic shape.

A similar concept has been used for the London Underground map where the distances between stations are not too scale, it simply shows their relationships by vertices.

In my ideal world the roads would snap to a horizontal/vertical grid and the distances between them normalised. I am a Postgis/QuantumGIS user and want to know which tools or capabilities I should use to (for example) create a grid from Openstreetmap way data?

I also have access to ArcGis but no experience in using it.


texts: Why does ArcGIS Pro write a PDF file with some basemap images visible while other basemaps are not, depending on layout paper size?

texts:
I'm using ArcGIS Pro 2.5.1
The single layout in the aprx has four map frames, three small ones nested inside a large, whole-page map frame.  When I export to PDF (or to EPS, then Distiller to PDF) the result shows the basemap in the small map frames, but the large map frame does not have the basemap.  The basemap image that I am using in all of the map frames is Bing Maps Road.  In ArcGIS Pro it looks fine - all appropriate layers on checked On for visible.  However, when I check the layers (using Acrobat XI) the basemap layer for that data frame did not get written to the PDF, though the basemap is of course present and visible in the other data frames.
With more experimentation I see that it is explicitly about size.  If I lower the paper size of the layout from 158" to 140" then the basemap shows up.  However, last week I successfully produced some PDFs for maps that were 175" that had more map frames and similar amount of vector data.


texts: Is there a similar Esri "load data tool" on Postgres/PostGIS?

texts:
I have a remote PostGIS DB and tables with permissions and users, containing data that is being published on GeoServer; and in the office locally, we have an ESRI corporative GDB that is being updated constantly, so now I have to "update" the features on Postgres DB using the updated shape that I export from ESRI GDB.

In ArcCatalog we just erase/delete all the features inside a featureClass and then use the "load" (right click) tool to load all the features from other layers(shape, personal/file/corporative gdb) inside the featureClass. I need to know:

If there's a way to do something similar with QGIS to "load" features from a layer/table inside another layer/table?

Or do the same directly on Postgres tables using PGAdmin?

I shouldn't delete the PostGIS table and use the shape loader since the table is being published and has its own permissions and I think its a mess to "delete and use shapeloader" every time we need to update it.

One option is to open both layers on QGIS and erase all the features in the PostGIS layer and then select and "copy/paste" features from the updated shape but its impossible since QGIS collapsed if you try it with more than (for example) 8.000 features at a time and the layers have ~80.000 features. So doing copy/paste in  "small bites"  is time consuming, like spending a half-day selecting/copy/paste and saving...


texts: How to convert CSV file with coordinates to rectangles (geometry) in FME

texts:
Given four coordinates in csv file representing a coordinate system like this:

How can I use data from the table to create rectangle dataset using FME. The dataset should have one feature per line in the csv-file.


texts: Adding site photos to a print composer atlas in QGIS

texts:
This is the first time in over three decades of existence that I cannot find an answer and I actually have to ask one for myself, so please accept my apologies for any formatting issues or lack of clarity.
I have made a point layer using this guide https://www.fulcrumapp.com/blog/photos-in-qgis to import my geotagged photos so they have a Field of View cone. I've labelled them with the photo file name.

What I'd like to do is make a reference appendix that has the resized photos in a print layout that automatically populates the photos in an image with a text box referencing the file name per the below.

Then have it auto populate the text box with the file name of the photo.
I cannot seem to find a guide to make this, but I think it's been done before.


texts: Label and symbol with condition in layer properties under style tab

texts:
I have forest areas. I want to put tree.svg with condition.

Layer properties-> style-> background -> shape ->svg

Something like this:

if (myfield<1300 , then show, C:/PROGRA~1/QGISLY~1/apps/qgis/./svg/gpsicons/tree.svg

if (myfield>1300 and <2000 , then show,C:/PROGRA~1/QGISLY~1/apps/qgis/./svg/symbol/landuse_coniferous_and_deciduous.svg

if (myfield>2000 and <3000 , then C:/PROGRA~1/QGISLY~1/apps/qgis/./svg/symbol/landuse_coniferous.svg

I don't know to make code under expression string builder


texts: What is the purpose of having a separate Layer property for sphericalMercator?

texts:
The Beginner's Guide to OpenLayers 2.10 says the following:

  sphericalMercator {Boolean}

  This property determines if the map should behave as a
  Mercator-projected map. Setting this to true will allow us to use
  other layers, such as Vector layer, with the actual map projection.

Given that there is already a method where the projection is specified, i.e. in map.projection, why is there a need to specify the same thing over again in the Layer property? Is there a situation where a different projection is required in Layer as compared to the map?

Or do they serve totally different purpose?


texts: Index of field layer where I have the layer ID PyQGIS 3

texts:
I am trying to get the field index of a layer that is input using add vector parameter
self.addParameter(QgsProcessingParameterVectorLayer('Elevationpoints', 'Elevation_points', types=[QgsProcessing.TypeVectorAnyGeometry], defaultValue=None))

This seems to return the layer ID rather than the path. Something like this:
'Elevationpoints_ad0ce945_8f93_4e0e_8fe7_5b053ef287dd'

In the console I get the correct result if I run this with the path-
vlayer = QgsVectorLayer('C:\Elevationpoints.shp')
index = vlayer.fields().lookupField('Lidar')
print(index)

By if I try to use the layer ID from the console or the script GUI I get -1 meaning the field was not found.
How can I get the field index from the layer ID?


texts: Why do moving window neighborhood analysis when building habitat model using ArcGIS Desktop?

texts:
I am currently developing a habitat model within ArcGIS Desktop for coyotes as a final project. One of the papers I read for my research did something similar, but they used a moving neighborhood analysis, setting the size of the neighborhood as the common home range for coyotes in the area.

I had no plans of doing this, my plan is to just use the finest resolution cell size as I can; I am curious though, what is the benefit of this?

I'm not really following how grouping up cells within a certain radius and adding there values together is any better than just evaluating each cell individually, could someone explain?


texts: Can OpenGeo Suite be deployed in production environment (using WAR package) for free?

texts:
Is there a possibility to use OpenGeo Suite in production environment (using the WAR package) for free?
Actually we are planning to deploy on a glassfish (alternatively Tomcat) container openGeo Suite. In a first step we think we can manage to set everything ourselves, thus we don´t need any support of OpenGeo. The pricing for the WAR package with glassfish costs 45000$ and what I understood it is only for the support. Can we get the WAR package for free if we don´t need any Support?


texts: QGIS spatial sampling tool for existing points within a polygon ensuring even spread

texts:
I would like to spatially sample 10 existing points from within a polygon. I have read the answers from "QGIS point sampling tool really slow for polygons?"; "points within a polygon" as well as "How to randomly select from existing points within each polygon"

I would like the sample to ensure even spread across the entire polygon (i.e. I don't want 10 randomly sampled points within one corner of the polygon). I have tried 'vector - research tools - random selection', which does randomly select 10 points, but does not ensure even spread of the entire polygon.

Does QGIS have a tool that can do this?


texts: Splitting lines at intersections in PostGIS

texts:
I have oriented polylines (Montreal's train network) and stops (train stations).

My network looks like this:

(closer look):

I'd like to split my tracks at each stations and ideally add fields FromStation, ToStation to my new Train tracks table.

I've used ST_Snap to snap my points to my tracks so there's an intersection. There's no guaranty though that there's a node where it intersects.

I tried some variation using ST_Split. No error, but no results either. Just empty geometry in the end.

My data comes from the gtfs, so for now, I have a shape_id, trip_headsign and route_short_name on each line.

If I could have a resulting table like

shape_id fromstation tostation
2_1      VRM1B       SLR3B
2_1      SLR3B       SLR2B
2_1      SLR2B       SLR1B
etc.

(shape_id 2_1 is the blue line west bound), that would be ideal.

I need somehow to use that to create a personnel allocation model for our inspectors and agents on the network. Each segments will be considered a road in Network Analyst with usage restriction to match the train schedule at each train station... Never found anything like that done, but I've been given the task to at least try.


texts: Field Calculator operation is not working

texts:
I've done this 100s of times and I can't understand why it won't work!

I'm trying to copy the first 8 digits of from a HUC 12 (Hydrologic Unit Code) to a new field, which represents a larger watershed HUC 8.

Field names:

WDB_HUC12 Text, length 14
HUC8 Text, length 8
Python Code: !WDB_HUC12![:7]
VBScript   : Left([WDB_HUC12], 8)

No error message, but the field remains empty.


texts:
I am trying wrap my raster with GCP control points using gdal_translate and gdalwrap tools. I've read at gdal mailing list about wrap with affine transformation, so I thought it is easy to done using GCP control points and TPS transformation.
I've Tif file with tfw file in WGS_84 coordinate system.

First I've create template vrt file using my orginal file like this:

gdal_translate orginal.tif temp.vrt -of VRT

Next, I've edited vrt file, where I added as a elements inside VRTDataset element code that is shown below:

<GCPList Projection="EPSG:4326">
 <GCP Id="1"     Pixcel="5650959.808031" Line="4432086.318384"   X="4432215.141964" Y="5650933.901849" />
.
.
</GCPList>

where I wrote gcp with this scheme:

<GCP Id="unique number etc. 1, 2"    Pixcel="x_source" Line="y_source"   X="x_target" Y="y_target" />

EDIT:  For x_source, y_source, x_target, y_target  I use geographic coordination  x, y value source or target

In next step I similarly as at linked post I've used gdal_translate again:
    gdal_translate temp.vrt out.tif

Finally, I try execute gdalwrap using:

gdalwarp src.tif out.tif -tps

but this process are aborted with error code:

ERROR 1: Unable to compute a GCP_TPS based transformation between pixel/line and georeferenced coordinates for out.tif

I want to wrap my image using control points, as a result which transform using gcp control points. What should I do to get wrap image with georeference?

Note: Moreover, If easy solution is algorithm I may can write  C++ code


texts: Converting digital elevation models (GeoTIFF) to XYZ or CSV for T-Test analysis in QGIS 3.1

texts:
I am using QGIS 3.1 and I am trying to convert two raster layers to XYZ or CSV format so that I can run a t-test and manually compare the difference in elevation means between the two layers. The two layers come from two separate projects and have different orthometric heights (we believe the vertical datum difference is ~5-10 cm). I want to figure out what exactly the difference in orthometric height is between these two layers.
So far I have tried:

resampling both layers to be the same resolution/CRS

Raster calculator > subtracting one from the other

Clip the resulting 'difference' raster into two for faster processing/smaller file type

exporting the grids/raster into XYZ using the following:
Translate > convert to .XYZ
gdal2xyz > .XYZ ASCII file

Methods from above technically worked, but the resulting files are 15-20 GB (gdal2xyz created a smaller file) and I am unable to open them in any processing software (R studio, excel) to actually run tests on them.
My computer specs are : 32GB RAM, 64-bit processing, Windows 10 Pro.
Can I decrease the size of the files in QGIS so that they are easily loaded to say, R studio or Excel?
If not, is there another method to export these files to xyz or csv?
Is there a way I can determine these differences statistically in QGIS without even doing any of the above?


texts: Problem with Geonode Create Map error 403

texts:
I have installed Geonode 2.4 (developer version) on Ubuntu 14 and all is doing fine. However, the last few days I am getting an error message whenever I try to "create map". The error message is:

  FORBIDEN 403: DEBUG is set to False but the host of the path provided
  to the proxy service is not in the PROXY_ALLOWED_HOSTS setting.

Can anyone show me how to get this problem fixed?


texts: Creating a new surface for a track layout with defined gradient of slope

texts: I am trying to establish a way of creating a new raster surface for a new track layout. I have a section of track, and I have a DTM. I want to give my track section a height value and a width. However I want to control the gradient at which the edge of my track then ties back in to the DTM. Ultimately I want to be able to create a whole new raster layer where I have a track layout at a particular elevation and width, and with a pre-defined slope from the edge of the track to the topographic ground. I want to then be able to use this raster layer with the cut and fill tool to be able to calculate groundwork volumes for the whole track layout. Does anyone have any ideas how I would create such a raster with the predefne slope values?


texts: How to cluster point data into equal sized groups

texts: I need to cluster point data into equal sized groups. I have 180 points and want to create 3 groups each containing 60 points. The groups should contain points which are close to each other. Is there anyway to do this using either ArcGIS or other GIS free software. I would prefer not to use python unless anyone has a link to the script that can be copied and pasted in.


texts:
I have the following code which produces the map below. As you can see, the map correctly overlays two sets of polygons:

A large polygon outlining the city of Liverpool
A group of polygons outlining the 'MSOA' census components of the city

I'm happy with how it's outputting up to now, but I'd like to change the border opacity of the MSOA polygons so they are less bold and in-your-face. How can I do this?
The MSOA polygons are produced using the last line of the following code 'LiverpoolMSOA_LL'
ggmap(BaseMap) +
  stat_density2d(data=CrimeDatabase,aes(x=long, y=lat, fill= ..level.., alpha=..level..), size=1, bins=200, geom="polygon") +
  scale_fill_gradient(low="green",high="red") +
  scale_alpha(range=c(0.05,0.7), guide=FALSE) +
  geom_density2d(data=CrimeDatabase,aes(x=long, y=lat), size=0.3, bins=20, alpha=0.4) +

  # Main CIty Polygon #
  geom_polygon(data = Liverpool_LL, aes(x=long, y=lat, group=group), colour="black", fill=NA) +

  # MSOA Polygons - to have border opacity altered #
  geom_polygon(data = LiverpoolMSOA_LL, aes(x=long, y=lat, group=group), colour="black", fill=NA)

I have tried to use alpha=0.2 in both the aes() and after 'fill=NA' but this has not worked.
I have also tried rendering these polygons before the heatmap, but I'm not happy with the clarity of the borders so would prefer them to be on top.


texts: Present polygon features in legend with custom symbology

texts:
I wonder if there is any way to represent a polygon feature in the legend with a custom symbol. I can think of several ways but the problem is that the legend must be dynamic, only showing objects visible in the map extent, and therefore not converted into graphics. Also, the legend should be included in the layout template for these standardized maps. One additional problem is that the data must be contained in the enterprise database and that database can't be manipulated or complemented with additional data.

The polygon layers represents small features why the default symbol of a polygon (a filled square) constitutes a poor representation of the map features.

My idea is creating a second data frame in the layout template with an extent that follows the primary data frame, only showing the necessary features. The symbology of these features could then be manipulated to give a good representation in the legend which is created from the second data frame.

But yet, the polygon symbols are still hard to manipulate in order to give a good representation in the legend.

Any suggestions?

One example would be rivers created as polygon features. A blue box in the legend gives a quite poor representation.


texts: Adding time to Raster Mosiac Footprint using ArcPy?

texts:
I am trying to create a raster mosiac for use in animating data over time.  The current workflow is:

Create .gdb (arcpy.CreateFileGDB_management)
Create Raster Mosaic (arcpy.CreateMosaicDataset_management)
Add rasters to mosaic (arcpy.AddRastersToMosaicDataset_management)

The above are all working well.

Next I created a new "date" field in the Footprint feature class.  What I would like is to do now is for each row in the Footprint table to add a time into the date field.  However I seem to be unable to do this.  I assume it is because the Footprint layer is treated different than a normal feature class.

Do I need to use a footprint specific command (arcpy.BuildFootprints_management)?


texts: Rotating PIXMAP based symbols correctly in MapServer

texts:
I'm on mapserver 5.0.4

I want to draw a polyline with a symbol on every 100th pixel. The symbol is a PNG image with size 10 x 7 pixels. I want the symbol to be drawn perpendicular against the polyline

The class in my mapfile drawing the pattern is this:

    CLASS
        NAME 'warmfront'
        EXPRESSION ([type] == 2 )  #warmtefront
        STYLE
            SYMBOL 'warm'
        END
        STYLE
            SYMBOL 'circle' #draw a connecting line
            SIZE 2
            MINSIZE 1
            MAXSIZE 5
            COLOR 255 0 0
        END
    END  # CLASS

The symbol "warm" is defined as:

SYMBOL
    NAME "warm"
    TYPE PIXMAP
    IMAGE 'symbols/warm.png'
    GAP -10000000000
END

The image looks now like this:

The red triangles are now indeed drawn along the line, but the changing the GAP value doesn't seem to have any effect.

As suggested in the comments below, I changed the smbol from a picture to a vector:

SYMBOL
NAME 'warm'
TYPE VECTOR
FILLED TRUE
POINTS
  0 4
  2 0
  4 4
  0 4
END
GAP -10
END

The image now looks:

No symbol is drawn, or the symbol is drawn invisible

As suggested below I added a SIZE in my STYLE object:

CLASS
    NAME 'warmfront'
    EXPRESSION ([type] == 2 )  #warmtefront
    STYLE
        SYMBOL 'circle'
        SIZE 40
        MINSIZE 40
        MAXSIZE 40
        COLOR 255 0 0
    END
    STYLE
        SYMBOL 'warm'
        SIZE 30
        MINSIZE 30
        MAXSIZE 30
        COLOR 0 255 0
    END

END  # CLASS

and my SYMBOL def:

NAME 'warm'
TYPE VECTOR
FILLED TRUE
POINTS
  0 4
  2 0
  4 4
  0 4
END
GAP -100

The image looks now like this:

But still the SYMBOL is drawn for every point on the line. When i use a pattern in my SYMBOL def like PATTERN 1 60 END the triangles do have a gap in between but they are not drawn along the direction of the line.

What do i miss?


texts: Using Hyperlink URL in attribute table of QGIS?

texts: I would like to have the URL from an attribute (in the attribute table) as a 'hotlink' wherein you can click on the URL and it opens the browser with the data. As it is right now, I'm having to identify feature, R-click on the URL and copy/paste the URL into a browser.


texts: Can't write decimal data into shape (shp) attribute table with Python

texts:
I am trying to create a shapefile with Python GDAL/OGR library. I add to it a real number field, but when I write into it doesn't appear as it should but rounded. I will explain better with the code:

theDriver = driver = ogr.GetDriverByName("ESRI Shapefile")
theShp = driver.CreateDataSource(theFileName)
layer = theShp.CreateLayer(theFileName, geom_type=ogr.wkbPoint)

#create the field
fldN = ogr.FieldDefn('Num', ogr.OFTReal)
layer.CreateField(fldN)

#add a point
pt = ogr.Geometry(ogr.wkbPoint)
pt.AddPoint(lng, lat)
featureDefn = layer.GetLayerDefn()
feature = ogr.Feature(featureDefn)
feature.SetGeometry(pt)

#write the field
feature.SetField('Num', 5.123456)

When I open the shapefile, the field "Num" is set to 5.00000.
The extrange thing is that if I change the Driver to "GeoJSON" it works perfect.
I tryed to set the precision of the field, but it didn't work.


texts: QGIS Terrain Profile Plugin: Getting the X and Y coordinates of the XY axis of the tool on the graph with the 2D profile DXF for AutoCAD

texts:
I have already drawn out some lines (polylines) to use to get a terrain profile for each area, which I can export to as 2D profile DXF. However there is a something I am missing, I would like to have the X and Y coordinates on the X and Y axes of the graph to use for drawing the terrain profile further out like this example:

I am aware that you have copy to clipboard with coordinates but let's just say when you paste the data it is a complete mess when you try to separate in to different columns.


texts: What is the Typical Workflow from QGIS to Publishing Programs?

texts:
I have been playing with using Inkscape to combine my CAD title block and the map project created in QGIS. I was curious to understand what a typical workflow might be to Inkscape or another post processing programs.

For instance, do you export each layer separately from QGIS or collectively?  Let me know any input you may think is valuable.


texts: Import CSV with Embedded GeoJSON Geometry in ARCGIS

texts: I have a CSV file with an embedded GeoJSON geometry in a column.  See screen capture. I have tried some online CSV to GeoJSON conversion tools, but all cannot process a column with a GeoJSON embedded geometry in it.  Does anybody know of an online tool that can process a CSV file with an embedded GeoJSON object and turn it into a GeoJSON file or any format that ARCGIS can read?


texts: Change output spatial reference for ArcGISTiledMapService

texts:
I'm using the New Zealand Topo50 maps for my basemaps from an ArcGIS map server at http://services.arcgisonline.co.nz/ArcGIS/rest/services/LINZ/geotiffs/MapServer. However, this service has a spatial reference of EPSG:2193 and the tiles are being projected over Europe instead of New Zealand.

I've noticed that vector feature layers, e.g. FeatureLayer and ArcGISDynamicMapServiceLayer, automatically add an output spatial reference to the request so that the returned features are in EPSG:3857 (Web Mercator). Raster layers don't seem to work the same though.

What can I do to have the basemap projected correctly?

My code:

var map = new Map("map", {
  basemap: "topo"
});

var topo50Layer = new ArcGISDynamicMapServiceLayer(
  "http://services.arcgisonline.co.nz/arcgis/rest/services/LINZ/geotiffs/MapServer"
);

map.addLayer(topo50Layer);


texts:
I am working on a 3D visualisation of a map displaying the population density. I'd like to visualize the density by setting the height of an area according to it's population density. Whenever I set this up in ArcScene I only get floating plateaus.
Is there a way to draw walls and make the areas stand like pillars?


texts: Transfering attributes from nearest feature using ArcGIS Desktop?

texts:
I have two layers, containing polygons (lots) and points (meters).  I want to identify the closest polygon to the point, and then copy specific attributes from the polygon to the points.

Is this possible in one step using ArcGIS Desktop?


texts: Writing italic form scientific name in map legend?

texts:
I am trying to use Italic scientific name in my legend, I am using QGIS 3.4.

I can not figure out how to do only two-word italic without having the rest of the description being italic. Is it possible to italic only the name in a legend description?


texts: I'm looking to do some cataloging of both workspaces and table metadata - I want to cycle through a workspace and pick up the table names and associate those with the wrokspace name (I can then track where data is being used) but then display the results in a web page similarly, I would like to get the metadata from a table into a web browser - any pointers to some code to do this, don't mind what language.


texts: Finding suitable area using raster in ArcGIS Pro?

texts:
I have 2 raster data:
-land use (water, urban, agriculture, forest)
- risk categories (low, medium, high)

How can I find out the land use category that falls on the medium+high risk using raster in ArcGIS Pro?

I thought of classifying medium risk and high risk as 1, combine them, and get a raster dataset of medium+high risk together.

But then, how can I find out the mostly landuse type that falls into this zone (medium+high risk)?


texts: Speeding up very long connection times to PostGIS DB caused by complex views

texts:
When connecting to a PostGIS database to add a postgis layer, all table and views are scanned by QGIS in order to define the geometry type (if I understand well the query performed).
My problem is that I have complex views, quite long to be queried, that are not meant to be queried without a restricting WHERE clause. The automatic Qgis queries thus take more than half an hour to perform, and the application is frozen in the mean time.

Is there a way to tell Qgis to drop the query if no answer was obtained before a timeout, and to assume the geometry type is unknown for these layers ?


texts:
I am trying to script the clipping of overlapping areas from a set of polygons. After having fetched features (outerFeature) a loop (innerFeature) is to check if other features intersect with area > 0. I then try to clip the intersecting area. Apparently difference does not give the right result.

#Intersecting features
for outerFeature in pr.getFeatures():
    #Looping through all features and check if intersect
    for innerFeature in pr.getFeatures():
        geom = None
        if outerFeature.id() != innerFeature.id():
            geom = outerFeature.geometry().intersection( innerFeature.geometry() )
            #If intersection area > 0, then construct difference and update geometry
            if geom.area() > 0:
                print("intersecting and clipping")
                outerFeature.setGeometry( geom.difference( outerFeature.geometry() ) )
                vl.updateExtents()

Any advise is highly welcome.

Best regards

Sebastian


texts: How to count number of polygon within each 2nd poylgon layer?

texts: So I need to count the number of parcels (first polygon layer) that lie with in each unit boundary (2nd polygon layer). PS There are over 300 Unit boundaries in which I need to find out the number of of parcels in each.


texts: Merge thousands of geodatabase into one feature class

texts:
I have over 1000 file geodatabases (fgdb), each fgdb contains ONE feature class (polygons) and covers different areas of the country
The aim is to merge/append all feature class from fgdb into a feature class.
So far I've tried Merge multiple geodatabases into one but couldn't work. The Append Multiple Geodatabase script tool in ArcGIS gave me an empty output... Plus the toolbox can only merge 5 gdb a time.


texts:
Quick question regarding editing PostGIS data in ArcMap 10.0.  Far as I can tell, this can only be accomplished through third-party plugins like GISSquirrel or ST-Links.  Does anyone know of an alternative way that omits third-party involvement?

As an alternative, is it possible to edit remotely-hosted data served up in ArcGIS via a Geoserver WFS?  Again, the research I've done indicates you can view the data in ArcGIS, but no edit capabilities.

I have my data stored remotely in PostGIS and served through Geoserver.  Of course, I'm trying to find a way that allows editing of the data within the ArcGIS environment.  Well aware that I can do this in QGIS, just wondering why I can't find a solution for ArcGIS.


texts: in a Vue/OL app, show a circle at location after zooming in

texts:
In my Vue app there is a button that, when clicked, zooms to the current location. The zoom is animated, and once the animation is finished, a circle should be added to the current location, which is not working at the moment.
Aside from the OL documentation I consulted specifically these sources:
This one helped me to setup "vanilla" OpenLayers in Vue:
https://dev.to/camptocamp-geo/integrating-an-openlayers-map-in-vue-js-a-step-by-step-guide-2n1p
This original OL 6.5 example shows code that is used to draw a circle at the current location:
https://openlayers.org/en/latest/examples/geolocation.html
I have troubles to "translate" the OL example code to Vue.
This are the main code lines that (I think) should actually do the job:
// MapContainer.vue => export defaults {
data() {
  return {
    positionFeature: new Feature(),
    circle: new Style({
      image: new CircleStyle({
        radius: 12,
        fill: new Fill({
          color: '#FF0000'
        }),
        stroke: new Stroke({
          color: '#fff',
          width: 12
        })
      })
    })
  }
},
mounted() {
    // Assign style to positionFeature
    this.positionFeature.setStyle(this.circle)

    this.vectorLayer = new VectorLayer({
      source: new VectorSource({
        // features: [this.positionFeature] // <== DOES NOT WORK
        features: []
      })
    })

    this.tileLayer = new TileLayer({ source: new OSM() })

    this.olMap = new Map({
      target: this.$refs['map-root'],
      layers: [ this.tileLayer, this.vectorLayer ],
      view: this.view
    })
},
methods: {
  zoomToCurrentLocation () {
    const view = this.olMap.getView()
    view.animate({
      center: fromLonLat([...]),
      zoom: 16,
      duration: 1000
    }, this.cb_viewAnimate)
  },
  cb_viewAnimate () {
    this.createPointAtCurrentLocation()
  },
  createPointAtCurrentLocation () {
    // Get coordinates from geolocation
    /* const coordinates = this.geolocation.getPosition(); */

    // For testing purposes provide coordinates "manually":
    const coordinates = [16.3807232, 48.1918976];
    const point = new Point(coordinates);
    console.log("point =", point);

    this.positionFeature.setGeometry(              //
      coordinates ? point : null                   //
    );                                             // <== DOES NOT WORK
    const source = this.vectorLayer.getSource()    //
    source.addFeatures(this.positionFeature)       //
  }
}

The idea is to setup the positionFeature and its assigned style during Vue's "mounted()" live-cycle state. Just for testing purposes I assign the positionFeature to the VectorLayer => VectorSource right away in "mounted()" as well. But that does not work either (probably because no Point was passed along, but I would expect OL to fall bak to [0,0] then - am I wrong?).
The real goal, however, is to assign the point only, once the animation of the View is finished by calling the createPointAtCurrentLocation function in View's animate callback. Various "console.logs" (not shown here) tell me that the functions are indeed called and a positionFeature is assigned. However, there is nothing to see on the map.
I prepared a minimal Codesandbox example here:
https://codesandbox.io/s/openlayers-circle-at-current-location-37rw0?file=/src/components/MapContainer.vue:3373-3759
What am I doing wrong?


texts: I am Using QGIS 3.18 or 3.10. I have imported a DWG file with many layers and many type of features (hatch, point, polyline). I want to converts them to GeojSON format. Is there a way to export all the layers in one time or do I have to do one by one. It takes a long time.


texts: What global (or very large area regional) digital elevation models (DEMs) products are publicly available?

texts: What global or large regional area DEM and/or DSM products are publicly available?


texts: D3 map can be drawn and colored as shown in this example : http://techslides.com/demos/d3/d3-world-map-zoom-points.html. I need to overlay a texture or image within the boundary of a given country. Is there a way to overlay textures in d3 map ?


texts: Error While installing GDAL in Ubuntu 12.04

texts:
I am trying to set CartoDB in Ubuntu 12.04. I am trying to install Python dependencies as a part of my installation. I am installing with below commands

export CPLUS_INCLUDE_PATH=/usr/include/gdal
export C_INCLUDE_PATH=/usr/include/gdal
sudo pip install GDAL
cd /tmp/pip_build_root/GDAL
sudo python setup.py build_ext --include-dirs=/usr/include/gdal
sudo pip install --no-download GDAL

While i am trying to execute the third command sudo pip install GDAL am getting the below error

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/usr/include/python2.7 -I. -I/usr/include -c extensions/gdal_wrap.cpp -o build/temp.linux-x86_64-2.7/extensions/gdal_wrap.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for Ada/C/ObjC but not for C++ [enabled by default]
extensions/gdal_wrap.cpp:2859:22: fatal error: cpl_port.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

----------------------------------------

Command "/usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-PMhlKD/GDAL/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-0u9jBS-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-PMhlKD/GDAL


texts:
I am working in QGIS 3.10.4 trying to capture zonal stats for a polygon within a polygon. For example (picture below), two red lines make up a rectangular polygon that hold its blue circular polygons. Each blue polygon within its respective rectangle has an area calculation. I want to find the average area of the blue circular polygons in respect to its row. I initially tried zonal stats, but soon realized that zonal stats only work with a raster.
Any thoughts on how to do this?


texts: Animation of Faceting maps with tm_facets


texts:
I'm trying to use GeoTools to convert coordinates from EPSG:3857 to various CRS, in order to display WMS layers on a Google Map.

For example, I want to display a layer in the EPSG:4326 CRS. I have the coordinates in EPSG:3857, and I need to convert them in EPSG:4326 to ask the server.

Here is what I'm doing :

// The coordinates are in meters in the EPSG:3857 CRS
double[] lowerLeft = new double[] { longitudeMin, latitudeMin};
double[] upperRight = new double[] { longitudeMax, latitudeMax };

CoordinateReferenceSystem srcCrs = CRS.decode("EPSG:3857", true);
CoordinateReferenceSystem destCrs = CRS.decode("EPSG:4326", true);

MathTransform transform = CRS.findMathTransform(srcCrs, destCrs, true);

transform.transform(lowerLeft, 0, lowerLeft, 0, 1);
transform.transform(upperRight, 0, upperRight, 0, 1);

// Check if axis order is NORTH_EAST (= LAT_LON) or EAST_NORTH (= LON_LAT) :
String bbox;
if(CRS.getAxisOrder(_crs) == CRS.AxisOrder.NORTH_EAST) {

    bbox = lowerLeft[0] + "," + lowerLeft[1] + "," + upperRight[0] + "," + upperRight[1];
}
else {

    bbox = lowerLeft[1] + "," + lowerLeft[0] + "," + upperRight[1] + "," + upperRight[0];
}

I have no error and it seems to be working, but the map is not displayed correctly, as you can see on the image below (on the left, the correctly displayed Google Maps, on the right, my WMS layer) :

So, the question is, what am I doing wrong ? Is everything working properly, and I just can't display a WMS in EPSG:4326 (or any other CRS) on my EPSG:3857 Google Maps ?


texts: I know where to find 5-digit ZIP code boundaries.  Do 9-digit ZIP code boundaries exist?  If so, where might I find them?