texts: Convert jpg with exif header into geotiff

texts:
I have bunch of jpgs with exif headers like this:

   Size is 4000, 3000
Coordinate System is `'
Metadata:
  EXIF_ApertureValue=(3.625)
  EXIF_ColorSpace=1
  EXIF_ComponentsConfiguration=0x1 0x2 0x3 00
  EXIF_CompressedBitsPerPixel=(5)
  EXIF_CustomRendered=0
  EXIF_DateTime=2015:09:09 15:27:28
  EXIF_DateTimeDigitized=2015:09:09 15:27:28
  EXIF_DateTimeOriginal=2015:09:09 15:27:28
  EXIF_DigitalZoomRatio=(1)
  EXIF_ExifVersion=0230
  EXIF_ExposureBiasValue=(0)
  EXIF_ExposureMode=0
  EXIF_ExposureTime=(0.0005)
  EXIF_FileSource=0x3
  EXIF_Flash=16
  EXIF_FlashpixVersion=0100
  EXIF_FNumber=(3.5)
  EXIF_FocalLength=(4.5)
  EXIF_FocalPlaneResolutionUnit=2
  EXIF_FocalPlaneXResolution=(16393.4)
  EXIF_FocalPlaneYResolution=(16393.4)
  EXIF_GPSAltitude=(91.8)
  EXIF_GPSAltitudeRef=00
  EXIF_GPSDateStamp=2015:09:09
  EXIF_GPSLatitude=(45) (18) (3.564)
  EXIF_GPSLatitudeRef=N
  EXIF_GPSLongitude=(19) (48) (19.842)
  EXIF_GPSLongitudeRef=E
  EXIF_GPSMapDatum=WGS-84
  EXIF_GPSStatus=A
  EXIF_GPSTimeStamp=(14) (27) (29)
  EXIF_GPSVersionID=0x2 0x3 00 00
  EXIF_ImageDescription=
  EXIF_Interoperability_Index=R98
  EXIF_Interoperability_Version=0x30 0x31 0x30 0x30
  EXIF_ISOSpeedRatings=800
  EXIF_Make=Canon
  EXIF_MakerNote=
  EXIF_MaxApertureValue=(3.625)
  EXIF_MeteringMode=5
  EXIF_Model=Canon PowerShot SX280 HS
  EXIF_Orientation=1
  EXIF_PixelXDimension=4000
  EXIF_PixelYDimension=3000
  EXIF_Related_Image_Length=3000
  EXIF_Related_Image_Width=4000
  EXIF_ResolutionUnit=2
  EXIF_SceneCaptureType=0
  EXIF_SensingMethod=2
  EXIF_ShutterSpeedValue=(10.9688)
  EXIF_UserComment=
  EXIF_WhiteBalance=1
  EXIF_XResolution=(180)
  EXIF_YCbCrPositioning=2
  EXIF_YResolution=(180)
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=PIXEL
  SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 3000.0)
Upper Right ( 4000.0,    0.0)
Lower Right ( 4000.0, 3000.0)
Center      ( 2000.0, 1500.0)
Band 1 Block=4000x1 Type=Byte, ColorInterp=Red
  Overviews: 2000x1500, 1000x750, 500x375
  Image Structure Metadata:
    COMPRESSION=JPEG
Band 2 Block=4000x1 Type=Byte, ColorInterp=Green
  Overviews: 2000x1500, 1000x750, 500x375
  Image Structure Metadata:
    COMPRESSION=JPEG
Band 3 Block=4000x1 Type=Byte, ColorInterp=Blue
  Overviews: 2000x1500, 1000x750, 500x375
  Image Structure Metadata:
    COMPRESSION=JPEG

They were taken with UAV from about 100m height and i want to stich them into one image.
I want to convert them into GeoTiff so i can create image mosaic in geoserver.
Anyone knows how to do this?


texts: How to enlarge the marker on mouseover in mapbox gl js

texts:
i have 3 markers and when i hover on the marker, i want the marker to get enlarged. can anyone help me to solve this. I had tried to change the pointer on mouseover but not getting how to enlarge marker on hover.

TS:

      mapboxgl.accessToken = 'pk.eyJ1IjoicmFrc2hpdGhhMTkiLCJhIjoiY2pjcHl1YW5wMjR5czJ6bzdqdjZrbDRzeSJ9.OOqu6zVyNsXavzCsYoBdPA';
        var map = new mapboxgl.Map({
          container: 'maps',
          style: 'mapbox://styles/mapbox/streets-v9',
          center: [12.568337,55.676098],
          zoom: 9
    });

  map.on('load', function () {
    map.addLayer({
      "id": "points1",
      "type": "circle",
      "paint":{
        "circle-radius":10,
        "circle-color":'rgba(55,148,179,1)'
      },
        "source": {
        "type": "geojson",
        "data": {
          "type": "FeatureCollection",
          "features":  [{
              "type": "Feature",
              "properties": {},
              "geometry": {
                "type": "Point",
                "coordinates": [12.568337,55.676098]
              }
            }]
        }
      }
    });


texts: Deleting any characters after certain character in QGIS label expression

texts:
I have a shapefile with attribute values like this:
C834
K9
L523;L553
W2,T48

I want to display only the characters before certain characters, for example ; and , :
C834
K9
L523
W2

How to achieve this with an label expression in QGIS 3.0?


texts: Why might Location Allocation give long paths when much shorter paths exist?

texts:
I'm using location-allocation in the network analyst toolbox of ArcMap to add features to my map.

My objective function is to minimize impedance (meters).
The image below shows the result.

As you can see, there are lines in the top-right that do not go to the closest node pictured. Instead, they go off to a far-away node in the bottom left.

Also, if I increase the number of locations for my solver, this problem occurs for the added locations too. That is, any locations that I add have points of demand near them who do no go to them; Instead demands near new locations go to far-away locations.

I'm using a network dataset with junctions set at line intersections. Visually, the component shown below is connected to the rest of the network.
I double-checked that I'm reading the correct length attribute in my network dataset as well.

The only thing I can think of is that maybe this component below is somehow disconnected.

What could be going on here?


texts: Reducing size of labels automatically to fit within polygons

texts:
I want to make labels automatically smaller so they fit within the polygons. The biggest font-size is 12 and I want to decrease the font-size to be restricted to the boundary of the polygons.
There is a time consuming option using the field calculator by using the polygons area field. Is there another way like using a plugin or similar to reduce the font-size automatically?


texts: How can I use Flex Viewer 2.2 with ArcIMS 9.3 or 10?

texts: I am one of the users that is currently using ArcIMS to build a web GIS,so I have not had migrated to ArcGIS Server yet, therefore can I use Flex viewer 2.2 in ArcIMS 9.3 or 10? Will it cause any problem with it ? If so, can any one help me  how to start learning with flex viewer for (API)?


texts: How does Arbitrary Coordinate System in QGIS work?

texts: I have got the drill hole data, which needs to be geo-referenced based on non-earth coordinates system (with no datum, ellipsoid information defining through Custom CRS). Could any one explained me how it works. The output result, I expect here is like the one Non-earth Coordinate system in MapInfo, and Arbitary coordinate system in Autocad??


texts: Creating single squared tile fishnet buffer based off shapefile in ArcGIS Desktop?

texts:
I'm interested in creating a fishnet buffer around a current grid I have. The fishnet buffer I'm interested in making needs to be exactly the same cell size and extend just one grid cell around the AOI.

How can I create such a result using ArcGIS Desktop?

The grids are square. I've provided an example of what I would like to the result to look like.


texts:
I have around 1000 GPS Points and want to calculate the average value of Night lights, within a 10 km radius in ArcGis. My first approach was to do this with buffers, but a lot of polygons overlap and Zonal Statistics is problematic. Which is why I decided to solve it with Focal Statistics. My approach would be:

1)  Focal statistics with a 10 km radius

2)  Extract Values to Points to get the respective value

However, when using Focal Statistics, I cannot specify kilometers (as I could for Buffers). Instead I have to specify the amount of map units of the radius. After reading through several forum posts, I figured that I somehow have to change the projection to a system where linear units (meters) are used. Is that correct? And if so, how do I know which one is the appropriate, as there are many systems that use meter? (Night lights have a CGS_WGS_1984 coordinate system).


texts: Extracting raster values at points for GRASS GIS

texts:
I have points shapefile and a raster file. For each point, I want to extract the raster value which overlaps that particular point. This has been done in QGIS (link below) but I was looking for a solution for GRASS GIS.

Extracting raster values at points using Open Source GIS?

EDIT: I found the blog below to be useful and posted the solution to the question below


texts:
Is it possible, or would it be feasible to use a Jython environment to interact with this the ArcObjects SDK for Java?
Or would it be better overall to learn the native language of the API?
Additionally, do any immediate limitations come to mind?

My desire to explore this API rests with a familiarity in Python, and a few experiences where ArcPy had not yet exposed the functionality I needed. The scope for my use of the API is meant only to resolve minor ArcPy limitations at this time.

I am looking for any information, tutorials, or anecdotal experience on leveraging a Jython interpreter to use ArcObjects SDK for Java functionality.

EDIT: In the original post I failed to make the distinction between the ArcObjects SDK for Java and the ArcGIS Runtime SDK for Java. For this question I'm interested in the ArcObjects SDK specifically in terms of calling ArcObjects functionality from Jython. Alas, after some months and additional, related questions here on GISSE and another board the consensus has been to just cowboy up, take off the training wheels and learn to access ArcObjects for .NET via C#. Every language, framework etc. has its limitations and benefits. In the ArcGIS environment and for my particular situation, effectively forcing Python to expose ArcObjects feels like it amounts to more effort than would be necessary just using the .NET option.

If in the future anyone does attempt handling of ArcObjects (Java SDK) via Jython, I'd be interested to hear about it.


texts: QGIS cannot view raster loaded to PostGIS through raster2pgsql

texts:
I tried to load a raster GeoTIFF image to a PostGIS database using "raster2pgsql" following the OpenGeo Suite Manual. The command I used is:

C:\>raster2pgsql -s 4283 -I -C -M "C:\Program Files\GeoServer 2.2.5\data_dir\data\gcur\interp_clipped.tif" -F public.myraster | psql -d MyPostGISDB -h localhost -p 5432 -U postgres

The table was successfully created and found in "pgAdmin III" but not accessible through QGIS. When I tried to load PostGIS layers in QGIS, it only showed "raster_columns" and not the "myraster" table. In the PostGIS Manager window in QGIS, this table is marked as plain table and with "No Geometry".

Can anyone give me some hints about it?


texts: Exporting Polygons (RGB color bands) nto CSV

texts:
I have drawn ~40 polygons over NAIP imagery to collect their R, G, B color bands. I now want to export each polygon with its associated RGB color values into a CSV file so I can plot the polygons against one another and compare them. I have attatched a screenshot of my geometry polygons and their color bands.

[Inspector tab shows associated R, G, B color values with individual drawn polygons]1


texts: Why are the features in my memory layer not displayed?

texts:
I am trying to create a memory layer, I followed the directions from the page below but no points appeared on my map.  First I tried typing each line into the python console and I also create a plugin with the same code and still nothing appeared on the map.  At some point while I was typing the code into the console, it asked for the projection, so I specified my typical projection (epsg 2272, a state plane coordinate system)

How to create a new empty vector layer programmatically?

I also reviewed
http://www.qgis.org/pyqgis-cookbook/vector.html#memory-provider

I am experimenting with memory layers because I want to include it into a plugin I am developing.


texts:
Im trying to create a vector grid for my shapefile. I want it to be in meters so I set my CRS to EPSG:32650 UTM 50N. This is what I do exactly

I set the layers CRS to that one above, then click on vector grid and set extents based on the layer I then put 50m as my horizontal and vertical spacing then click run. This is what comes out. Its just a single box with the same grid spacing I put

Hoping someone could help me on this


texts:
Using PostGIS, I want to fill a gap between other polygons.

Image to explain from where to extract the polygon:

Can you help with some directions what functions to use?


texts: Controlling the shape over another shape

texts:
I have been using City Engine recently, I started working on writing a rule file and I am having problem.

I have created one shape where there is a Podium and tower above it

I want to have enough control to be able to place the tower any place over the podium, which I am unable to do. Is there a way for me to have this kind of control over the placement of the tower.


texts:
I'm having some trouble trying to plot a raster in tmap. It has 14 unique classes and all of them display fine with tmap_mode("plot"). However when I set  tmap_mode("view") some classes do not display at all.

Left hand side of the area, which is Suburban(yellow) in the static map, does not display on the interactive map even though it's visible in the legend. Both maps were created using qtm - I tried changing the palette etc. but nothing worked.

I'm assuming I'm making a mistake and there is something obvious that I'm doing wrong.

> levels(lcm)
[[1]]
   ID                      Habitat
1   1           Broadleaf Woodland
2   2          Coniferous Woodland
3   3 Agriculture and Horticulture
4   4           Improved Grassland
5   5              Rough Grassland
6   6            Neutral Grassland
7  10                      Heather
8  11            Heather Grassland
9  14                  Inland Rock
10 16                   Freshwater
11 20            Littoral Sediment
12 21                    Saltmarsh
13 22                        Urban
14 23                     Suburban

tmap_mode("plot")
qtm(lcm)

tmap_mode("view")
qtm(lcm)


texts: Calculating the acreage of a created polygon in ArcGIS Collector

texts: I recently set up an app using ArcGIS Collector. I have a editable polygon shapefile that has an acreage field. It allows me to create a new polygon, but requires that I enter in the acreage field value manually. Of course I don't know what the actual acreage. Is there a way to automatically calculate that field when it is created in Collector or do I need to wait and calculate it after I sync back to ArcMap?


texts:
I've created a layer which I have bound a DataFeatureForm. Everything is working hunky dory, up to the point where I try to call the layers SaveEdits method in the EditEnded event. When I call this method, the SaveEditsFailed event is raised, returning the following message:

  ESRI.ArcGIS.Client.Tasks.ServiceException:
  Unable to complete operation

The Feature's layer API is saying it takes all the edit crud stuff when I hit it with a browser. also I don't know if it will help, but I am providing the Feature Layer a subset of all the layers Out Fields. Could that also effect this?

Thanks for yoru help!

EDIT: I was able to get the HResult from the exception. HResult = -2146233088


texts: Calculating space feature class will use in ArcSDE?

texts:
Is it possible to get a good estimate on how much space a feature class will take once loaded into ArcSDE from how big they are in a FGDB? I have some feature classes in a FGDB, where some are a few GB's.

I'm using Oracle/ ArcSDE 9.2


texts:
I want to download Sentinel-2 images of "Navarra" zone from June to December of 2016. I want to download all swith image (all tiles in a SAFE file) but when I search this I only can download up to September; from October onwards  I only can download single tiles.

Do you know how many time has to be passed to get the whole image?


texts: How to combine two different raster by replace its raster value at their overlap space?

texts:
I have two different raster data :

First data :

Second data

How to combine those raster data? so the output data will be like this :

Where the overlap space between First data and second data (the green one) will contains the value of second data and the other will be refer to first data. So there will be two value in one raster data.
A solution by using ArcGIS will be more preferable.


texts: Error while uploading shapefile to Google Earth Engine

texts:
I tried loading a shapefile that I made in QGIS to the code editor (Assets). In the select file menu I selected the shp, shx, prj, dbf. The files are in WGS 84 projection. Every time I try to upload I get 2 kinds of error:
1- Error: Unable to transform edge (3877983.178902, 3731126.448814 to 3877983.180887, 3731126.448640) from GEOGCS["GCS_WGS_1984", DATUM["D_WGS_1984", SPHEROID["WGS_1984", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Longitude", EAST], AXIS["Latitude", NORTH]] PLANAR to EPSG:4326.
2- Error: Unable to transform edge (3877983.178902, 3731126.448814 to 3877983.180887, 3731126.448640) from EPSG:4326 PLANAR to EPSG:4326.
I tried re projecting the files but it didn't help. How do i solve the problem?


texts:
When exporting my map the export process seems to fattens up all my shapes resulting in the exported map displaying incorrectly - regardless of format, even tried various output dpi.

This is what it looks like in Layout View

And is how it exports


texts: Classifying points within polygon, outside of polygon OR within buffer at polygon edge using R

texts:
I have two objects, a SpatialPointsDataFrame, "points" and a SpatialPolygonsDataFrame, "world_buffer" (both +proj=utm +datum=WGS84). The SpatialPolygonsDataFrame is the world's coastlines, found here, with a 5 km buffer around it, computing using gBuffer().
I am trying to classify the "points" as either within the polygon (land), within the buffer (coast), or outside of the buffer (ocean).
I have tried using st_intersection() to get the points within the buffer:
library(sf)
points_within_buffer <- st_intersection(points, world_buffer)

But this gives the following error:
Error in UseMethod("st_intersection") :
  no applicable method for 'st_intersection' applied to an object of class "c('SpatialPointsDataFrame', 'SpatialPoints', 'Spatial', 'SpatialVector', 'SpatialPointsNULL')"

And the above code won't classify points on land or ocean anyway. I'm used to using ArcMap for spatial analyses but am trying to move to R.


texts: QGIS Desktop 3.10.6 works fine when I use my laptop at the office but stops responding when using it at home

texts:
I'm stumped on why my QGIS performance is terrible when working from home but fine in the office.
I am not using a vpn, all the files being used are on local hard drive, internet works fine at home, but despite this QGIS stops responding on start up and when ever I click a button or move the screen (not exaggerating, literally just clicking the identify features or pan button makes QGIS stop responding for 2-3mins).
I have no issues like this with other GIS software when working at home. When I used QGIS in the office on the same computer there are no issues.
Does anyone have any ideas why this is happening?


texts: How to load leaflet WMS layer with a CRS other than the map's CRS?

texts: I have a leaflet map initialized with EPSG 3857. I need to add new WMS layer that has projection EPSG 2320. I checked proj4leaflet; but I'm not sure whether a layer that has CRS different than main map's CRS can be displayed. Is it possible?


texts: Finding nearest line from points in SpatiaLite?

texts:
I have writtern a query in Spatialite to get the nearest line from a point. I want to do that for all points. How can I modify the below codes:

SELECT g1.id As gref_id, g2.id As gnn_gid

FROM CLP_substations As g1, ib5000_contours As g2

where g1.id = 1 and g1.id <> g2.id

ORDER BY ST_Distance(g1.geom,g2.geom)

limit 1


texts: Import BMP raster with worldfile (tfw) into QGIS

texts:
I need to get a few non-georeferenced bmp files into QGIS, Grass or any open source platform. I have tfw files available with no indication on the projection but cannot seem to find a procedure (gdal) or other.
Can someone point me in the right direction.
The content of the tfw file looks like this.

0.69006772
0.00000000
0.00000000
-0.69006687
378391.91200000
5800514.33000000


texts: QGIS 3 Atlas: text box expression for automatically displaying names of all visible features?

texts:
I am currently working with the QGIS (3.6) map composer using the atlas tool; it's quite handy, but I've come across a small problem and I'm wondering if there is a solution to this.

The coverage layer is a multi-polygon layer with different survey fields (see image)

I would like to add a text box to the map layout automatically displaying the name of the current feature (in the centre), as well as the names of the other visible features in the map layout. For example, the text could read "map showing the outlines of field_a, field_b, field_c etc."

I know that I can use the "expression"-function for obtaining the name of the current feature, but is there also an expression to obtain all of the other ones?


texts:
I want to understand how "world files" are created. I found some definitions, like:

http://en.wikipedia.org/wiki/World_file

which says that the 2 last lines in the file are x and y coordinates of the center of the upper left pixel. I want to know if those coordinates may be given in decimal degrees? All examples I found gave UTM coordinates without the zone, what means one just cannot know where the image is from!

Am I missing something important here?


texts: Convert Some unknown location format to Decimal format

texts:
I have seen one Website, which contains the coordinate and other information. I found that coordinates is in a different format, I can't convert to decimal format.

The Website is : Check here Information

In this site, the last column contains the coordinates, which need to convert into decimal format.

After click on the Mountain name, I can get the decimal format, but I don't want to click 5000 times.

For Example.

Curent format is :

  568'830 / 89'080

TO

  45.95258N   7.03665O

I want to convert this coordinate format to decimal geolocation format anyhow. It should be online or offline.


texts: Passing each parsed file name to next tool in ModelBuilder?

texts:
I cannot get the Parse Path tool to pass each file name to the next tool. In the example shown, the Raster to Ascii tool will take the first entry in the 'filename' variable list as part of the output name. But when it runs the next iteration, the Raster to Ascii tool uses some generic file naming convention. 'filename' is set as a precondition for the R2A tool.

Example:
raster1.tif
raster2.tif
Run the Model in Batch mode, using tifs as parameters.
1st output = raster1_asc.txt
2nd output = RastTo_rast.txt <--- this is wrong.

Summary: Raster to Ascii tool sucessfully uses the filename variable as inline variable as part of the output file name. However, the the Raster to Ascii tool uses a generic naming convention for the following files (running Model as Batch).

Does anyone have an insight as to why this is happening?


texts: Missing tiles when Django application is hosted on an Apache server

texts:
I'm building a GIS application using Django as my web framework and OpenLayers to implement a slippy map interface. I was initially using the Django runserver for development and everything was working fine. However, I recently ported my app on an Apache server and I started seeing some missing tiles as below:

It's not always the same tile that is missing and usually there are two or three missing tiles. Sometimes, after refreshing the page several times the tiles appear properly. There are no missing tiles when I zoom in or out. Note that the page keeps on loading for an indefinite amount of time when I experience this issue.

I'm using a TMS layer to display the map using data from the GSHHS database.The map is being rendered via a Mapnik XML file which uses the GSHHS shapefile.

Unfortunately, at this point I'm unable to paste any code over here since I'm unable to login to SE from work. I'll try to post some code later. I have no idea as to what might be causing this problem. There is nothing helpful in the Apache and Django log files. Any help would be greatly appreciated.


texts:
I need to turn labels on for previously used layer.
Here is the code:

import arcpy
import sys
from arcpy import env

env.overwriteOutput = 1
gp = arcgisscripting.create(9.3)

fc_Mord = arcpy.GetParameterAsText(0)

mxd = arcpy.mapping.MapDocument("CURRENT")
layer = arcpy.mapping.ListLayers(mxd, "Mord")[0]
if layer.supports("LABELCLASSES"):
for lblClass in layer.labelClasses:
    lblClass.expression = "[ArcID]"
    layer.showLabels = True
arcpy.RefreshActiveView()
del mxd

I want to use variable fc_Mord instead of layer name Mord, because user can name the layer (in previous steps) as he/she wants.

I have tried this, but it doesn't label the layer

tempLayer = "tempLayer"
arcpy.MakeFeatureLayer_management(fc_Mord, "tempLayer")

mxd = arcpy.mapping.MapDocument("CURRENT")
layer = arcpy.mapping.ListLayers(mxd, tempLayer)[0]
if layer.supports("LABELCLASSES"):
for lblClass in layer.labelClasses:
    lblClass.expression = "[ArcID]"
    layer.showLabels = True
arcpy.RefreshActiveView()
del mxd

What am I doing wrong here?

Edited code

mxd = arcpy.mapping.MapDocument("CURRENT") #Map document reference
def label(fc_Mord, field):
   for lyr in arcpy.mapping.ListLayers(mxd):
       if lyr.name == fc_Mord:
           if lyr.supports("LABELCLASSES"):
               for lblClass in lyr.labelClasses:
                   lblClass.expression = "[ArcID]".format(field)
                   lyr.showLabels = True
arcpy.RefreshActiveView()
del mxd


texts: Use ST_ApproximateMedialAxis with 3D geometries


texts: I need to convert some GeoTIFF images to little endian scaled .R16 (16 bit raw files) for unreal engine import

texts:
I have 1188 1/3rd ArcSecond resolution at 1 x 1 degree each which I wish to convert to unreal engines R16 ( Raw format ). I am working at this point in Python.
The problem is I can not tell how to store the data which needs to be stored which ranges from -111.04m to 4414.23m his apparently needs to be multiplied by 100 to put it into unreal units ( centimeters ) and then divided by 512 or if you prefer multiplied by 0.001953125, and the result stored in an unsigned word in little endian format.
Now as far as I have been able to ascertain, unreal .R16 files are Unsigned 16 bit words per height point.
0x0000 is the lowest point, 0x00B0 is the middle point and 0xFFFF is the high point
Bare in mind that the middle value is stored this way but actually reads 0xB000 in hex normally.
So with the range of my values being -111.04 to 4414.23 I will have add 112 to both ends in order to take into account "below sea level values on land" which gives me a range of 0 to 4526.23.
Looking at the top value and multiplying it by 100 I get 452623cm then divide by 512 I get 884.029296875.. Now 884 I can actually store by converting to hi low bytes and storing it but I would lose quite a range of values.
Can anyone tell me how I would store this data in an unreal R16 file without data loss (without referring me to a 3rd party program to do the job)?


texts:
I realized a project with OpenLayers 3 some time ago, but now I do not understand anything anymore.

I should install any packages?

npm install ol. But even that does not work.

I now have the package "v5.1.3.zip Includes all the above plus examples, API docs, and sources." downloaded to the server. Within this package all examples work, but if I copy the codes displayed in the examples into another file, nothing works.

As well as?

It is everywhere this "import" specified, but it is missing in the HTML header, the reference to the OL Script.

What's going on there?

I currently want to put several markers via Lat Lon, nothing more. But I fail already at the beginning.

The "Quickstart" "Put a map on a page" works.
https://openlayers.org/en/latest/doc/quickstart.html

Then i go to the "Tutorial" page.
https://openlayers.org/en/latest/doc/tutorials/
and found "import", "import", "import", ...
I found a answer about "import" by mozilla...

Then i go to the "get the code" page and download the code.
https://openlayers.org/download/
More infos about this on the top.

I "install" the ol via npm.

I go to the "example" page.
[Link: max 3 ...]
On the example pages are code blocks.
I copy a code block and insert it into a new file. nothing works.
...
I have no idea what now.

What do you want to hear?

I have no idea what I have to do.

Where is a tutorial and examples that work?

for latest.
It is also very difficult to find something, because there are now many different versions of OL (1-2,3-4,5) and rarely the tutorials and examples are marked with the version on the internet.


texts: Using ArcGIS Pro raster statistics functions to calculate percent of pixels with range of RGB values?

texts:
Working in ArcGIS Pro 2.0 for this task.  I am fairly inexperienced working with raster functions.  I am trying to utilize a raster clip of a parking lot from NAIP 1m imagery.  Essentially, this process will compare the percentage of pixels in the clip which are asphalt as compared to the percentage which are not.  Asphalt will be defined using a range of pixels in each band.
 For example pixels which fall within these bounds for all three layers would be considered asphalt, while the rest would not:

Red 100 to 155
Green 105 to 160
Blue 105 to 140

I am not sure what functions to look for.

How can I construct this process?


texts: QGIS Misaligned Shape with Google Maps/OSM

texts:
I am using QGIS for a project.

I have started a new project from scratch within QGIS and have a set of Shape files that were given by the official government authorities.

The problem is that when I use Google Maps or OSM imagery I have a misalignment of about 200 meters, as you can see in the image provided.

I have set the SRC of the project to WGS84 EPSG:4326 so I can work in lat long.

The shape provided is in SRC:

ETRS89 / Portugal TM06 EPSG:3763.

I have also another shape, that is aligned with the previous in the SRC:

Lisboa_Hayford_Gauss_IGeoE EPSG:102164.

Both the shape files are aligned but not with Google Maps/OSM.

I already tried numerous SRC to fix this problem but it persists.

Am I doing something wrong here?


texts:
I work in a company that uses QGIS on every computer. We chose to only install LTR versions as a precaution. So when the 3.4 version came out, we launched the installation on every computer. It was precisely the version 3.4.5.

This version crashes often (sometimes too much). We'd like to update to the current 3.4.11 that maybe helps with those bugs. But each update means a new QGIS program on our computer, it does not replace the old one.

I came here to ask what is the best way to upgrade between LTR version on Windows 10 ?

I saw two solutions that may answer my question, but I wanted to know if there's a better way (btw, I'm not the IT guy, so I can't test them myself):

OSGeo Network: can I use it to remove and reinstall a new version?
NextGIS: is it still up to date with QGIS 3+?

Should I use something else?


texts:
I'm new to OpenLayers and GeoServer and I have a problem (of course :P).
I must retrieve a layer from a GeoServer WMS service, and I want to construct the URL to request it. If I try to make this:

map.addLayer(new OpenLayers.Layer.WMS("test",
    "http://192.168.0.30:8080/geoserver/dsn/wms?service=WMS&version=1.1.1&request=GetMap&BBOX="+map.getExtent().toBBOX()+"&srs=EPSG:900913",
    { layers: "area", transparent: true, format: 'image/png' })
);

all the tiles of the grid of the WMS are the same (I see a sort of periodic repetition of the  image) but if I do

map.addLayer(new OpenLayers.Layer.WMS("test",
    "http://192.168.0.30:8080/geoserver/dsn/wms?service=WMS&version=1.1.1&request=GetMap",
    { bbox:map.getExtent().toBBOX(), srs:"EPSG:900913", layers: "area", transparent: true, format: 'image/png' })
);

everything is working as expected.

What am I doing wrong in constructing the URL?


texts: Setting extent of Geostatistical Layer for further Export to Grid using ArcPy

texts:
I am writing a script to create JPEG interpolational maps using Geostatistical layer (calculated on RadialBasisFunctions).
I have a point-feature file which I use to create this GA Layer. There's a huge block with cycle, but here's the trouble inside:
    arcpy.RadialBasisFunctions_ga(inPointFeatures, zField, outLayer, outRaster, cellSize, searchNeighbourhood, rbf, smallscaleParam)
    arcpy.GALayerToGrid_ga (outLayer, "gs_raster")
    ......
    addLayer = arcpy.mapping.Layer("gs_raster")
    arcpy.mapping.AddLayer(dataFrame, addLayer, "TOP")

Well, it works, but I need (as you can see on the screenshot) the extent of this GA raster to be the same as this tiny red boundary line shapefile (So I would use it after in ExtractbyMask)

I just don't know how to apply an extent to this raster.
How can I implement such a setting of extent here in the script?


texts: OpenLayers 6 layer source parameter refresh problem

texts:
I'm trying to refresh a source with some parameter. There is a text input control on the html page, I look forward to updating the map based on user input after clicking the button, but it doesn't work.
The code is below:
var untiled = new ol.layer.Image({
    source: new ol.source.ImageWMS({
      ratio: 1,
      url: 'http://localhost:8080/geoserver/newyork/wms',
      params: {
            "LAYERS": 'newyork:viewStation',
            "viewparams": 'id:'+10
      }
    })
  });

var map =new ol.Map({
    target:'map',
    layers:[
        new ol.layer.Tile({
            source:new ol.source.OSM()
        }),
        untiled
    ],
    view: new ol.View({
        center:new ol.proj.fromLonLat([-73.9,40.8]),
        zoom:10
    })
});

function repaint(){
    var num=document.getElementById('textfield').value;
    untiled.getSource().updateParams({'id':num});
    untiled.getSource().refresh();
}

var bnt=document.getElementById('button');
bnt.addEventListener('click',repaint)


texts: Function to convert Dictionary to Image works for an image but not for an image collection

texts:
I have written a small function that first takes an image, calculates mean for each of its bands and then converts the dictionary of the mean value to an image with each mean value acting as a new band to the image.

When I applied this function to one image, it worked. However, when I mapped this function to an image collection, it shows an error.

I didn't quite understand what the error mean. Also, I think the function is actually being executed in the image collection as well because when I print the results, I don't get any error. The error occurs when I try to add the result as a layer.

The link to the code is below:
https://code.earthengine.google.com/3b0279b87c668347dccae455b4e42974


texts: Drawing a rectangle that will always be on certain area of map

texts: Using OpenLayers is it possible to draw a rectange that will always be on one portion of map without regards to zooming and panning of map?


texts: Getting class values to correspond in each of 5 Landsat thematic maps processed using Supervised Classification in ArcGIS Desktop?

texts:
I have used Supervised Classification (Maximum Liklihood) to produce thematic maps from Landsat imagery in ArcMap for the years 2004, 2006, 2009, 2013, 2015. I have produced 9 land-use classes. I now want to examine 'from to' change between years, but the class values in each map vary.

How do I get the class values to correspond in each of the maps?


texts: How to study qgis generated tiff images for water flow/resources ?

texts: I am new to qgis. I have created tiff images from modis data using qgis. I want to study the water flow/resources from those images. As I am new to this field I don't understand how to study those images. Please help me in this regard. Please provide me any suggestion, link or tutorial from where I can understand how to study those images for water flow or resources.


texts:
I am having problems installing Qgis on Ubuntu 14.04 (Trusty).

I tried several approaches: installing from the Ubuntu standard repos, installing from http://qgis.org/debian and installing from http://qgis.org/debian-nightly, using both apt-get and aptitude.

Everytime, the installation fails because libnetcdf.so.6 cannot be found:

Setting up qgis-providers (2.3.0+git20140530+ca6d4d9~trusty1) ...
/usr/lib/qgis/crssync: error while loading shared libraries: libnetcdf.so.6: cannot open shared object file: No such file or directory

ls /usr/lib/libnet* gives:

/usr/lib/libnetcdf.a       /usr/lib/libnetcdf_c++.so.4      /usr/lib/libnetcdff.so        /usr/lib/libnetcdf.so        /usr/lib/libnetpbm.so.10
/usr/lib/libnetcdf_c++.a   /usr/lib/libnetcdf_c++.so.4.1.0  /usr/lib/libnetcdff.so.5      /usr/lib/libnetcdf.so.7      /usr/lib/libnetpbm.so.10.0
/usr/lib/libnetcdf_c++.so  /usr/lib/libnetcdff.a            /usr/lib/libnetcdff.so.5.1.0  /usr/lib/libnetcdf.so.7.1.1

So the library is indeed missing.


texts:
I have a GeoJSON file which represents geographical polygons.
Drag and drop to QGIS3 opens the file and I can see the polygons.
Each polygon has several properties identified by QGIS (Can see them via Layer Properties-> Fields)
Is there a way to display these fields (I only need one) on the map?


texts:
Geoserver MimeType Problem

Environment: OL2, Tomcat 7, Geoserver 2.7.0, PostGIS-DataStore in Geoserver

I have created a Website, first at Local Machine, then transferred the project to AcuGIS.
Before I was working with XAMPP and Apache, Geoserver was on different Location (localhost:5000) and everything was working fine, but after transfer I only get "Pink Tiles" and mime type error.

On AcuGIS they offer a package with geoserver, tomcat etc. Transferring, setting up connections to PostGIS (I have created PostGIS stores in Geoserver) everything seems working fine, even the Proxy works. Okay.

Layer previews in Geoserver with OL3 (even though I am working with OL2) are showing up as expected.

In fact I the core use of my WebApplication is loading GeoJSON Layers. But to show
additional Informations (parameterized SQL Views, WFS for creating features) I rely on
getting Geoserver and WMS / WFS to work.

So in my OL Javascript I request the exact URL where my Geoserver Data Store and everything is:

function init() {

OpenLayers.ProxyHost = "/cgi-bin/proxy.cgi?url=";

var format = "image/png";

var trailsGeoserver = new OpenLayers.
//"http://localhost:5000/geoserver/Master/wms"; "http://mtb-         trailfinder.com:80/geoserver/MASTER/wms"

    var trailsGeoserver = new OpenLayers.Layer.WMS(
        "Trails Steiermark", "http://mtb-trailfinder.com:80/geoserver/MASTER/wms" ,
        {
        "LAYERS": 'Master:scale',
        transparent: true,
        format:format

        },
           {
            buffer: 0,
            displayOutsideMaxExtent: true,
            isBaseLayer: false,
            projection: 'EPSG:4326',  // dient nur der Information
            visibility: false,
            transitionEffect: 'null'
            }
    );

        map.addLayer(trailsGeoserver);

 } // end of Init

This is my reduced code for troubleshooting, with just one WMS, instead of 10.
So the funny thing is, that replacing the URL of the WMS with my localhost:5000 Adress, everything works fine!

However putting the URL to the Geoserver on my WebHost (which in fact is showing me the right png in layer preview) it comes back as mal formatted, with

"Content-Type: application/vnd.ogc.se_xml;charset=UTF-8"

Status Code is allright (200).

And this is my error log in Chrome Debugger:

Resource interpreted as Image but transferred with MIME type    application/vnd.ogc.se_xml: "link..." (cannot displayed due to lack of reputation).

When I click on that link I get back an XML File with following Message:

      Could not find layer Master:scale

So I am really confused, because on my localsystem everything works just fine, took me a week to investigate the problems I am facing right now, without any real success.

I also have been looking in all Forums, but they all differ from my problem.

//

So until now my guess is, that the tomcat server is not working properly.
Geoserver instead works fine, asuming this because of the working Layer-Previews.

Something messes up the Server response on AcuGIS. But I don´t have any clue what this is.

For inspection the Website is available on www.mtb-trailfinder.com.


texts: Can we combine SVG Overlay with MarkerCluster v3?

texts: I have searched here and there on how to prevent the overlapping circle (svg) layer created from json file. Poor me, no luck till now. Since I doesn't know how to prevent the overlapping circle I thought of using the MarkerCluster. The question is can we combine SVG Overlay on Google Map with MarkerCluster v3? The circle will be placed based on coordinate stored in the json file.


texts:
I want to use an ORM  to retrieve some data from The SQLServer such as  user permissions. I am using ArcObjects SDK 10.4 .

Although I have added  the EntityFramework 6.0 and  my tables  to  a model , but in runtime it says  there is not any ConnectionString Name  for my Context.

Is is possible to  use EF  in ArcObjects?


texts: Creating mercator projection for Mars planet in QGIS?

texts:
I would like to insert a new SRC in QGIS, like a Mercator projection for Mars.

I selected personalised projection in "preference" icon. I clicked on add a new SRC:

Name: MarsMercator
parameters: +proj=merc +lon_0=0 +k=1 +x_0=0 +y_0=0 +a=3396190 +b=3376200 +units=m +no_defs

Then I saved this new projection.

However, when I chose this new projection, my raster layer is not visible.

Any ideas?


texts: What is the difference between ArcGIS Online and Living Atlas?

texts:
Using ArcMap 10.8.1, I can display layers stored on ArcGIS Online using the Add Data dropdown:

When I subsequently select the ArcGIS Online option, I get a smorgasboard of layers that ESRI and others have made available for display in my ArcMap session:

But I'm also aware of an ESRI website called the ArcGIS Living Atlas of the World, that claims to be "...the foremost collection of geographic information from around the globe. It includes maps, apps, and data layers to support your work."
That sounds suspiciously like the aforementioned ArcMap ArcGIS Online!
So what are the differences (if any) between the ArcMap ArcGIS Online layers and ArcGIS Living Atlas of the World?  Do they contain the same data?  Is one a subset of the other?  If they are different, why can't I access the Living Atlas from the ArcMap Add Data dropdown?
A Google search turned up nothing; nor did I find any distinguishing description at the ESRI site.


texts: Using QMessageBox to debug during QGIS plugin development?

texts:
I am developing a plugin in QGIS 3.4 and usually I debug with QMessageBox. Everything is running ok until I debug a list and the result was this one.

What happens?


texts: ArcGIS (10.3) - Export to PDF text fonts unreadable

texts:
ArcGIS (10.3) Export to PDF fails (text fonts show up as cryptic symbols - unreadable).

When exporting to JPEG, TIFF or PNG, the fonts show up correctly.
This is after ArcGIS new installation, it worked fine on the old desktop PC. Now Windows 10, on notebook. Same configuration works fine on all colleagues PCs. It looks OK When I use "print" (with PDF creator) instead of "export" from within ArcGIS.

Any suggestion why export cannot provide maps with correct fonts?


texts:
I'm trying to create a script which I give the center of a rectangle (in coordinates) and the preferred width and height (in metres) and return me the coordinates of four angles.

Any idea about the implementation?


texts: Using ArcGIS Runtime SDK for .NET, problems adding DEM raster layer to Map.OperationalLayers

texts:
I'm having problems (not in every case, but when attempting to display some rasters on the map) with either none or some of the Elevation (DEM) Raster Layer not showing up on the map.  However, when I bring the raster into ArcMap, the image looks fine.  This only happens with the rasters that I assign the Elevation color ramp stretch renderer to.  It doesn't happen with rasters that I don't assign a renderer to (although I don't know if that has anything to do with it).

This is what my C# code looks like . . .

using Esri.ArcGISRuntime.Mapping;
using Esri.ArcGISRuntime.Rasters;

var newRaster = new Raster(rasterPath); // create the raster object from the image file
var newRasterLayer = new RasterLayer(newRaster); // create the raster layer object from the raster
double[] minVals = { min }; // minimum value for stretch parameters input
double[] maxVals = { max }; // maximum value for stretch parameters input
MinMaxStretchParameters minMaxParams = new MinMaxStretchParameters(minVals, maxVals); // create stretch parameters object
ColorRamp elevationColorRamp = ColorRamp.Create(PresetColorRampType.Elevation); // create the color ramp
var rendrr = new StretchRenderer(minMaxParams, null, true, elevationColorRamp); // create the renderer from the above
newRasterLayer.Renderer = rendrr; // apply the renderer to the raster layer
newRasterLayer.Opacity = 0.6; // set the opacity
var mapViewModel = ServiceLocator.Current.GetInstance<MapViewModel>(); // get the map view model
mapViewModel.Map.OperationalLayers.Add(newRasterLayer); // add the raster layer to the map

Is this a known issue to do with displaying DEM rasters on a map (perhaps relating to OperationalLayers object)?


texts: ArcGIS Solar Radiation tool says output global radiation raster empty?

texts:
I am using ArcGIS 10 with windows7 64 bit on core i7 processor
I am working with ArcMap 10 solar radiation tool to create the area solar radiation map. Every time I run the tool it stops after some time after creating raster layers that are empty. And i receive this message

  output global radiation raster empty

What should I do as it is my first experience with arctoolbox.
i have tried running tool with both

GTOPO 30 and SRTM 3 arc second data
projection coordinate for GTOPO 30 was WGS 84
and for SRTM it was UTM

Is there something wrong with the DEM I used?
Or ArcToolBox?
or do i need to change the environment settings?


texts:
I would like to remove all wms layer from Data Source Manager?

Is it possible to do it all at once?

I have a lot of wms servers added.
When I try to import short list it is added to the existing list.
Maybe there is a file containing this data.

I know how to export, import, but how to remove all at once?

Edit:
It worked very good! I opened the file in Notepad and removed all lines with "connection-wms". After that I have added new list of WMS.
I am really greatful for your help! I hate to have a mess.


texts: ArcGIS Javascript API: Adding a shapefile with more than 1000 points

texts:
I am able to add shapefiles with less than 1000 points by using the ArcGIS Portal REST API as shown in this example: https://developers.arcgis.com/javascript/jssamples/portal_addshapefile.html

However, there is a 1000 point maxRecordCount through their service. I have tried setting the maxRecordCount in the publishParameters without any luck. I also thought it may be possible to publish our own service with a raised maxRecordCount, but I am not very experienced in publishing custom scripts and did not know whether there was a toolbox that already provided this functionality.

So my question is, is there a way to use the ArcGIS Portal REST API to return more than 1000 records? If not, what would be the best approach to solve this problem?


texts: Import GeoJSON in QGIS with file name as layer name?

texts:
When I add a GeoJSON layer to my QGIS project, it always gets the name "filename name_field_value".

For example, file named CZ0100554782.geojson is as layer in QGIS named "CZ0100554782 Praha"

I need import in QGIS thousands GeoJSON files, is it possible to have layers named only as file?


texts: ArcGIS for Javascript : Locate Widget Activate Popup for Layers X > Z?

texts:
Using ArcGIS for Javascript I have a map with a City Council District feature layer. I would like for the user to enter their address in the 'Address Finder' / Locate Widget (that's what it's called in Flex) and when the dot appears on the map I want the City Council District Layer popups to be triggered.

The popup currently says, "You are in [Councilor]'s district, number [Distr#]."

So if they type in their address, "1234 Sesame Street" and that is in district #3 which is Councilor Smith, what I want to happen is to see the address finder drop the dot on the map where the address is and have a popup say, "You are in Smith's district, number 3."

Is this possible and if so, how?

Update: 08APR14

I am including my working code as I progress. When I get this working I will post it as an answer.

The following code will drop a pop-up window that is empty onto the screen. Now I am trying to figure out how to programmatically "click" on the screen at the center of the GeoCoder's search results.

require
    (
        [
            "esri/map",
            "esri/dijit/Popup",
            "esri/layers/FeatureLayer",
            "dojo/dom-class",
            "dojo/dom-construct",
            "dojo/on",
            "dojox/charting/themes/Dollar",
            "esri/dijit/Geocoder",
            "esri/geometry/Extent",
            "esri/SpatialReference",
            "dojo/domReady!"
        ],
        function( Map, Popup, FeatureLayer, domClass, domConstruct, on, theme, Geocoder, Extent, SpatialReference )
        {
            var popup = Popup( { titleInBody: false }, domConstruct.create("div") );

            var locatorURL = "http://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer";

            var map = new Map("map", { basemap: "gray", center: [-95.989658, 36.155520], zoom: 13, infoWindow: popup });

            domClass.add( map.infoWindow.domNode, "myTheme" );

            var featureLayer = new FeatureLayer
            (
                "http://maps.cityoftulsa.org/gis/rest/services/StarterMaps/extCouncilDistricts/MapServer/0",
                { mode: FeatureLayer.MODE_ONDEMAND, opacity: 0.4, outFields: ["*"]  }
            );

            map.addLayer(featureLayer);

            // XMin: -10779302.92 YMin: 4210801.07 XMax: -10504129.62 YMax: 4394249.94
            // Taken from: http://developers.arcgis.com/javascript/sandbox/sandbox.html?sample=map_currentextent
            var extCityOfTulsa = new Extent
            (
                -10779302.92,
                4210801.07,
                -10504129.62,
                4394249.94,
                new SpatialReference
                (
                    { wkid:3857 }
                )
            );

            var myGeocoder = [ { url: locatorURL, name: "Address Locator", singleLineFieldName: "Single Line Input", searchExtent: extCityOfTulsa } ];

            var geocoder = new Geocoder
            (
                {
                    map: map,
                    geocoderMenu: true,
                    value: "175 East 2nd Street",
                    maxLocations: 10,
                    autoNavigate: false,
                    autoComplete: true,
                    arcgisGeocoder: true,
                    geocoder: myGeocoder
                },
                "search"
            );

            geocoder.startup();

            function popThatCouncil(results)
            {
                var resGeom, resFeat;

                for (var i = 0; i < results.results.results.length; i++)
                {
                    console.debug(results.results.results[i], " at index ", i);
                    resGeom = results.results.results[0].feature.geometry;
                    resFeat = results.results.results[0].feature;
                }

                map.centerAndZoom(resGeom, 20);
                map.infoWindow.setFeatures(resFeat);
                map.infoWindow.show(resGeom);
                geocoder.inputNode.blur();
            }

            geocoder.on( "find-results", popThatCouncil );
        }
    );


texts: Implementing output file extension considering type of workspace in ModelBuilder?

texts:
In Modelbuilder, I am trying to implement a condition regarding the type of workspace:

if this is a GDB, the output FC should not have an Extension
(%Scratch%\Nodes_%NameFC%)
If this is a Folder, the FC Output should
have one.    (%Scratch%\Nodes_%NameFC%.shp)

So far, I built this thinking to use it somehow as a variable to add an extension to the OutputFC if needed.

In the first case, the returned value is 1, which is "wrong" because the Output Workspace is a fgdb and in the code block, 1 is supposed to be False.
In the second case, it's not returning anything as the Output Workspace doesn't have any Extension.
There is a message (when running the first set) ERROR 000539: Error running expression: gdb (...) name 'gdb' is not defined

Does anyone know what is going on here?


texts: ArcMap basemap imagery does not shift, regardless of transformation selection

texts:
I commonly use ArcMap with a Lambert Conformal, NAD83 HARN CRS.  When adding the ESRI imagery map service (either from the Add Data > Basemap option, or from the Add Data from ArcGIS Online option) the imagery displays, followed quickly by the Geographic Coordinates System Warning window:

I understand that a datum shift is required, so I dutifully click the Transformations button, select the appropriate transformation, click Ok, and continue mapping.  So far, so good.
Over the years, however, I've noticed that no matter which transformation I select, the ESRI imagery never shifts (remember that the imagery already exists, because it appears before the Warning window).  Furthermore, even if I don't click the Transformations button, and simply click Ok, the ESRI imagery does not shift, even when zoomed in.
In other words, the position and shape of the initial ESRI imagery does not change, no matter which options are selected in the Warning window.  I've asked a few GIS associates about this behavior, and they all replied that they never clicked the Transformations button, instead simply clicking Ok.  When pressed, they all said that it didn't make any difference, which seems to validate my experience.
But this has got me curious: why have the Warning window at all if none of its options make any difference?  What happens internally if I simply click the Ok button without selecting a transformation?  The ESRI help section is silent on this issue.


texts: Accessing Print Composer Menu Items through Python?

texts: I am using the print composer plugin for map composition, I want that whenever a user exports the final map, the corner coordinates , label tittle and other attributes I want to push my database. How to I get access to the export Button ?


texts: Is there a way to bulk load layers and layer styles together into PostgreSQL database?

texts:
So, I have local QGIS project file and hope to export all the layers and their styles altogether into PostgreSQL.

My overall aim is to access project file directly from DB. I know QGIS has function to save the entire project into PostgreSQL, but it only saves the state of workspace, so it still accesses local shapefiles if not export them into DB.

Is there any possible solution?


texts:
I am working on a tool for my map but I’m running into some problems using gs:Clip.  The user draws a line. All the polygons from a certain layer that intersects the drawn feature have an attribute that is supposed to be calculated (the total sum is wanted). So, for instance, the user might draw a line that crosses two polygons with attribute values of 2 and 4, thus the code should return 6.

It works by saving the user drawn line in an OpenLayers vector layer. The feature drawn is then used (in WKT format) in a chained WPS request. A gs:Clip request (WKT used for clipping) is used as the input for a gs:Aggregate request. Complete code for the WPS request can be found here. The problem is that polygons that do not intersect the drawn line but are close to it are also part of the calculation. See the picture below, it might illustrate the problem somewhat better.

Below is part of the code from the response of gs:Clip (an unwanted feature). No boundedBy coordinates nor any coordinates after the feature:the_geom tag. All the features that should be clipped (corresponding to the drawn lines in the picture above) contains coordinates, but for some reason features that are not within the clipping area gets added to the wfs-FeatureCollection and are consequently part of the gs:Aggregate calculation, causing the end result to be incorrect.

//This is a feature that is unwanted in the response
<gml:featureMember>
<feature:IR_Y fid="IR_Y.1295">
     <gml:boundedBy>
        <gml:null>unknown</gml:null>
     </gml:boundedBy>
     <feature:the_geom>
        <gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#3010">
           <gml:polygonMember />
        </gml:MultiPolygon>
     </feature:the_geom>
     <feature:BT>5</feature:BT>
  </feature:IR_Y>
</gml:featureMember>


texts: Draw great circle rays from a single point along specific directions

texts:
How can I draw great circle rays starting from a single given point P (for example, from coordinate [34 N, 116 W] in this map) and along directions D1, D2, ... (for example, 30, 45 and 135 degrees) in QGIS? I do not have any shape files or other vectors for the lines. All I have is a point which can either be imported or selected interactively.

Note that I'd like to plot rays, not paths, since I don't have a destination point (only the direction). However, the map will finally be clipped to its extents, so if it makes things simpler, I can also generate points outside the map with the desired direction and import them.


texts: Displaying ArcGIS Server dates without javascript localized date offset?

texts:
Esri recommends that databases are in UTC time. And if I’ve got this right, unless you set a time zone in your layer, you are entering a date in a date field as UTC. Mostly this is fine.You understand that the date refers to Pacific time for instance. You understand the date comes back to you the same value you put into the field. The problem comes when the browser or iOS or whatever device automatically localizes on initialization of a Date object.

Problem: When ArcGIS Server returns a date, it sends milliseconds since epoch UTC (unix time). However, the Javascript Date object always creates a localized date when you use that to instantiate a Date object, e.g. Pacific Daylight Time, moving it back -7 hours. Thus, March 16 0:00am in the data becomes March 15 5:00pm — one day early. How do you get the actual time storedin the database?


texts:
I have a shapefile (points) that contains the coordinates of a number of cities in a mountainous area (valleys separated by mountain ridges), and a DEM of the area. I would like to calculate the approximate size (area) of the valley each city is located in, using QGIS.

Of course, this depends on how you define a valley. I guess I would need a combination of elevation and slope.

Does anyone have an idea how I could do this?


texts:
I'm trying to use existing OSM style file like those of AsgerPetersen (https://github.com/3liz/osm-in-qgis/tree/master/styles/openstreetmap/geofabrik) or anitagraser's (https://github.com/anitagraser/QGIS-resources/tree/master/qgis2/osm_spatialite) but always got an error = *

  "
  unexpected character à la ligne 31 colonne 72
  "

I'm on mac osX QGIS 2.2


texts: Error in calling interpolation plugin for IDW in QGIS python

texts:
I wanted to call the interpolation plugin for IDW from python plugin and displays its output on QGIS desktop.

I am able to call the function but the output displayed on QGIS qgis desktop with NAN NAN values.

Below are the lines which I have used to generate the output. OS:UBUNTU

import qgis.core
import qgis.analysis
layer = qgis.utils.iface.activeLayer()

layer_data = qgis.analysis.QgsInterpolator.LayerData()

layer_data.vectorLayer = layer
layer_data.zCoordInterpolation=False
layer_data.InterpolationAttribute = 10 #attribute index starting from 0
layer_data.mInputType = 1

tin_interpolator = qgis.analysis.QgsIDWInterpolator([layer_data])

export_path ="/home/usr/Documents/After Krigging/2.asc"
rect = layer.extent()
output = qgis.analysis.QgsGridFileWriter(tin_interpolator,export_path,rect,300, 300, 1015.33333,728.66667)
output.writeFile(True)

iface.addRasterLayer(export_path, "interpolation_output")

The image below is the output I got after running the above lines.
Can Anyone suggest me what I should do to solve this problem?

It generate the file 1.asc but it have all values as -9999 which is incorrect, can anyone suggest what I need to change in the function call to make sure this kind of data is not generated.


texts: Creating new symbology to be used for ArcMap?

texts:
I have a copy of scanned paper that has all the allotment may symbology that I am going to need them to add them to ArcMap 10.3.1. I have done creating new symbols that I worked on from my Ski Area project. This one is a bit different because you can create new symbols from within ArcMap's Style Manager. This paper has a symbology that was scanned and came from someone.

I have looked at this site http://www.esri.com/news/arcwatch/0113/use-pngs-as-arcgis-picture-marker-symbols.html

I tried with the Paint at work but it does not a good job.

What is a good image to vector that I can go to that are online and it is free?


texts:
I have posted two questions regarding vector tiles on Stackoverflow (1 and 2) but perhaps this is a better place to post it. I have a issue with lines and labels being sliced at the edge of the tiles as seen in the links.

Since this is not the expected behaviour I am wondering if anyone has a solution för this? Using the renderBuffer option when setting up the vectortilelayer makes no difference and I do not know what to try else. Output from Geoserver seems fine. The EPSG used is 3008 but I recall seeing the same behaviour when using 3857.

EDIT: I have now tested using GeoJSON and TopoJSON instead of MVT format and this makes the tiles look as expected. However, labeling is still an issue. And performance since GeoJSON/TopoJSON returns ol.Feature instead of ol.render.Feature


texts: How do I know what direction a road is drawn in OSM?

texts: I'm trying to add a cycleway bike track to one side of a road, but I can't tell which side is left or right. The docs say "relative to the direction in which the way was drawn in the editor" , but using the iD editor I can't tell how an existing road is drawn. It also doesn't give me any visual clues as to which direction the road is pointed at.


texts: Compute polygons (Data Driven Pages) main angle when having ArcGIS Basic license

texts:
Is there a way we can calculate or when rotating polygons, actualize/update our "Angle" field in the attribute table by using Python? There is a tool in ArcGIS "calculate Polygon Main Angle" but is not supported by ArcGIS Basic license.

My code that works only in Standard license is:

import arcpy
from arcpy import env
import os

polygons = arcpy.GetParameterAsText(0)
angle_field = "Angle"
rotation_method = "GEOGRAPHIC"

arcpy.CalculatePolygonMainAngle_cartography(polygons, angle_field,
rotation_method)

Any hint ?


texts: can't get QgsGraphAnalyzer to work on a standalone script

texts:
I want to use QgsGraphAnalyzer.dijkstra in a standalone script. using version 1.8

I am following the guide at:
http://www.qgis.org/en/docs/pyqgis_developer_cookbook/network_analysis.html

Here is my set-up since that is a big part of standalone

#-*- coding: utf-8 -*-
import sys
import os

#QGIS step up that needs to be done before importing from QGIS
sys.path.append("/Applications/QGIS.app/Contents/Resources/python")
from qgis.core import *
QgsApplication.setPrefixPath("/Applications/QGIS.app/Contents/MacOS", True);
QgsApplication.initQgis()

app = QgsApplication([],True)
from qgis.gui import *
from qgis.networkanalysis import *
from qgis.utils import *
from PyQt4.QtGui import *
from PyQt4.QtCore import *

... code is the same as the tutorial

when i print out tiedpoints, they are the same in the qgis console as well as my standalone
however after i call dijkstra, the qgis console gives a reasonable tree value, but my standalone only gives [-1, -1, -1, -1, -1...] for tree.

edit 1: Figured out the problem!  However I need help with fixing it.
In my standalond script when i do print graph.arc(0).properties()[0].toDouble()
i get (nan, true)

However in the Python console, i get (an actual number, true)

edit 2: I've been working on this, still can't figure out why it's not working.  However, I've narrowed down the problem.  Building the vectorLayer seems to be the same on both inside and outside.  This means the builder.graph() or some step in that area seems to be the problem.

Any thoughts how to fix this.

edit 3: some code:
Here is where I use the director:
I believe the error is in here since graph is returning  (nan,true)  as mentioned above

def getPath(vectorLayer, startX, startY, endX, endY):
 director = QgsLineVectorLayerDirector(vectorLayer, -1, '','','',3)
 #way to calculate edge properties
 properter = QgsDistanceArcProperter()
 director.addProperter( properter )

 #making a builder which makes the graph and setting coordinate reference system
 myCRS = QgsCoordinateReferenceSystem()
 builder = QgsGraphBuilder(myCRS)

 #converting coordinates to Qqgs Points and add it to builder
 startPoint = QgsPoint(startX, startY)
 endPoint = QgsPoint(endX, endY)
 tiedPoints = director.makeGraph(builder, [startPoint, endPoint])
 graph = builder.graph()
 return graph, tiedPoints

to make the vector layer, I simply use
hallwayLayer = QgsVectorLayer(hallways, "hallway", "ogr")
where hallways is a path to the .shp file

here is where I try to use the dij function:

#getting paths
graph, tiedPts = getPath(hallwayLayer, startPointX, startPointY, endPointX, endPointY)

#getting shortest Path on a canvas
map = QgsMapCanvas()
getShortestPath(graph, tiedPts, map)

def getShortestPath(path, indices, canvas):
 startId = path.findVertex( indices[0] )
 stopId = path.findVertex( indices[1] )
 map = QgsRubberBand(canvas, False)
 (tree,cost) = QgsGraphAnalyzer.dijkstra( path, stopId, 0)

edit 4:  Seemed to narrow down the problem even more
inside of qgis when i do

myCRS = QgsCoordinateReferenceSystem()
builder = QgsGraphBuilder(myCRS)
print builder.distanceArea().ellipsoidSemiMajor()

I get the same number.  (I checked this with different variable names to double check this)
When I do it outside i get different numbers, and they all have large e values like
2.19636051247e-314, 2.13599944534e-314


texts: R: overlay a line on a raster stack/brick, and get profile of cell values along the line

texts:
I've combed through R's raster functions and vignettes and can't seem to get this working.

I want to specify a line/vector across a raster stack (a DEM and possibly related variables), and get a profile of values for the cells which the line intersects. I've been able to do something similar using mask with a polygon.

EDIT: Thanks to scw, I have developed the following solution.

# I have a stack of environmental rasters in this format
new_r <- raster(ncol=615, nrow=626, xmn=-156.2, xmx=-154.8, ymn=18.89, ymx=20.30)
res(new_r) <- 0.00225
projection(new_r) <- "+proj=longlat +ellps=GRS80 +datum=NAD83 +no_defs +towgs84=0,0,0"
values(new_r) <- outer(seq_len(nrow(new_r)), seq_len(ncol(new_r)), "+")
stackdata <- stack(new_r, sqrt(new_r))

# I designate two transect lines by long/lat
cds1 <- rbind(c(-156, 19), c(-155.5, 20.2))
cds2 <- rbind(c(-155, 20.2), c(-155, 19.2))
transects <- SpatialLines(list(Lines(list(Line(cds1)), ID = "one"),
                               Lines(list(Line(cds2)), ID = "two")))

# plot the lines to confirm placement
plot(new_r)
plot(transects, add = TRUE)

# and return a list whose length is equal to the number of line segments,
# and each list element is a matrix with a column for each raster layer
e <- extract(stackdata, transects)


texts: Getting values from two-segment list in Google Earth Engine

texts:
i have a two-segment list;
var list =ee.List([
  [101,12155],
  [102,12157],
  [103,12158]])

I can print this list with:
print(list)

And get values for row (0) like this command:
print(list.get(0))

But, how can i get the second values of first rows from this list?


texts: Buffer aggregation method in OpenCarto library

texts: What is the use case of this function? Can it be used to aggregate building polygons as well?


texts: How many A features that fall both in the B polygons and C polygons are for each C polygon?

texts:
I have this apparently complex problem for solving in ArcGIS:

Practically, I need to get the number of all yellow polygons that fall within both the green polygons and the red polygons. I need this for each red polygon.

In other words, I need an attribute column attached to every red polygon that holds the count of yellow polygons contained within the green ones.

I can only think of Spatial Join, but I find it very cumbersome to pass the count of yellow blocks from green polygons to red ones.

Are you aware of any other straighforward tools?


texts: Describe the texture features of the image through a single value in R

texts:
My purpose is to describe the characteristics of the texture of the image through a single value (eg, second angular momentum ASM), similar to what Haralick presents in Figure 4 of his article.

The package 'Rtexturemetrics' by The Hans-Joachim Klemmt seems to do this for me.  Howover I'm not sure what radiometry parameters are required in the input image to make the GLCM.

The function description tells me that the raw data is replacement for the 0-255 range, but the layout of the plotted matrix looks strange compared to the results of python or matlab libraries .

I'm looking for help to understand if genGLCM needs some preparation in the image other than how I perceive it.

    # comparison of pre-processing
    library(RTextureMetrics)
    library(raster)
    # path.list <- list.files(path="C:/r_dren",pattern="len_acc_cf[[:digit:]]*.asc",full.names=T)

    #----Image raw "FLT4S" floating point ----

    image.raw <- raster(path.list[1])
    str(image.raw)
    raw_na <- image.raw[!is.na(image.raw[])]
    image.raw[is.na(image.raw[])] <- mean(raw_na)
    image.raw[] <- as.integer(image.raw[])

class       : RasterLayer
dimensions  : 170, 172, 29240  (nrow, ncol, ncell)
resolution  : 30, 30  (x, y)
extent      : 794418.4, 799578.4, 7400299, 7405399  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=utm +zone=22 +south +ellps=WGS84 +units=m +no_defs
data source : in memory
names       : len_acc_cf0
values      : 0, 36  (min, max)

     #  GLCM  raw.data
    east.right.raw <- genGLCM(direction=1,distance=1,image.raw)
    south.down.raw <- genGLCM(direction=2,distance=1,image.raw)

    # ----Image standarized at 0-255 intervals,"FLT4S" floating ----

    image.stand <- calc(image.raw, fun=function(x){((x - min(x)) * 255)/(max(x)- min(x)) + 0})

    # ----  raster 8b 'INT1U'------

    image8b <- raster(nrow=170, ncol=172)
    image8b[] <- image.raw[]
    dataType(image8b) = "INT1U"
    storage.mode(image8b[])

    # ----- processing GLCM's ------

    east.right.standardized <- genGLCM(direction=1,distance=1,image.stand)
    south.down.standardized <- genGLCM(direction=2,distance=1,image.stand)

    east.right.8b_int <- genGLCM(direction=1,distance=1, image8b)
    south.down.8b_int <- genGLCM(direction=2,distance=1, image8b)

    # ------ plot GLCM's --------

    par(mfrow =c(3,2))
    plotGLCM(east.right.raw)
    plotGLCM(south.down.raw)

    plotGLCM(east.right.standardized)
    plotGLCM(south.down.standardized)

    plotGLCM(east.right.8b_int)
    plotGLCM(south.down.8b_int)


texts: Using Field Calculator to split names but want to start count from right?

texts: Just learning python on my own as I'm working. I have a column of street names where some are two words or three words, so counting spaces from the left to the right is outputting incorrectly for me. I only need to know what the very last word in the line is of data in my column, e.g., Forest Acres Circle, Main St, Bracker Road West. I  tried using STREETNAME!.split(" ",2)[-1]  but with the count of words it is not outputting the correct information.


texts: How can I locate features along multiple routes in a consistent direction?

texts:
I have a large network of routes that I've created based on an NHD plus stream layer and a large number of points that are located throughout this network. I've got the routes segregated by stream as perfect as I can imagine getting them and the points layer is snapped to the routes.  I've QAQC'd and the routes match the streams without duplicates..etc. Everything looks good.

My goal is to determine how far upstream each point is on it's respective stream route. Ultimately this will lead me to stream distances from several fixed points in the watershed to every sample point.

I've been using the Locate Features Along Routes Tool in ArcGIS 10 to do this. At first it seemed like it worked perfectly. But when I looked at the M values for each point I realized that for some routes, measurement started on the downstream end and progressed upstream, giving me what I needed, while on others, measurement started at the upstream end and worked downstream, effectively giving me the opposite of what I need.

I think the definition of the "start" and "end" may be inconsistent among routes (I've checked on this via the Construct Points tool and am pretty sure this is the issue)

Is there a way that I can ensure distance is being calculated in a certain direction on each route?

Any input would be appreciated,

Thanks for your time,

Vin


texts: Unable to add new points to the existent geometry - [Download function is returning the original empty geometry]

texts:
Everything was going well with the app, except for this part, and after hours and hours of investigations, I couldn't find the reason for this apparently simple problem. Why the new points are not being added to the existing geometry? Apparently they are, but the download function is not behaving as a callback function.
The link is returning an annoying empty csv instead of the new drawn points.
Any ideas here?
Code here
I bet it is something wrong in the callback function for the download button
function downloadGeo() {
  var featureCollection = ee.FeatureCollection([geometry]);
  var dbt = featureCollection.getDownloadURL({format:'csv',filename:'coordinates'});
  urlLabel.setUrl(dbt);
  urlLabel.style().set({shown: true});
}


texts: How to find the line is self intersected or not in python using QGIS

texts:
I have to find the line feature is self intersected or not.
I have tried the below logic but not getting it.. Kindly suggest a way to find the solution.
    lineLayerName=self.lineLayer.name()
    for ft in self.lineLayer.getFeatures():
        if ft.geometry().intersects(ft.geometry()):
            gem = ft.geometry().intersection(ft.geometry())
            intPt=gem.asPoint()
            if intPt.x() != 0 and intPt.y() != 0:
                print "Self-intersected"

If the line is self-intersected means I need the intersected point. I have attached the screenshot for reference.


texts: Import data from password protected WFS using OGR2OGR

texts:
I am trying to import data from a WFS using OGR2OGR. I am not sure of the syntax I need to pass the username and password of the WFS.

I am using
D:\Astun\Tools\OGR2.1.3>ogr2ogr.exe -skipfailures -overwrite -f "ESRI ShapeFile" -a_srs "EPSG:27700"  "C:\Users\callen\Desktop\test.shp" WFS:https://data.wdm.co.uk/geoserver/EssexData/ows?version=1.1.0 "User:Pwd" "EssexData:WFS_SCHEME_ANNUAL_WORKS_17_18"

I get an error message saying:

ERROR 1: HTTP error code : 401
ERROR 1: Error returned by server : HTTP error code : 401 (0)
FAILURE:
Unable to open datasource `WFS:https://data.wdm.co.uk/geoserver/EssexData/ows?ve
rsion=1.1.0' with the following drivers.
  -> JP2ECW
  -> PostgreSQL
  -> PCIDSK
  -> JP2OpenJPEG
  -> PDF
  -> DB2ODBC
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> NAS
  -> GML
  -> GPX
  -> LIBKML
  -> KML
  -> GeoJSON
  -> Interlis 1
  -> Interlis 2
  -> OGR_GMT
  -> GPKG
  -> SQLite
  -> ODBC
  -> WAsP
  -> PGeo
  -> MSSQLSpatial
  -> MySQL
  -> OpenFileGDB
  -> XPlane
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK
  -> PGDUMP
  -> OSM
  -> GPSBabel
  -> SUA
  -> OpenAir
  -> OGR_PDS
  -> WFS
  -> HTF
  -> AeronavFAA
  -> Geomedia
  -> EDIGEO
  -> GFT
  -> SVG
  -> CouchDB
  -> Cloudant
  -> Idrisi
  -> ARCGEN
  -> SEGUKOOA
  -> SEGY
  -> ODS
  -> XLSX
  -> ElasticSearch
  -> Walk
  -> Carto
  -> SXF
  -> Selafin
  -> JML
  -> PLSCENES
  -> CSW
  -> VDV
  -> TIGER
  -> AVCBin
  -> AVCE00
  -> HTTP

What am I doing wrong?


texts:
I'm quite new to GeoServer, and I wonder if it is possible to create a dynamic style.
I got a big shapefile with more than 600 variables, and I want to create a generic style where you can input the variable name you want from wsm ( with leaflet for example ).

I saw that geoserver got something called Variable substitution in SLD but I'm not sure if you can achieve it with this?


texts: Merging multiple vector layers to give a multicoloured output map

texts:
I am currently working on a project: Freshwater Vulnerability Assessment of sub-Saharan Africa. I have 5 sets of freshwater vulnerability categories which i have managed to represent on QGIS as five vector layers. I classified each vulnerability category into four different groups: Low, Medium, High & Very high(see image 1)

I intend to merge these layers into a single multicolored layer output(like that shown in image 2) depicting the addition of all vulnerability categories.In the table of content for each layer I have columns such as country name, Area, VR(Vulnerability Rating) and VR1(Vulnerability score).

Basically, what I intend to do is to combine the layers in image 1 to obtain an output like that shown in image 2.

Image 1:

Image 2:


texts: Can I use GPdataFile in modelbuilder so as to use a user uploaded shapefile as input to a ModelBuilder tool?

texts: Considering that I have managed to upload a data file like a shapefile on a geoprocessing service. How can I handle it inside of ModelBuilder. For Example I would like to use the shapefile I have uploaded as input to a ModelBuilder tool. How can I do that?  Do I have to use Python so as to do that or it is possible in ModelBuilder? any examples ?


texts: Editing stretched raster legend labels using ArcPy?

texts:
I'm trying to edit a stretched raster legend item to only show values instead of the "High : " and "Low : " that are standard. I've created a layer template that doesn't include the high/low in the labels, and if I add that layer to a dataframe in ArcMap it works fine:

But when I execute the following code and export the PDF, the high/low shows up in the labels:

dfRef = arcpy.mapping.ListDataFrames(mxd, "dfTile" + str(iRef))[0]
dfRef.spatialReference = srUTM
lgdRef = arcpy.mapping.ListLayoutElements(mxd, "LEGEND_ELEMENT", "dfTile" + str(iRef) + "_legend")[0]
result4 = arcpy.MakeRasterLayer_management(pathScratchGDB + "tempElev_Final", "tempRaster4")
layer4 = result4.getOutput(0)
arcpy.ApplySymbologyFromLayer_management(layer4, pathTemplateLayers + "/elevation_template.lyr")
arcpy.mapping.AddLayer(dfRef, layer4, "TOP")
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
arcpy.mapping.ExportToPDF(mxd, r'C:\Imagery\temp.pdf')

I've tried creating a custom legend item style and updating it using the updateItem method found here but that didn't work either.

Does anyone know how to control stretched raster legend labels via ArcPy?


texts:
I need to dissolve polygons by the ID attribute in a large dataset (+-1gb shapefile). I have been struggling to find an efficient method to do this. I have tried the following methods:

Postgis ST_UnaryUnion
SQLite ST_Union, ST_Collect (via OGR)
MapInfo Dissolve

I have also tried splitting the data set into much smaller tiles (12mb -20mb in size) however the above mentioned processes still take more than 24 hours to complete these much smaller datasets.

Is there a more efficient method of performing a dissolve on such large datasets?


texts: Can I get a list of points in a polygon using Quadtrees?

texts:
I'm storing vertices in a PR (or PM if needed) quadtree and would like to be able to:

Find out if a given polygon contains at least one point
Optionally: Get a list of all the points within a given polygon

My questions:

Is a PR/PM QuadTree the right data structure for quickly getting a list of points within a polygon. Are there better suited structures?
What type of an algorithm would you use to extract points within a polygon from a QuadTree (or your suggested structure)? I don't need a coded solution, but just some algorithmic hints on how this can be achieved. It would also be helpful if there are any resources you could point me to.

Thanks,
Nick


texts: Layer in CartoDB is being loaded but not being displayed?

texts:
UPDATE

In firefox' console I see the following error:
"NetworkError: 400 Bad Request - http://1.api.cartocdn.com/tobagoborn/api/v1/map/undefined/11/677/960.png"

The script below says the layer was created and loaded but it's not being displayed. I can't see reason as to why.

Any suggestions as to what causing this issue and how to solve it?

var map;
function init(){
  // initiate leaflet map
    var map = new L.Map('map_canvas',{
        doubleClickZoom:true,zoomControl:true,scrollWheelZoom: false,touchZoom: false,dragging: true, minZoom: 11, maxZoom: 13
    }).setView(new L.LatLng(11.23,  -60.70), 6);

    var tilesUrl = 'http://tobagoborn.com/tiles/tobagobasemap/{z}/{x}/{y}.png';
    L.tileLayer(tilesUrl, {Zoom: 13}).addTo(map);

  var xxx = cartodb.createLayer(map, {
        user_name: "xxx",
        type: 'cartodb',
        sublayers: [
            {},
            {
                //table_name: 'lsites',
                sql: "SELECT * FROM lsites",
                interactivity: "landing_sites,number_of_boats,top_species,site_code"
            }]
        })
    .addTo(map)
    .on('done', function(layer) {
                console.log(layer);
        alert("CartoDB layer loaded!");
    })
            .on('error', function(err) {
                console.log(layer);
      //log the error
    });
}


texts: How to get for a given pixel the values from different overlapped rasters?

texts:
I have a few rasters representing different soil properties, like soil pH and sand content.
The rasters overlap perfectly, have the same dimensions and same coordinate reference system.

I would like to be able to click on any pixel of my map and get the pH and sand values for this location. The "Identify Features" tool seems to return only the value of the selected raster, pH or Sand. It doesn't give the values of each rasters displayed. Are they any equivalent of the "Identify Features" tool that work on multiple rasters?

I am QGIS 2.2.0 user on a Windows computer.


texts: Clip Management won't work outside of ArcMap/Catalog

texts:
Okay so I have a short script that works great when copied into the python window in ArcMap or ArcCatalog, but refuses to work in an IDE for whatever reason.  The error that is thrown is:

Start Time: Thu Oct 09 09:16:51 2014
ERROR 999999: Error executing function.
Failed to execute (Clip).
Failed at Thu Oct 09 09:16:51 2014 (Elapsed Time: 0.00 seconds)

Here is my code:

import arcpy
arcpy.CheckOutExtension("spatial")
import arcpy.sa

arcpy.env.workspace = "C:\\Users\\sadkins\\Documents\\ArcGIS\\Watersheds\\lake\\outputs"
arcpy.env.scratchWorkspace = "C:\\Users\\sadkins\\Documents\\ArcGIS\\Watersheds\\scratch"
arcpy.env.overwriteOutput = True
arcpy.env.outputCoordinateSystem = arcpy.SpatialReference(102685)
flowDir = "C:\\Users\\sadkins\\Documents\\ArcGIS\\Watersheds\\inputs\\dir"
flowAcc = "C:\\Users\\sadkins\\Documents\\ArcGIS\\Watersheds\\inputs\\acc"
lakeInput = "C:\\Users\\sadkins\\Documents\\ArcGIS\\lake\\lake1.shp"

try:
    tempAccClip = arcpy.Clip_management(flowAcc,"#","tempAcc",lakeInput,"0","ClippingGeometry")
    maxRas = arcpy.GetRasterProperties_management(tempAccClip,MAXIMUM)
    maxCell = arcpy.sa.EqualTo(tempAccClip,maxRas)
    pourPoint = arcpy.RasterToPoint_conversion(maxCell,"pourPoint.shp")
    outWatershed = arcpy.sa.Watershed(flowDir,pourPoint)
    outWatershed.save("lakeWatershed.shp")

except:
    print arcpy.GetMessages()


texts:
Using ArcSDE with a relational database, it is possible to set up versioning. Is this available in ArcGIS Online, aka ArcGIS.com?

When working with a feature layer in ArcGIS Online, there is the option to allow editing, and to ensure only the feature's creator can make changes. But this isn't the same thing as fully-fledged versioning, allowing the ability to merge conflicts, etc.

Is versioning supported using ArcGIS Online?


texts: How do I split polygon into line segments?

texts:
My question exactly matches with this one : How do I split polygons into line segments?
but the solution is outdated, I am not able to find v.type.bl option under the grass dropdown in QGIS 3.8. Neither I am able to comment on that page. When I am using v.split option(setting maximum number of vertices in a segment=2), splitting happens at multiple points even on the same edge of the polygon.


texts: How to configure 3rd parties for the sextante plugin in qgis?

texts:
I'm currently exploring the enourmous potencial that the sextante plugin for qgis has to offer. The model builder will surelly be a very handy tool.

The problem is I'm not beeing able to run 3rd party (like SAGA or Orfeo). I know I have to configure the paths, but i'm not sure how.

I did it like this 1 but still don't get tools running.

I'm getting this error:

ERROR with SAGA:

global name 'false' is not defined Traceback (most recent call last):
File "C:\Users\vbnunes/.qgis/python/plugins\sextante\core\GeoAlgorithm.py", line 115, in execute     self.processAlgorithm(progress)
File "C:\Users\vbnunes/.qgis/python/plugins\sextante\saga\SagaAlgorithm.py", line 153, in processAlgorithm     self.calculateResamplingExtent()
File "C:\Users\vbnunes/.qgis/python/plugins\sextante\saga\SagaAlgorithm.py", line 109, i

Any help?
Thanks


texts: Auto fill second column with predefined names depending on first column (QGIS)

texts: I want to create a point layer. In the attribute table I want to have two columns. In the first column I want to type an abbreviation like A. Then I want the second column to be auto filled with Arthur. How can I do that? I am working with QGIS 1.8. on a Mac 10.6


texts: Finding cells which fullfill condition of geometric decline in QGIS?

texts:
I have a dataset of a rockfall simulation which shows all cells (green), where rocks would be deposited. Cell Value ist the geometric decline (The direct angle between release cell and final cell).

I would like to work out all possible release areas under consideration of the DEM (release cell must be higher than deposite cell and directly be "reachable" with the angle value (which is not always possible, e.g. valley ground, gullies, ground edges).

I was thinking about using something linke proximity and then not using distance but the angle values butdon't get to a reasonable solution.

The picture shows the situation:
red: potential release area; green: deposit area


texts:
I want to draw L.circle in a custom pane but I am using mapbox.js and hence the leaflet version 0.7.7. How can I draw L.circle in a custom pane?

Do we have to copy some js files from the current version of leaflet?


texts:
I am using Win server 2012 R2 and ArcGIS 10.2.2.

goal: match field names across featureclasses/tables in gdb

I thought that using python to retrieve field names from all featureclasses/tables in a gdb and then convert them to hex would allow me to easily compare and match similar features/tables for a data management exercise. I was wrong.

here's the code:

import os
arcpy.env.workspace= r"C:\Users\$user$\AppData\Roaming\ESRI\Desktop10.2\ArcCatalog\connection.sde"

feature_classes = arcpy.ListFeatureClasses()

for fc in feature_classes:
    fieldnames = arcpy.ListFields(fc)
    print fc
    for f in fieldnames:
        print (hex(f.name))

I get this error: Traceback (most recent call last):
  File "", line 10, in
TypeError: hex() argument can't be converted to hex

Print statements are there to help me keep track.
According to esri's documentation. ListFields(fc).name should return a string. However it seems to be a object.


texts:
I am looking for a hand writing a python script in the Field calc, as it looks like I am stuck. Here is a screen shot of my table:

What I need to do is populate the "status" field by parsing through each actual (act) field in order. If the recon_act field is populated, move to the Socons_act field, if that is populated, move to the stake_act field and so on. If the act field is not populated, that is the status of the project. For instance, the 15th project does not have an act date in Recon_act, so the status will be "RECON". A dozen or so down from that a project has a date in the recon_act field but not the SOcons_act field, so that status will be "SOcons".

The 4th project down has dates in the Recon_act field, Socons_act field, stake_act field but not the plat_act field so that status will be "PLAT".

In my brain, the python statement needs to look something like this:

If [recon_act] = ‘ ‘ then
  Status = “RECON”

Elseif [SOcons_pro] = ‘ ‘ then
  Status = “Socons”

Elseif [stake_act] = ‘ ‘ then
  Status = “STAKE”

Elseif [plat_act] = ‘ ‘ then
  Status = “PLAT”

Elseif ………


texts: How to create table with geometry column in GPKG with spatialite?

texts:
I want to create a vectorial GPKG with spatialite.

With the help of the documenation (here: http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.3.0.html#p16gpkg ), I've created a sql script that look like this:

SELECT EnableGpkgMode();
SELECT gpkgCreateBaseTables();

CREATE TABLE grid ('fid' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT);
SELECT gpkgAddGeometryColumn('grid', 'geom', 'GEOMETRY', 0, 0, 4326);

Here is my output:

$ rm -f test.gpkg && spatialite test.gpkg < test.sql
SpatiaLite version ..: 4.3.0a   Supported Extensions:
    - 'VirtualShape'    [direct Shapefile access]
    - 'VirtualDbf'      [direct DBF access]
    - 'VirtualXL'       [direct XLS access]
    - 'VirtualText'     [direct CSV/TXT access]
    - 'VirtualNetwork'  [Dijkstra shortest path]
    - 'RTree'       [Spatial Index - R*Tree]
    - 'MbrCache'        [Spatial Index - MBR cache]
    - 'VirtualSpatialIndex' [R*Tree metahandler]
    - 'VirtualElementary'   [ElemGeoms metahandler]
    - 'VirtualXPath'    [XML Path Language - XPath]
    - 'VirtualFDO'      [FDO-OGR interoperability]
    - 'VirtualGPKG' [OGC GeoPackage interoperability]
    - 'VirtualBBox'     [BoundingBox tables]
    - 'SpatiaLite'      [Spatial SQL - OGC]
PROJ.4 version ......: Rel. 5.2.0, September 15th, 2018
GEOS version ........: 3.7.1-CAPI-1.11.1 27a5e771
TARGET CPU ..........: x86_64-linux-gnu
the SPATIAL_REF_SYS table already contains some row(s)

Error: near line 5: FOREIGN KEY constraint failed

What did I do wrong ?


texts: Activating R Scripts for Ripley's K Function in Processing toolbox not working

texts:
I'm new to QGIS. I'm trying to run Ripley's K Function in QGIS (QGIS 2.18.2), but can't activate R Scripts properly in the Processing toolbox. I checked both the Activate and Use 64-bit boxes, but get R Scripts (0 geoalgorithms) when I open up the Processing toolbox. If it helps, my folder paths are:

R scripts folder - C:\Users\E\.qgis2\processing\rscripts
R folder - C:\PROGRA~1\QGIS2~1.18\bin
R user library folder - C:\Users\E\.qgis2\processing\rlibs


texts: Unexpected corner coordinates after change in reference system using GDAL

texts:
I'm working with the ESA CCI land cover rasters. I'm trying to window and project them, but the results aren't what I expect.

If I run ncdump -h -s on one of the ESA CCI raster NetCDFs I get:

crs:wkt = "GEOGCS[\"WGS 84\", \n",
        "  DATUM[\"World Geodetic System 1984\", \n",
        "    SPHEROID[\"WGS 84\", 6378137.0, 298.257223563, \
             AUTHORITY[\"EPSG\",\"7030\"]], \n",
        "    AUTHORITY[\"EPSG\",\"6326\"]], \n",
        "  PRIMEM[\"Greenwich\", 0.0, AUTHORITY[\"EPSG\",\"8901\"]], \n",
        "  UNIT[\"degree\", 0.017453292519943295], \n",
        "  AXIS[\"Geodetic longitude\", EAST], \n",
        "  AXIS[\"Geodetic latitude\", NORTH], \n",
        "  AUTHORITY[\"EPSG\",\"4326\"]]" ;

I know also that the raster is 'north-up'...in the metadata from that same ncdump it is written: geospatial_lat_units = "degrees_north".

Now that I know the raster bounds, orientation and coordinate reference system (WGS84 = EPSG:4326), I attempt to window and project the raster using GDAL. I wish to project the data into EPSG:3035 (= ETRS89 = Europe), so I look up the bbox extent on epsg.io/3035 and read the following:

Projected bounds:
1896628.62 1507846.05
4656644.57 6827128.02

WGS84 bounds:
-16.1 32.88
39.65 84.17

With this in mind, I go ahead and make an attempt with the following (Python) script:

import os

os.system('gdal_translate -of vrt -a_ullr -180 90 180 -90 -a_srs "EPSG:4326" HDF5:"ESACCI-LC-L4-LCCS-Map-300m-P1Y-2015-v2.0.7.nc"://lccs_class esacci.vrt')
os.system('gdalwarp -overwrite -of vrt -te_srs "EPSG:4326" -te -16.1 32.8 39.65 84.17 esacci.vrt esacci2.vrt')
os.system('gdalwarp -overwrite -s_srs "EPSG:4326" -t_srs "EPSG:3035" esacci2.vrt esacci.tif')

A glance at the resulting TIFF makes it seem like everything is in order. Furthermore, when I run gdalinfo on esacci2.vrt the corner coordinates are as expected (by epsg.io/3035):

Coordinate System is:
GEOGCS["WGS 84" ….]

Corner Coordinates:
Upper Left  ( -16.1000000,  84.1700000) ( 16d 6' 0.00"W, 84d10'12.00"N)
Lower Left  ( -16.1000000,  32.8000000) ( 16d 6' 0.00"W, 32d48' 0.00"N)
Upper Right (  39.6500000,  84.1700000) ( 39d39' 0.00"E, 84d10'12.00"N)
Lower Right (  39.6500000,  32.8000000) ( 39d39' 0.00"E, 32d48' 0.00"N)
Center      (  11.7750000,  58.4850000) ( 11d46'30.00"E, 58d29' 6.00"N)

HOWEVER, when I run gdalinfo on esacci.tif...the corner coordinates do not match what is predicted by epsg.io/3035:

Coordinate System is:
PROJCS["ETRS89 / LAEA Europe" ….]

Corner Coordinates:
Upper Left  ( 1894132.863, 6827128.020) ( 71d33' 9.14"W, 68d52'45.48"N)
Lower Left  ( 1894132.863, 1086761.052) ( 14d56'32.27"W, 29d14'19.31"N)
Upper Right ( 7060793.737, 6827128.020) ( 93d51'27.16"E, 66d16' 0.52"N)
Lower Right ( 7060793.737, 1086761.052) ( 37d59'10.65"E, 28d17' 0.95"N)
Center      ( 4477463.300, 3956944.536) ( 12d41'37.11"E, 58d41'13.10"N)

I can further replicate the EPSG:4326 to EPSG:3035 transform described on epsg.io/3035 with OSR, where the following results in the correct/predicted coordinates...which again are not what esacci.tif lists:

from osgeo import osr

s_srs = osr.SpatialReference()
s_srs.ImportFromEPSG(4326)
t_srs = osr.SpatialReference()
t_srs.ImportFromEPSG(3035)

transform = osr.CreateCoordinateTransformation(s_srs, t_srs)

print(transform.TransformPoint(-16.1, 32.88))
print(transform.TransformPoint(39.65, 84.17))

What am I missing and/or doing wrong here?


texts: Using Google Maps with OpenLayers for some zoom levels

texts:
I've had a search on here to see if this has come up but I've not found anything, sorry if this is a duplicate.

I'm trying to use the Google Maps layers with an OpenLayers site, but not for all zoom levels. What I want to do is use the NASA global mosaic from my own map server (which works) but once I'm zoomed in far enough, switch to Google for lower level imagery from them. So far I've set Google as a base layer and used my own tiles as an overlay, but doing this means a request to google for all the zoom levels that are covered by my tiles. It seems wasteful to get tile data from google which will never be visible to the user.

What I want to do is limit the available zoom levels for the Google Layer to those zoom levels that are not covered by NASA, while not restricting the zoom levels available to the map as a whole.

My best guess was to create a dummy base layer covering the correct resolutions and zoom levels, and set a restricted set of Google as an overlay, but this is proving very difficult.

Any pointers would be much appreciated.

Thanks.


texts: Gas Utility Routing software in open source or algorithm

texts:
objectives : To make a web application for gas utility that can perform upstream and downstream

I have googled a lot but cannot find any Gas utility routing in open source. what i have is data for gas pipes as line and gas fittings as point .

Is there any open source software or algorithm that can help me ?


texts: Seeking QGIS plugin to work with What3Words

texts: Does QGIS have any plugin to work with the What3Words mapping project?


texts: Decoding Shape using Arcade in ArcGIS Pro

texts:
I have Shape column in ArcGIS Pro.
How do I get x,y from it with Arcade?


texts:
I have a raster file. ArcMap says it is in NAD_1983_USFS_R6_Albers (EPSG:102218).

QGIS says it is in USER:100000 -  * Generated CRS (+proj=aea +lat_1=43 +lat_2=48 +lat_0=34 +lon_0=-120 +x_0=600000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs).

I assume QGIS doesn't know that coordinate system. So I can also not re-project it with QGIS, right? Is there a work around to still reproject it with QGIS?

I don't want to re-project it with ArcMap.


texts:
I have gathered positional (Long and Lat) data and the corresponding speed of a vehicle over a specific route. I am able to plot the X-Y coordinates in ArcMap 10.7 over a basemap which essentially shows my movement on the route. I would like to visualize the speed as well over the course.
How do I use the specifically color-coded symbol for each XY coordinate marking symbol?


texts: Loading GRASS gives error installing QGIS Chugiak on Windows 8.1?

texts:
I am experiencing a problem installing QGIS 2.4 Chugiak on Windows 8.1, resulting in a error loading Grass.  This may be a problem only affecting certain installations, I'm not sure.  I am a noob on QGIS and not so hot on IT.

The installer QGIS-OSGeo4W-2.4.0-1-Setup-x86_64.exe does not report any errors, but when QGIS is launched a dialogue box reports that there is an error in finding the Grass installation and asking for the folder where this is located.  Pointing to the folder results in it being unrecognised by the dialogue box, which asks the same questions again.

This appears to have happened to others in the past (QGIS is not able to find GRASS. Choose the path of installation folder of GRASS) and occurs due to either of both of long path names not being recognised (or being correctly resolved to short names)and/or spaces in the file names.