texts: Deep link to ArcGIS Server feature layer attachment file

texts:
Is it possible to "deep link" to attachments stored on feature layers in ArcGIS Server?

I would like to provide a URL link then when the link is clicked (or copied into a browser), the user is prompted for credentials, and then redirected to the attachment file (for viewing in browser or for download). In our current 10.3.1 ArcGIS Server / Portal for ArcGIS installation this doesn't seem to work...

background and details:

What I’d like to do is link to an attachment file (example, PDF or JPG) stored in an ArcGIS Server linked feature service layer attachment.
An example URL that we are attempting to link to looks like this:
https://www.ourserver.com/server/rest/services/TheFeatureService/FeatureServer/1/999/attachments/1

The problem is that when you click an HTML anchor tag using this URL as the href attribute, you first get routed to a login page for ArcGIS Portal (the ArcGIS Server instance is federated with Portal). This Portal login screen URL looks like this:
https://www.ourserver.com/portal/sharing/oauth2/authorize?client_id=arcgisonline&response_type=token&state=%7B%22portalUrl%22%3A%22https%3A%2F%2Fwww.ourserver.com%2Fportal%22%7D&redirect_uri=https%3A%2F%2Fwww.ourserver.com%2Fserver%2Flogin%2F%3FreturnUrl%3Dhttps%3A%2F%2Fwww.ourserver.com%2Fserver%2Frest%2Fservices%3Fredirect%3Dhttps%253A%2F%2Fwww.ourserver.com%2Fserver%2Frest%2Fservices%2FTheFeatureService%2FFeatureServer%2F1%2F999%2Fattachments%2F1&hideCancel=true

This would be fine, but after successfully logging in, instead of being redirected back to the attachment file link of interest, you are instead routed to the REST endpoint “home page”. The URL that gets you there looks like this:
https://www.ourserver.com/server/rest/services?redirect=https://www.ourserver.com/server/rest/services/TheFeatureService/FeatureServer/1/999/attachments/1

While there is a “redirect” argument/parameter in the query string, it doesn’t seem to do anything. The ArcGIS Server REST endpoint home page is shown as if there were no “redirect” argument, as if you were navigating to this URL:
https://www.ourserver.com/server/rest/services

Interestingly, once you have successfully logged in and been routed back to the REST endpoint home page, you can then click the original HTML anchor tag link again and you are successfully routed to the attachment file link page.

This workflow should be possible (click a link, log in, view attachment). We can’t ask users to click the link, log in, close browser, click the link again, then finally view attachment…

We are using a slightly older version of ArcGIS Server/Portal for ArcGIS. We are at version 10.3.1. We do have the potential to upgrade to ArcGIS Enterprise 10.5, but “if it ain’t broke, don’t fix it”… And ArcGIS Enterprise 10.5.1 is coming in a few weeks.


texts: Using if else statement in Python Parser of Field Calculator in ArcGIS for Desktop?

texts:
I need help in writing the python script in the field calculator. I have three fields namely:
CODE
COMPLEX
Map1

Map1 is an empty field that I want to populate. I have a number of conditions to cater with in a single Map1 field. e.g. If CODE is 1.1.7 and COMPLEX is 4 then the output for Map1 should be 1.3, and these conditions continue with different CODE and COMPLEX values. I have been trying to write it like this but it doesn't work:

Parser
Python

Code Block

def Reclass( !CODE! , !COMPLEX! ):
    if ( !CODE! == 1.1.7 and !COMPLEX! == 4):
        return 1.3
    elif ( !CODE! == 3.2.0 and !COMPLEX! == 4):
        return 1.3
    else:
        return 0

Map1 =

Reclass( !CODE! , !COMPLEX! )

Can anyone tell me where I am making a mistake? Or any other way of doing it?


texts: How to open GeoJSON file from OpenLayers 4.5?

texts:
My name.geojson file is in EPSG:3857 and I try to open it on OpenLayers but it didn't show. Which code should I use to open name.geojson file?

<!doctype html>

              <link rel="stylesheet" href="https://openlayers.org/en/v4.5.0/css/ol.css" type="text/css">

            <title>OpenLayers example</title>

My GeoJSON is like:

{ "type": "FeatureCollection", "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG::3857" } }, "features": [ { "type": "Feature", "properties": { "PROV_NAME": "PHAYAO", "REGION": "เหนือ", "Length": 471901.950000, "Area": 6099882141.720000, "PROV_CODE": "56", "REG_CODE": "02", "PROV_NAMT": "พะเยา" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 11178637.241381312, 2240871.010733759 ], [ 11178705.330343476, 2240860.5557918623 ], [ 11178753.986649765, 2240860.1461515916 ],


texts: Are there any examples of creating custom openlayers geometry types?

texts:
I am working on a project that uses openlayers where IE8 compatability is a requirement. Unfortunately, there seems to be some performance issues with OpenLayers in IE8 when parsing a large number of polygons / points from server side data.

I have already developed a custom data exchange format based on JSON (After experimenting with both GeoJSON and WKT) which has yielded a large performance boost, but I still think I need more.

One current bottleneck in the application seems to be in initializing points - I have a test case where I am initializing geometries with over 85000 points and it takes a few seconds on a virtualized IE8 box.

I will be implementing strategies of lazy initialization, but it also occurred to me that in server side libraries like JTS, multi-point, line string, and linear ring instances may be backed by a packed coordinate sequence - a single array containing all required ordinates

http://www.vividsolutions.com/jts/javadoc/com/vividsolutions/jts/geom/impl/PackedCoordinateSequence.Double.html

Has anybody seen any examples of using this pattern with OpenLayers, or can anybody provide any insight or advice in implementing it? Aside from creating the geometry type objects themselves, I would need to add support for these types to the renderers. Are there any other places where I would need to add support for them?

In short, what are the steps required in order to add support for custom geometry type to OpenLayers?

Thanks


texts: How to select duplicate features in a group in QGIS?

texts:
I would like to select those features which share the same "Stand ID" in a group to dissolve the geometry afterwards in QGIS 3.1. My Attribute table looks like this:

Group Stand-ID
1      5 <-- Duplicate
1      6
1      5 <-- Duplicate
1      2
2      8
2      9
2      5
3      3
3      4

How would the corresponding expression look like in QGIS?
Group by "Group" > select everything which is not unique


texts: Compatibility error (multipolygon - polygon) when merging two features

texts:
I have merged two vectors layers. When I try to merge two features -
 originally from two different source layers, now in the Merged layer - I get this error:

Layer Merged: Geometry type MultiPolygon not compatible with provider type Polygon.

I'm not sure how to solve this.

1) To begin with, how can I successfully merge two layers if they have different geometry types?

2) In my case, how to understand which source layer is considered by QGIS as a MultiPolygon and which on is a Polygon. In their Properties -> Metadata -> Properties -> Geometry type of the features in this layer
they both appear as Polygon (WKB type: "Polygon").

3) How to manipulate the layers so to successfully merged features from the two source layers?


texts: Creating related field Domains for ArcGIS Desktop

texts:
I have been trying to create a new feature class for entering habitat data for ArcGIS Desktop (10.3.1 if relevant). I have been using the coded Domain function to create drop down lists of applicable habitats which can be entered into the shapefile, however I would like to organise this further if anyone has some advice.

As an example, I have four field attributes of Habitat categories which are named 'Hab_Cat1,2,3 and 4'. In 'Hab_Cat1', generalised habitats are listed from A-J with 'A' being 'Woodland & Scrub', 'Hab_Cat2' further classifies the habitat as 'A1 - Woodland', 'Hab_Cat3' specifies that the attribute is 'A1.1 - Broad-leaved Woodland', and 'Hab_Cat4' as 'A1.1.1 - Broad-leaved Woodland - semi-natural'.

As a further means of simplifying my table, I would like to limit the options presented as the data is entered into the feature class. For example, once somebody specifies in Hab_Cat1 that the entry is A-Woodland, I would like to make sure that when they get to Hab_Cat2 that their options are now only limited to 'A' options rather than showing the full range of 'A1 - J3' options and so on.

I believe that this may be achievable through the creation of Subtypes, however as I am new to the use of both Domains and Subtypes I am unsure of how to proceed.


texts:
Quite often I have to create 3 different exhibits for the same project and it can get quite tedious, I was wondering if there was a way using python, modelbuilder, etc. to do this programmatically. Each mxd will be based off a specific template also.

To be clear, I do not mean to completely create the finished exhibits, but rather to sety up the three mxd's to be populated.


texts: Creating shapefile of satellite image footprints?

texts:
I'm looking for a tool or a workflow to compute satellite image footprints, for a large number of images across directories, and produce a shapefile. Ideal work flow would be:

fire up tool
point to a directory and provide file mask
the tool browses directory and sub-directories and compute footprints
the tool produces a shapefile with a polygon for each footprint and pre-selected attributes

It would preferably be Esri or ERDAS based, but not necessarily.


texts:
I found this function and converted it to VB.Net. It draws an oval rather than a circle. What do I need to do to fix the calculations?

Dim seg As Double = Math.PI * 2 / segments
For i As Integer = 0 To segments - 1
  Dim theta As Double = seg * i
  Dim a As Double = _pll.Lat + Math.Cos(theta) * radius
  Dim b As Double = _pll.Lng + Math.Sin(theta) * radius
  plls.Add(New PointLatLng(a, b))
Next


texts:
I'm trying to import the module networkx with the Python console in ArcGIS, but I keep getting the error "no module named networkx".
I have installed it with the command "pip install networkx".

How can I fix this error?


texts: Cutting out the world into polygons of equal population size

texts: I would like to cut out the world into polygons of equal population size, say 100 million persons (starting for example with raster data of population density as provided by the NASA). I know that this cutting would be arbitrary in the sense that there are many different solutions. But this does not matter, I need it to be arbitrary! Please, could anyone indicate to me the best way to proceed?


texts:
I'm trying to code this in Leaflet, but the key is finding the formula to do this.

Give a polygon (filled in the image), how can I expand it to fit a grid (lat/lon, outer line in image) ?

This is reminiscent of polgyon/raster intersection tools available in GIS programs, but in order to create this in leaflet/javascript, I need to know the actual formula.

A simple formula without frequent iterations is needed, since at time the shape can be much bigger than the grids and might be slow if I am simply checking for intersections at each grid and changing directions depending on the outcome.


texts: QGIS - Create buffer circle around particular point using its geometry

texts:
Can I create a buffer circle around a particular point using its geometry in pyQGIS? I have my code as below:

myVariable = '123456'
expr = QgsExpression( "\"identificatie\"={}".format(str(myVariable)) )
it = point_layer2.getFeatures( QgsFeatureRequest( expr ) )
for i in it:
    # I can get the geometry here as i.geometry()
    point_layer2.select( i.id() )
    processing.runandload("qgis:fixeddistancebuffer", point_layer2, 250, 99, False, None)
    point_layer2.removeSelection()

I want to replace the select method and runandload method by something like this:

myVariable = '123456'
expr = QgsExpression( "\"identificatie\"={}".format(str(myVariable)) )
it = point_layer2.getFeatures( QgsFeatureRequest( expr ) )
for i in it:
    i.geometry().buffer(250,5)

But this has no output.


texts:
i am trying to convert a kml file that i made on UMap website into shapes.txt using http://bdferris.github.io/kml-to-gtfs-shapes/
but it doesnt see anything in the map
any special tools please ?


texts: cannot find py3_env.bat in OSGeo4W installation

texts:
I am trying to install Trajectools in QGIS according to the following tutorial https://anitagraser.com/2019/02/02/movement-data-in-gis-20-trajectools-v1-released/ but I have the following problem, I can not find the file py3_env.bat in OSGeo4W installation

when I execute the sequence: OSGeo4W shell: call C:\OSGeo4W64\bin\py3_env.bat in the GDAL shell the following error appears:


texts: How to use PostGIS for tile-based aggregation?

texts:
How can I create a tile-based aggregation of polygons with PostgreSQL/PostGIS?
The input of such an operation could be the database table with the geometry and the data to aggregate, a bounding box, and the tile size and the method which should be used for the aggregation (sum, average, minimum, maximum).

The output would be a list of geometries with the outlines of the tiles and the aggregated values.

I found this operation in Oracle Spatial but could not find a solution on how to do this with PostGIS.


texts:
I'm trying to use the "lecos" extension and I took an already classified image from the mapbiomas website, cut it out to my area of interest, then reclassified to have in a .tif file only two classes, forest and non-forest.
When I'm going to run some landscape metrics in "lecos", it returns the following error message " The layer output.tif has no valid nodata value (no number)!"
I tried to use r.null to change the value of no data, but something is still wrong and I don't know what to do.
Does anyone have a suggested solution for my problem?


texts: How to set default values for reference grid in ArcMap?

texts:
I currently use ArcMap 10.2 and find it quite handy to be able to set default values for settings such as Labeling Properties, ensuring new maps use relative paths and to always build pyramids for a raster in the Customize --> ArcMap Option window.

Is it possible to set the default values for a new reference grid in ArcMap? Specifically, is it possible to set the initial default value for the number of decimal places for a new reference grid, instead of clicking through several windows to set number from 6 decimal places to 0 every time a new reference grid is created?

I ask because the majority of the maps I make have no use for any decimal places in the reference grid.


texts: Understanding two points on top of each other after ModelBuilder intersect?

texts:
A model I'm making is creating two points on top of each other after intersecting a grid (fishnet). There's only 2 lines crossing each other at these points, so the output should only have one point.

Any ideas why it would be throwing 2 points?


texts: QGIS Error when clipping a raster with a shape layer

texts:
I am trying to clip a .tif file using the extent of a polygon (.shp). I am using the conventional Raster/Extraction/Clipper tool in QGIS 2.18.10. After choosing the appropriate settings, I get the following message:

ERROR 1: Attempt to create ADRG dataset with an illegal data type (Float32), only Byte supported by the format.

I am asking the exact same question as uybfi in this thread, which was marked as a duplicate for no apparent reason. The referred answer fails to address the issue. My raster is already in a supported format (Float32), and when changing the pixel depth with gdal_translate to other supported formats (e.g. Int32), I still get the this error.

Any thoughts?


texts: Which map projection is suitable for distance measurement purpose in USA?

texts:
I'm developing an application which uses PostGIS functions for measurements in the USA. In nutshell: the software is running in a car and use PostGIS functions in real time. For example: to measure distance of the nearest object (ST_Dwithin) and decide wheter the car is within a protected area or not (ST_Intersects). It is important that the function should be called at least 5 times in every seconds, so the running time is very important.

The input parameter of the function is the current GPS position, and returns with distance values (in meters). In addition to this: Important: I have to calculate the distance of the nearest objects within 0.4 mile.

I have polygon datasets that contain the special areas in WGS84 (EPSG:4326).

Now, I have to choose a suitable projection for this purpose (measurements of distances). The problem is that this software should be able to run in any sates within the USA (except for Alaska and the islands).

Is it possbile to use one CRS for this job or I have to split the polygons and use different projections in every states (this method would make a lot of difficulties)?

I don't want to use Geography data type because it is much slower than the geography.

What do you think, which CRS would be the best for this task?

I read many articles regaring this topic, but I'm still confused about the accuracy. I have to measure relatively short distances (maximum 0.4 mile).


texts: Cannot extract the WMS tiles to arbitrary GIS format

texts:
I have the website, from where I would like to extract the WMS layers to some versatile GIS format.

There are a lot of blocks bounded in 256x256 squares, defined with proper coordinates like you see below:
https://xxxx/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=%2FTH8D9%2F35KMJpR1m98p1%2Bw%3D%3D&NAME=PORTAL&WIDTH=256&HEIGHT=256&CRS=EPSG%3A27700&STYLES=&BBOX=358078.8161658001%2C172650.44995214092%2C358227.39658744563%2C172799.0303737865

especially:
WIDTH=256&HEIGHT=256&CRS=EPSG%3A27700&STYLES=&BBOX=358078.8161658001%2C172650.44995214092%2C358227.39658744563%2C172799.0303737865
The image, you see below can be saved as png only under the wms.png name.
Unfortunately I can't open it via link, as I receive bad request.
I tried to launch it in QGIS (add WMS layer)
https://www.qgistutorials.com/en/docs/working_with_wms.html
but with no results at all (3 errors caused by site security I guess)
The issue is similar to this one:
Cannot access GeoServer WMS
with this difference, but I can take a look at the square and download it as .png
I would like to run the given layer somewhere with size and location details defined in the permalink described above. Next, I would like to extract it to .kml .geojson .shp or something like this.
Is it possible at all?


texts: VS2010 does not break on error when debugging ArcGIS add-in

texts:
I am having issues with VS2010 and debugging an ArcGIS add-in.   The problem is that when there is an exception, it will not break on it and ArcMap(10.1) just crashes ("ArcMap has encountered....").

I can see the exception in the VS Output window ("A first chance exception. of type ..."), but it's tedious trying to track down where the error occurred.

Also, I have no problems setting manual break points and it will stop at them.

Anybody know how to resolve this issue?


texts: Feature-source gets overwritten? - Openlayers-3


texts: Is there a proj4 string for GDA2020 (epsg:7844) that we use to transform from 3857 or 4326 to gda2020 using dot spatial .net library

texts:
We are using dot spatial library for transformation from one projection to other. We are planning to include the new release GDA 2020 projections. Is it as simple as just adding the proj string for the new projection.

Looking at the details here it looks like there is no support in proj4 for this new projection however there is a new version proj 6 which provides this support but there is no .net port available for this. Is there anyone who can guide on this.


texts: Overwriting Feature Service to webmap does not update with new data in ArcGIS Online?

texts:
This is cross posted to geonet as well: https://geonet.esri.com/thread/196111-updating-feature-service-to-webmap-does-not-update-with-new-data

I have a web feature service on a web map and that map shared through an web app.
This service is just a small point layer and I update it every month with updated points. I then upload the layer to agol using the "overwrite" option on my existing point feature service. However my web map does not update with the new points automatically. I have to re-add the service as a new layer and remove the previous one in addition to manually copying my pop-up configs over to the new layer.
I was under the impression the overwriting the service would in turn have the updates roll out to the web map layer. Am I missing a step here or is this how the overwrite feature works?

Russ lead me to the correct answer to solve this issue. I just needed to set my refresh interval Support docs can be found here: http://doc.arcgis.com/en/arcgis-online/create-maps/set-refresh-interval.htm


texts: Group cities into MSA/Agglomerated areas

texts:
I've been asked to do some research where I compare survey data to some population numbers. Unfortunately, I think it is likely the case that people who live in smaller cities that are close to large cities may have supplied the name of the larger city. I currently have city-level population data.

Is there a way to map nearby cities into larger urban agglomerates at a global level? I'd be open to simple solutions, like a mapping table, or complex solutions, such as something that considers proximity or other data sources to connect cities.


texts:
I have been looking for answers and working on this for many hours.
In the spatialite database table nodes, id is an integer.

    idValToNode = 854

    sql =  'UPDATE nodes SET obsolete = 0 WHERE id = ?'
    cur.execute(sql, idValToNode)

ValueError: parameters are of unsupported type

    idValToNode = 854

    sql =  'UPDATE nodes SET obsolete = 0 WHERE id = ?'
    cur.execute(sql, str(idValToNode))

ProgrammingError: Incorrect number of bindings supplied. The current statement uses 1, and there are 3 supplied.

    idValToNode = 854

    sql =  'UPDATE nodes SET obsolete = 0 WHERE id = ?'
    cur.execute(sql, idValToNode,)

ValueError: parameters are of unsupported type

If I place the 854 inside the sql statement and remove the variable, it works fine.
I need to use a variable. Please help. What am I missing here?


texts: How to split BIG 4GB GPX file into many?

texts:
How to split such file into many smaller ones ? It contains around 6 million different routes.
I want to split 1 file with 6 million features (line string paths) so I have 6 million features. 1 feature - 1 gpx file.


texts:
Where do I find the help files for QGIS 3.0?

The program links to the version 2.8 help files instead of the current version. There seem to be major differences between the two, and I don't want to ask a million simple questions here (I'm new to QGIS) if I can look them up somewhere.


texts: Getting a list of zip codes with its adjacent zip codes

texts:
I need a list in the form of adjacency list that contains all zip codes in the United States that each has a list of adjacent zip codes. I tried searching for it on the internet. Many of them only provide a list, but none of them had a list showing the adjacent list of zip codes. How do I find something like that?

The closest thing I found is a list of counties and their adjacent counties. There are several websites that I believe that they have the information but they are using it for applets like this website, http://www.freemaptools.com/find-zip-codes-inside-radius.htm

If no data is available, could I use the counties list to generate the said list?

EDIT: OP here, I was new to the whole GIS system. I don't know which software to use. I decided to try ArcGIS trial. I downloaded ArcGIS and that .lpk file. But I have no idea how to properly load .lpk in a python script and run PolygonNeighbors_analysis function. ArcPy Documentation and Google are not giving me a clear answer. Can anyone show me how to load .lpk package and use the function? Thanks

EDIT2: I think I should have mentioned that I want that list in a simple .txt file. I think I could do this with ArcPY to collect all zip codes and their neighbors, then store it in the .txt file. My current obstacle to this is that I have no idea how to load .lpk file to ArcPY.

EDIT3: I got it to work! By following what Barrett described, I got a raw .txt file of zip codes and their neighbors. I cleaned it up with my small program. It looks good. Thanks for help!


texts: Can GeoWebCache response GeoTiff format image

texts:
I use GeoServer integrated with GeoWebCache.

There are some default formats:jpg\png\png8\gif, but no GeoTiff - how can I add this format.

I develop 3D-GIS client, and my client only supports jpg and GeoTiff.

When I Get Map with "FORMAT=image/jpeg", the empty area of result jpeg file is not clear,there is always some bad pixels.

My questions are:

can I get the GeoTiff image?
can I get rid of the bad pixel?

Please help me!


texts: Secure OSM instance and prevent unwanted access

texts:
I just finished installing an OSM instance in a local VM. So far so good, tiles are being served just fine.

This VM will be public on internet, so my clients can access the tiles from my web page.

This web page, 'map.html' to give it a name, can be loaded by my users (user/password required), but as soon as they see the map they can inspect the HTML source code and see/copy the URL of my tiles server.

So, if they where in the mood, they could just create another webpage and access my tiles server.

That is the scenario I would like to prevent, but seems a little hard to accomplish.

How can I know that the access came from my 'map.html' and not from a 'fake.html'? How can I prevent access from unwanted pages?

This page 'map.html' runs on a fixed IP/DNS server online, maybe that can be used to secure access.


texts: Error during DEM interpolation for raster grid : data item in gstat object and newdata have different coordinate reference systems

texts:
library(raster)
library(rgdal)
library(rgeos)
library(gstat)

# load data
dem_points <- readOGR(dsn = ".", layer = "dem_points", verbose = F)
study_area <- readOGR(dsn = ".", layer = "study_area", verbose = F)

# Clip dem_points within study area
dem_points_clip <- intersect(dem_points, study_area)

# Obtain extent
dem_bbox <- bbox(dem_points_clip)
# Create raster
dem_rast <- raster(xmn = dem_bbox[1, 1],
                   xmx = ceiling(dem_bbox[1, 2]),
                   ymn = dem_bbox[2, 1],
                   ymx = ceiling(dem_bbox[2, 2]))
# Set projection
projection(dem_rast) <- CRS(projection(dem_points_clip))
# Set resolution
res(dem_rast) <- 5

# Compute the interpolation function
dem_interp <- gstat(formula = ALT ~ 1, locations = dem_points_clip,
                    set = list(idp = 0), nmax = 5)

# Obtain interpolation values for raster grid
DEM <- interpolate(dem_rast, dem_interp)

Error in predict.gstat(model, blockvals, debug.level = debug.level, ...) :
  var1 : data item in gstat object and newdata have different coordinate reference systems
In addition: Warning messages:
1: In proj4string(d$data) :
  CRS object has comment, which is lost in output
2: In proj4string(newdata) :
  CRS object has comment, which is lost in output

Note: Both X and Y data are in degrees with same coordinates. EPSG: 4326-WGS 84 CRS is used to make the required shapefile using QGiS.


texts:
I need to display huge GeoJSON file using OpenLayers. So I decided to use VectorTiles. Library geojson-vt.js works perfectly for me, but unfortunately it requires my GeoJSON file to be preloaded on client. As it is about 120MB, it's not possible. So I started to look for a way, how to serve the data from my web server. I can see 2 options:

Serve it on fly like geojson-vt.js does. Is there a PHP library capable doing this? I haven't been able to find any.
Create vector tiles pyramid and serve the tiles per request. I was able to find only 1 way, how to split my GeoJSON to vector tiles - using GDAL - ogr2ogr. Is there another way? I installed GDAL on my Centos 7 box and on my Windows 10 PC. Running command

ogr2ogr -f MVT -dsco FORMAT=MBTILES -dsco MAXZOOM=18 previews.mbtiles previews.geojson

finishes with error "Unable to find driver `MVT'" on both of them. gdal-config --formats command gives me this result:

 gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b nitf bmp airsar rs2 ilwis rmf leveller sgi srtmhgt idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg coasp tsx terragen blx msgn til r northwood saga xyz hf2 kmlsuperoverlay ctg e00grid zmap ngsgeoid iris map cals safe sentinel2 derived prf mrf grib bsb gif jpeg png pcraster zlib pcidsk rik ozi pdf postgisraster arg

I found a suggestion, that "./configure --with-spatialite --with-sqlite" should help on CentOS, but it didn't. Any idea how I can move forward? I don't care whether with ogr2ogr or other tool. I just need to serve my GeoJSON from my web server (without using special GIS server) as vector tiles.


texts: Is there a proper geoprocessing term of clipping data based on the hole in donut polygons?

texts: This is a general question not software related. Is there a geoprocessing term used for clipping data using the holes in donuts polygons? I want the process to keep the data which are visible through the hole(s).


texts: How do I convert the coordinate data from osm into actual longitude latitude points

texts:
So I've imported a osm dataset into a PostGIS db using osm2pgsql, however when I call

ST_asText( way )

I get weird coordinates like

"POINT(16767838.9 -4051592.94)"

What format are these longitude latitude points? How do I convert them to I guess "normal" longitude latitude points like

"lat":-36.51985035227977,"lng":148.04298681640626


texts: Setting encode type in Excel Reader of FME?

texts:
I have downloaded trial version of FME 2015 and I try to read an Excel file which included multiple sheets with filtered columns and pivot tables.
I want to read this file in FME and write the data into a Postgres database.

When I use the Excel Reader to preview the file in FME I see that the columns with the non-latin characters are replaced with question marks.
How can I set the encode type in the reader? Should I do it before I load the file to FME? I have already tried to save the excel file with a different encode type but still the problem occurs.
Any suggestions?


texts: How to store both fixed and variable attributes as a feature class?

texts:
I have a live data feeds as an XML file from the Internet. I need to use Python and ArcPy lib to store each feed as a point feature in a feature class of an ArcSDE datbase.

The xml looks like:

<array-list>
    <spider-pos-wSVO brigade-no="36145" heading="280" altitude="302" longitude="146.09046833333332" latitude="-37.054605" personnel-no="0" speed="13">
        <attrA>12</attrA>
        <attrB>0</attrB>
    </spider-pos-wSVO>
    <spider-pos-wSVO brigade-no="36145" heading="280" altitude="302" longitude="146.09046833333332" latitude="-37.054605" personnel-no="0" speed="13">
        <attrA>12</attrA>
        <attrC>0</attrC>
    </spider-pos-wSVO>
    <spider-pos-wSVO brigade-no="36145" heading="280" altitude="302" longitude="146.09046833333332" latitude="-37.054605" personnel-no="0" speed="13">
        <attrA>12</attrA>
        <attrD>0</attrD>
    </spider-pos-wSVO>
    ....
</array-list>

Obviously each  element has a fixed set of attributes (heading, altitude, longitude and latitude, etc etc) and a various set of child-elements (attrA, attrB, attrC and attrD, etc). I am able to store the fixed attributes as attribute fields in the SDE feature class but have no idea how and where to store the variable ones.

Has anyone got a best practise for it? Thanks


texts: What is the current Web Mercator projection code?

texts:
The web mercator projection, popularised by Google Maps, seems to be given a new EPSG code every couple of years.

EPSG:900913 (Google in calculator text) was an unofficial code

EPSG:3785 - is the projection I currently use for my datasets

However this blog post suggests that the code is now EPSG:3857.

This projection can be found on the EPSG site but it seems to also use the code SR-ORG:6864 and claims "it is not a recognized geodetic system: see WGS 84 / World Mercator (CRS code 3395)."

So what is the official code to use?


texts: Creating an irregular points grid -- one with regular along-slope distances

texts: I am currently using QGIS to try and prepare a series of equally spaced -- along the terrain slopes -- sampling points within various NVC (National Vegetation Classification) sites in the UK. I am using a NVC vegetation dataset which is in vector form; allowing me to select the individual vegetation sites I want to produce points grids for. Previously I have been using the 'regular points' tool however this appears to only create a grid of points in 2D, horizontally. I am however interested in the movement of small mammals across the land and hence want to create a grid of evenly spaced sample points measured across, up and down the terrain; specifically the elevation, to produce a 3D grid of sample points. On the ground, the 'regular points' tool is fine on flat land, but in the hills the points are no longer evenly spaced. I have access to a lot of the OS vector and raster data but I am not sure exactly how best to approach this problem.


texts: Offline Map with mapnik: Tiles are vertically unaligned and randomly displayed (Leaflet + Tilecache + Mapnik + Postgis)

texts:
I'm new to maps and currently I am developing my first offline Map with OSM data. I have map data added to postgres via osm2pgsql and installed mapnik 2.2. For caching I have used tilecache with standalone HTTP server under WSGI. For viewing the map, I have used leaflet. So, now, when I open browser everything works file, the map tiles are produced properly and displayed in the browser but the problem is that it is displayed randomly (I have attached a picture).

Leaflet code:

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

var map = new L.Map('map', {
    center: [0, 0],
    zoom: 0
});

L.tileLayer('http://localhost:8080/1.0.0/osm/{z}/{x}/{y}.png').addTo(map);

//map.setView([0, 0], 0, {reset: true});

//the following avoid not displaying map when start untill zoom in or out
map.setView([52.1, 4], 3, {animate: false});

</script>

tilecache.cfg file:
[osm]
type=Mapnik
levels=10
mapfile= C:\OpenStreetMapTools\stylesheets\osm.xml
spherical_mercator=true
maxResolution=234.375
bbox=85.2270,27.5932,85.4233,27.7717
extent_type=loose


texts: Accessing histogram values of Image over Feature Collection in Google Earth Engine after using fixedHistogram with reduceRegions?

texts:
I have an ee.Image called image and a grid (an ee.FeatureCollection) called gridnew. First, I am getting the histogram of pixel values in the image over each feature in the Feature Collection gridnew.

var gridHistos = image.reduceRegions({
      collection: gridnew,
      reducer: ee.Reducer.fixedHistogram(first_class, last_class, num_classes),
      scale: 90
    });

Future functions are dependent on these histogram values. I attempted to access these values using unwrappedHistos, which is a list of lists (the outer list represents the features while the inner list represents each histogram of that feature).

var unwrappedHistos = gridHistos.toList(500).map(function(feat){
  feat = ee.Feature(feat);
  var hist = ee.List(ee.Array(feat.get('histogram')).slice(1,1,2).project([0]));
  return hist;
});

When I run the following code, I expect to get the 0th value of the first feature's histogram.

print(unwrappedHistos.get(0).get(0));

However, this returns an error: "unwrappedHistos.get(...).get is not a function". How can I access these inner histogram values?


texts: QGIS - move a point object to specific coordinate

texts:
Is there a way of select an object (point, polygon) and move it to a specific coordinate (manually inserted)?

(with Numerical Digitize plugin can not make a move of the object but rather it creates me a new object)


texts: Seeking Shapefile of World countries with national currency attribute?

texts: I looking for Shapefile of a World countries having an attribute of the national currency, do you know how can I get that ?


texts:
Is there a built in function in PyQGIS to import the values from a plugin's metadata.txt?

I am developing a plugin and want to show the version corresponding to the value from metadata.txt. Is there a native way to get the values or would I have to parse the file by myself?


texts: Join (circular)polylines to create a polygon

texts:
I'm trying to merge three polylines in order create a polygon out of the surface bordered by them.
On the picture attached, it's the region between the green, yellow and red (dotted) line that I would like to transform into a polyline.

I know two line segments can be joined into one line (How to merge lines with slightly different endpoints in QGIS?), but how can I join them if the second line doesn't end anywhere near the other?

I'm working with QGIS 2.14.3-Essen, on a Mac (as one can see from the picture attached).

Hope someone can help me with this.

When the "Polygonize" algorithm is executed, a polygon is created of different regions, as you can see in the photo attached.

And if I run the "Lines to Polygons" function I get this result:


texts: Extracting pixels from polygonal geospatial region of set of map tiles and/or set of GeoTIFF files?

texts:
I need to create a script, probably JS or Python, to perform the following:

I have a polygonal region -- no "holes", and always fully convex -- for which I need to extract the pixel data from one of a set of map layers. Each of the layers in question will consist of either (a) standard quadtree-based map tiles, or (b) a set of non-overlapping rectangular GeoTIFF files (or JPEG/PNG files with lat/lon for the four corners).

So, the intended input of this script/function/method will be a polygon (specified in lat/lon coordinates), and a map layer. The output will be a rectangular png image (or some matrix representation of pixels that'll be used to generate a png), where all pixels that either fall outside the polygon or don't have any images in the map layer that overlap them will be transparent, and the rest will contain the pixel value taken from the map layer.

This feels like something someone's probably done before, but I'm not finding any modules that do it.

Does anyone know if one exists?


texts: Terminating Python scripts in Processing framework

texts:
I'm writing a Python script to use it in Processing framework. I need to cancel script execution if certain conditions are met (to save user's time). I tried to use sys.exit(arguments) command. The issue is that not only the script, but QGIS itself shuts down too. I also tried quit() but result is the same. How should I terminate script in Processing framework?
The following code is for reproduction purpose only. I don't need ad hoc solution for this particular case because I already have it. I need to know how to deal with this issue in general.
##Raster processing=group
##raster_1=raster
##raster_2=raster

from osgeo import gdal
import sys
from numpy import *
import ntpath
import re
import platform
from PyQt4 import QtGui

raster_1 = gdal.Open(raster_1)
raster_2 = gdal.Open(raster_2)

rasters_list = [raster_1, raster_2]

# create a message for the case when CRSs of rasters do not match
class WrongCRS(QtGui.QMessageBox):

  def __init__(self):
    super(WrongCRS, self).__init__()

    self.initUI()

  def initUI(self):

    self.warning(self, 'Oops!',
            "Rasters must have the same CRS!\n\nExecution cancelled!", QtGui.QMessageBox.Ok)

# check CRS
proj = None
for raster in rasters_list:
  new_proj = raster.GetProjection()
  if proj is None:
    proj = new_proj
  else:
    if proj != new_proj:
      WrongCRS()
      sys.exit('CRSs do not match!')
    else:
      continue


texts: Nearest Neighbor Two Point Tables Return Line Geometry

texts:
I am looking to find the nearest neighbor between two point tables in PostGIS and return the ids of both along with the line geometry. I have been able to determine the distance for the nearest between the two datasets but how do I return the line geometry.

select a.id, a._unique, closest_pt.dist
into nearest_neighbor_lines
from pois_1600 a
CROSS JOIN LATERAL
  (SELECT
     id ,
     a.geom <-> b.geom as dist
     FROM intersections b
     ORDER BY a.geom <-> b.geom) AS closest_pt;


texts:
I was wondering in what way (data format, infrastructure) 3D building data is stored in Google Earth. I am very impressed by the quality and performance. Are the vertices of the mesh stored in spatial coordinates or some other format?

For example: OBJ, Collada, FBX, OSGB etc.

In addition, is there an OGC compliant alternative for Open Source applications?


texts: Import data table from database into QGIS using PyQGIS

texts:
I need to import a data table from a database into QGIS using PyQGIS. This table is not QgsVectorLayer and there is not any geometry. That is probably why this is not working. How can I do it?

uri = QgsDataSourceURI()
uri.setConnection("IP_addr", "5432", "gis", "user", "pass")
uri.setDataSource("public", "typy_vykopu", "", "")
table = QgsVectorLayer(uri.uri(), "typy_vykopu_stazene", "postgres")
if not table.isValid():
    print "Table %s did not load" % table.name()
QgsMapLayerRegistry.instance().addMapLayers([table])


texts: ArcGIS SQL Server - Using Windows Authentication

texts:
I want to use a domain level service account to manage my database connections.  This account is added as a Windows authenticated account in SQL Server 2012 as a sysadmin.  If I try to use this account as the Database Administrator in the Create Enterprise Geodatabase tool with the Database Authentication option I get a bad user login error, but only if I am logged into my workstation as my regular account.  If I log into my workstation as the service account and use Database Authentication and supply the domain account credentials again it works.

Shouldn't this work independently of who is logged into the workstation?  Is there a way to specify a Windows account when using Database Authentication, beyond using "domain\username"?


texts: Defining output raster type in ModelBuilder?

texts: Im trying to reproject raster data type .jpg inside a model builder, i batched the model, everything is ok besides that the raster type after that is in .tiff by default. I want those to stay in .jpg


texts: Counting number of visible entries using jsTree

texts:
I'm displaying a tree via jsTree within a jQuery dialog box and that is running fine. Now I want to resize the dialog box depending on the number of visible entries of the tree.

Resizing is not the problem but I need the number of visible lines.

Example: https://wambachers-osm.website/emergency/idx402.jsp

this shows 2-16 lines and the box is too big.

btw: page is still in development. some features not working yet.


texts: QGIS dxf2shp and the unit of text rotation angle

texts:
My problem is the following
When Importing dxf with dxf2shp the rotation value for the text isent there

Here is part of my DXF file :

_______________
TEXT

  5

6881

330

6970

100

AcDbEntity

  8

Nummer

  6

Continuous

 62

     7

370

     0

100

AcDbText

 10

532781.146132

 20

6224946.688754

 30

0.0

 40

0.299994

  1

4036

 50

21.902297

  7

Style-font0

 72

     1

 11

532781.562917

 21

6224947.017986

 31

0.0

100

AcDbText

 73

     2

  0
__________________

The text angle (nr 50) is 21.902297

After importing in QGis there is an angle at 0.3822671964 - but I don't know where it is from.

Here is the same colum in QGis

  wkt_geom  tipx    tipy    tipz    tapx    tapy    tapz    height  scale   flags   hjust   vjust   text    style   angle
POINT(532781.14613200002349913     6224946.68875399976968765)       532781.146132       6224946.688754      0       532781.562917       6224947.017986      0       0.299994         1      0       1       2       4036        Style-font0     0.3822671964

Anybody who knows how to solve this problem ?


texts:
I have been trying to check my filters on DEM raster for pattern recognition and it is always resulting in missing last rows and columns(like..20).
I have tried with PIL library, image load. Then with numpy. The output is the same.

I thought, something is wrong with my loops, when checking values in array (just picking pixels with Identification in ArcCatalog) I realized that pixel values were not loaded into an array.

So, just simply opening, puting into array and saving the image from array:

a=numpy.array(Image.open(inraster)) #raster is .tif Float32, size 561x253
newIm=Image.new(Im.mode, Im.size)
Image.fromarray(a).save(outraster)

Results in cuting away the last rows and columns. Sorry, can#t post the image

Anyone could help to understand why? And advise some solution?

EDIT:

So, I succeeded loading small rasters into numpy array with a help of guys, but when having a bigger image I start getting errors. I suppose it's about the limits of numpy array, and so array is automatically reshaped or smth like that... So ex:

Traceback (most recent call last):
  File "<pyshell#36>", line 1, in <module>
    ima=numpy.array(inDs.GetRasterBand(1).ReadAsArray())
  File "C:\Python25\lib\site-packages\osgeo\gdal.py", line 835, in ReadAsArray
    buf_xsize, buf_ysize, buf_obj )
  File "C:\Python25\lib\site-packages\osgeo\gdal_array.py", line 140, in BandReadAsArray
    ar = numpy.reshape(ar, [buf_ysize,buf_xsize])
  File "C:\Python25\lib\site-packages\numpy\core\fromnumeric.py", line 108, in reshape
    return reshape(newshape, order=order)
ValueError: total size of new array must be unchanged

The point is I don't want to read block by block as I need filtering, several times with different filters, different sizes..
Is there any work around or I must learn rading by blocks :O


texts: Loop through input and erase features arcpy.Erase_analysis()

texts:
I am attempting to loop through two folders, one of input files (watershed polygons) and erase features (area boundaries) using arcpy.Erase_analysis

Here is my current code:

in_cover = "G:/Files/Watersheds"

erase_cover = "G:/Files/Areas"

out_cover = "G:/Output/Erase_output/"

arcpy.env.workspace = in_cover
    for fc in [os.path.join(in_cover, x) for x in arcpy.ListFeatureClasses()]:
         print fc
          arcpy.env.workspace = erase_cover
          for fc2 in [os.path.join(erase_cover, y) for y in arcpy.ListFeatureClasses()]:
               print fc2
                 arcpy.Erase_analysis(in_features = fc, erase_features = fc2,
                                         out_feature_class = out_cover + "UNP_" + fc)

Running this, I get this error:

ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Feature Class:
Dataset G:\Output\Erase_output\XXX1.shp already exists.

It seems like the second loop is returning all files in the folder instead of one. For example, if i remove the erase function and just print, here's what happens:

arcpy.env.workspace = in_cover
        for fc in [os.path.join(in_cover, x) for x in arcpy.ListFeatureClasses()]:
            print fc
            arcpy.env.workspace = erase_cover
            for fc2 in [os.path.join(erase_cover, y) for y in arcpy.ListFeatureClasses()]:
                print fc2

This returns:

G:/Files/Watersheds\WS1.shp
G:/Files/Areas\Area1.shp
G:/Files/Areas\Area2.shp
G:/Files/Areas\Area3.shp
G:/Files/Areas\Area4.shp
G:/Files/Areas\Area5.shp
G:/Files/Watersheds\WS2.shp
G:/Files/Areas\Area1.shp
G:/Files/Areas\Area2.shp
G:/Files/Areas\Area3.shp
G:/Files/Areas\Area4.shp
G:/Files/Areas\Area5.shp
G:/Files/Watersheds\WS3.shp
G:/Files/Areas\Area1.shp
G:/Files/Areas\Area2.shp
G:/Files/Areas\Area3.shp
G:/Files/Areas\Area4.shp
G:/Files/Areas\Area5.shp

...And so on.

How can I fix this?


texts: Calculating Mean Upslope slope, curvature, etc

texts: I'm trying to generate rasters whose values summarize the mean value of a given parameter (slope, curvature, etc.) of the upslope terrain.  I feel like this should be doable using only a flow direction raster and a raster of the parameter of interest, but I don't really know where to begin.  I've seen this instruction http://forums.esri.com/Thread.asp?c=93&f=995&t=303114, but I can't seem to figure out a way to interpret it that produces a result that makes any sense.  I'm familiar with ArcMAP, QGIS, SAGA, and a bit of GDAL and GRASS, so I'll gladly accept instructions for any of these platforms.


texts: Is it possible to independently adjust the simple size in the legend for tmap?

texts:
When trying to plot a dotmap with tmap:

tm_shape(points)+
 tm_dots(col="Party")+
 tm_shape(districts)+
 tm_borders(alpha=0.5)+
 tm_legend()

I want the points to remain at their original scale, but want the symbols in the legend to be larger, as right now they are the same size of the individual dots and thus very hard to see. If possible, I'd like to have them in rectangles.

This is how summary() on my dataset looks like:

   Party                    geometry
 Length:61457       POINT        :61457
 Class :character   epsg:3006    :    0
 Mode  :character   +proj=utm ...:    0


texts: Displaying WMS sublayers on ArcGIS JavaScript

texts:
I want to display layers of a WMS service containing sublayers on ArcGIS using JavaScript 3. No layers appear, but the WMSLayer is marked as loaded.

the WMS is described here:

data shom WMS

My code is here :

esri.config.defaults.io.corsEnabledServers.push('https://services.data.shom.fr');

  var layer1 = new WMSLayerInfo({
    name: 'VAGUES_WW3_R1250_MISTRAL-1000M_*',
    title: 'Vagues Mistral'
  });
  var layer2 = new WMSLayerInfo({
    name: 'VAGUES_MFWAM_R0000_GLOB05/Direction_of_wind_waves_msl',
    title: 'Vagues Provence est'
  });
  var resourceInfo = {
    extent: new Extent(2.071094, 42.30868, 7.080859, 44.251969, {
      wkid: 4326
    }),
    layerInfos: [layer1, layer2]
  };

  var wmsLayer = new WMSLayer('https://services.data.shom.fr/ncwms2/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&LAYERS=VAGUES_WW3_R1221_PROVENCE-OUEST-200M/Secondary_wave_mean_period_msl&BBOX=2.071094%2C42.30868%2C7.080859%2C44.251969&TIME=2018-10-10T02:00:00.00Z&WIDTH=1024&HEIGHT=1024&CRS=CRS%3A84', {

visibleLayers:['VAGUES_WW3_R1243_CORSE-EST-200M/Secondary_wave_mean_period_msl','VAGUES_MFWAM_R0000_GLOB05/u0']
  });

  map.addLayers([wmsLayer]);


texts: Ubuntu Raring - OpenLayers Plugin 1.8 or 1.9 Master

texts:
Relative newbie to Ubuntu and QGIS.  Many questions are posted relating to the OpenLayers plugin.  It works fine in windows but I cannot get it to work or even appear in either 1.8 or 1.9. The "fetch python plugins" option is missing from the menu.  I've tried the temporary fix for 1.9, also no go.

I've used Synaptic packet manager, the wiki and sources.list and every other tip.  It does not work.  I can install, uninstall, purge, clear the source.list, remove entries from Synaptic, re-install from software centre, etc etc but nothing works.


texts:
I would want to use the Qgis api for custom desktop application. When I imported the qgis.core module, I get the following error

>>> import qgis.core
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The
specified module could not be found.

A similar error was reported in the forums,im not sure if the exact solution was reached.

Python :ImportError: DLL load failed: The specified module could not be found

Forums do suggest that I would have to use the OSGeo Version of python. How would i get to choose the version of python to use?

I think this could be a path or a pythonpath.Have given my path and python path information below.Let me know if I had missed any of the directories that should be added for qgis core to get its dependencies met.

PATH=C:\Python26;C:\Python26\Scripts;C:\Python26\ArcGIS10.0;C:\Python26\ArcGIS10.0\Scripts;C:\OSGeo4W\apps\qgis-dev\bin

PYTHONPATH=C:\Python26;C:\OSGeo4W\apps\qgis\python;C:\OSGeo4W\apps\python27;C:\Python26\ArcGIS10.0;C:\Python26\Lib\site-packages


texts: Calculating Saga Wetness Index from LiDAR-derived .ASC files in RSAGA

texts:
I am trying to run SAGA Wetness Index on a large number of .asc files that were derived from 1-m LiDAR. Due to the large size/amount of data (each .asc file is ~1000 MB and I have ~685 files), I would really like to avoid having to convert the file type to .sgrd.
I understand that ascii files can be read into RSAGA, but I'm not having much luck. I'm trying to get it running on a folder with 6 files in it and I'm trying to run slope only because seems like a simpler calculation than TWI or SAGA WI.
R version: 4.0.3
SAGA version: 2.1.0
My code was as follows:
library(RSAGA)
env <- rsaga.env("C:/Program Files (x86)/SAGA-GIS")

#I first tried this on just one file:

rsaga.slope(in.dem = "filepath", out.slope = "filepath", env = env)

#This was the error message:

library path:   C:\PROGRA~2\SAGA-GIS\modules\ta_morphometry.dll
library name:   Terrain Analysis - Morphometry
module name :   Slope, Aspect, Curvature
author      :   O.Conrad (c) 2001

Parameters

Grids: No objects
Files: filepath
Transformation: yes
Interpolation: B-Spline Interpolation

loading: filepath
Driver: filepath
Cells: x 3924, y 5372
Bands: 1
Transformation x' = 324800.000000 + x * 1.000000 + y * 0.000000
Transformation y' = 5563672.000000 + x * 0.000000 + y * -1.000000
loading band [1/1]
Slope, Aspect, Curvature: could not initialize data objects
Error: executing module [Slope, Aspect, Curvature]
Warning message:
In system(command, intern = intern, show.output.on.console = show.output.on.console,  :
  running command '"C:/Program Files (x86)/SAGA-GIS/saga_cmd.exe" -f=q ta_morphometry "Slope, Aspect, Curvature" -ELEVATION "filepath" -SLOPE "filepath" -ASPECT "filepath" -METHOD "5"' had status 1

#Also tried:

wd <- setwd("filepath")
 asc.files<-dir(wd, pattern='.asc$')
 asc.files<-substr(basename(asc.files), 1, nchar(basename(asc.files)) - 4)
 asc.files
 for (i in length(asc.files[i])) {
     rsaga.esri.wrapper(fun=rsaga.slope, in.dem=asc.files[i],
                         method="maxslope", in.esri=T, out.esri=T, clean.up=T,
                            out.slope=c(paste("SLOPE",asc.files[i],sep="")), env=env, esri.workspace=
                          "P:/AserLab/Projects/OK_Wetlands/TWI/Test", format="ascii", georef="corner", prec=3)
     }

#error was:
Error: Grid file could not be opened.
Error: input file [bc_082l013_xli1m_utm11_2018.sgrd]
Error: Elevation
Error: executing module [Slope, Aspect, Curvature]

#There was also a long warning message similar to that above.


texts: CSV file imported in QGIS 3.4 Madeira in map plots points at wrong places

texts:
I import a list of points from a CSV file:

No of school    east    north
School 1    98,431388   22,883583
School 5    97,608888   22,854361
School 6    97,901388   22,549805

on a map:

but the points always end up on the wrong place.

The points are clearly in the Shan State in Myanmar but when I use the add layer delimited text layer, QGIS uses the file, shows correctly the point coordinates, and then accept the add and close.

Where do I go wrong?


texts: Merging fields within attribute table ArcMap

texts: I have an image file open in ArcMap of an area of land and its land use categories. I would like to combine some of these categories together in order to simplify the map. For example, there is 4 "types" of developed lands listed and I would like to combine them to be just one single field called "Development".


texts:
I'm looking for a way to create this line style in QGIS:

Is it possible? I can't find a way, but wanted to check whether I had missed something.


texts: Creating/modifying arrowhead symbology to create a 'pie' style symbol around a point

texts:
I have a point dataset that has 18 (2 categories of 9) variables that need to be symbolized. We want to symbolize each variable using an arrowhead symbol or some kind of triangular symbol that, by adjusting angle and offset we can position around the center point, with each arrow head being a piece of a pie/pizza.

Below are some examples of how we have achieved similar outcomes with other datasets.

The above is the affect we are trying to achieve, with the exception of wanting less white space between pieces, and 9 pieces in total. This model uses symbols from the ESRI dimensioning font in the character marker symbol type. However, you are not able to adjust the size/shape of the arrowhead symbol, so cannot reduce the white area.

Below is an example using the arrow marker symbol. This provides the ability to adjust the width and length of the arrowhead along with offset and angle. So it is possible to reduce the white area between pieces. However there is no ability to provide both hollow and filled symbology.

So basically I need the best of each of these solutions, the ability to have both filled and hollow symbology, and the ability to adjust the size/shape, angle and offset of the arrowhead. Any suggestions welcome? Is it possible to easily create your own symbol? That could be the easiest way.

Just to note, the data does not allow the use of the actual pie chart symbology, hence why we are effectively making our own.

UPDATE- Attached image of representative data. If the number is greater or equal to one then is is represented with a pie piece. If it is 0 the pie piece is left out. Full pie pieces cover over hollow, so hollow will only show if full = 0 and hollow = 1 or more for the same variable/color.


texts: DBF creation and manipulation without excel 2003

texts: My company just upgraded to Office 2007 and now I am no longer able to easily manipulate and create dbf's.  I do not understand MS's decision by removing this capability but alas there is no use crying over spilled milk.  I ask everyone here, what do you use (preferably free) to fill all your dbf needs?


texts: How to write on same *.shp file after running QGIS 3.0 algorithm?

texts:
I run the qgis:creategrid processing tool. When I write output path as OUTPUT parameter, it creates the shapefile in given directory. However when I run parameter again after changing some parameters except OUTPUT parameter, it does not write on same file with changes.

But I want to write  it on same *.shp file. Here is my code:

param = {'TYPE': 2,
         'EXTENT': "329727.56769520865,336312.5556485866,1288173.5555638324,1292085.1509720355",
         'HSPACING': 150,
         'VSPACING': 150,
         'HOVERLAY': 0,
         'VOVERLAY': 0,
         'CRS': "32637",
         'OUTPUT': QgsProcessingOutputLayerDefinition("D:/grid/grid.shp")}

processing.runAndLoadResults("qgis:creategrid", param)

For instance when I run it again after changing HSPACING parameter, I want to write it on D:/grid/grid.shp again.


texts:
I am trying to take three grayscale PNGs and turn them into an ASCII file for a CNC machine to mill them out. To get an idea of my project, here are some links:

This guide is the basic premise of what I'm trying to do. Except instead of creating a mural of states, it will be a three part mural of this image that I took on a vacation.

This video is very similar to what I'm doing, except he doesn't show much of the tech process behind it. Here is a timestamp of the finished product in that video.

These are the grayscale images I have photoshopped.

Here are the basic steps of what I'm doing.

Open QGIS
Drag a png file in
Raster>Conversion>Translate(Convert Format)
Get an error about 4 bands and it only allowing 1 band

I don't particularly understand how to go about doing this. I just want to make a nice birthday gift for my mother by milling out an artpiece of a photo from our vacation together.

I'm completely open to trying other programs as well.


texts: Importing 3D points text into multi point feature in ArcGIS Pro

texts:
My end goal is to turn 3D drill hole points into 3D lines. Each point has an associated name and for each name, I intend to make a polyline out of all of its points.
The native XY Table To Point script does half the job except it makes a simple Point feature. It somehow displays 735 rows for each of my 735 points but arcpy commands detect only 1 row so I cannot enumerate by row.
I was able to run the Points to Line tool and it made lines in the right xyz positions, but it dropped all the fields so I cannot do anything useful with them.
Are there built in methods I do not know to make a proper multi point feature out a 3D XYZ points?
Then I can at least write my own line construction script.
Or is there a more direct way I can import the XYZ data, like XY To Line tool, but including the Z component, and without losing the other fields?

Found the solution of:

XY To Line (tick preserve attributes)
Feature to 3D by Attribute


texts: Is it possible to add a Legend to Temporal animation in QGIS

texts: I have a Temporal animation that shows the movement of tracked squirrels in the forest, there is a  different colour for each animal.  If I add a legend showing colours to the map it doesn't show in the animation.  I have got around this so far by using the Title Decoration but can only have an entry as "1323 = Yellow".  I would be better to show the colour.  I would apreciate any ideas how to acheive this.


texts: match noisy GPS data to closest linestring in road network

texts:
I have some noisy GPS data(Points) that they are not exactly on the road because of the noise. But I want to match them to the closest road linestrings. How to do this in PostgreSQL?

Data: accident_tn is the traffic accidents data that contains st_case as its unique id, and geom as its geometry (which is Point type);
road is the road network that contains id as the unique id of the linestring, and geom_way as its geometry (which is linestring type);
Goal: match each accident point with a road network linestring (the closest one).
I tried:

 select acc.st_case, road.id
    from accident_tn acc, at_2po_4pgr road
    where st_dwithin(acc.geom,road.geom_way,0.0002)
    order by acc.st_case;

Sample result:

Remaining Problem: Because of the radian value in ST_DWITHIN(), some accidents match more than one linestring while some accidents match none.

I am thinking about how can I modify the query to keep only one linestring for those one point-many linestrings case. In this sense, I can then select a larger randian threshold to match all accident point to one and only one linestring.


texts: How to create a JSON object in Geocortex to be used in Crystal Reports

texts: Does anybody know if it's possible to convert a dataset containing unique ID's in Geocortex workflow to a JSON object so that it could be used in Crystal Reports?  My knowledge of Geocortex is quite limited so hoping someone may know the answer.


texts: Getting all edges from a graph in a radius with osmnx

texts:
I want to get all edges for a given radius(distance) from a graph or geopackage in osmnx (without using osmnx.geometries.geometries_from_point). Is there a way to do that?
The reason I want this is sometimes the points in my project are just in between the roads. I would like to choose the edge which has a similar bearing with a bearing of origin to destination points. If anyone thinks a better way to do that I am open to any suggestion.


texts: Transforming polygon to linestring in QGIS?

texts:
I have a polygon, imported from a shapefile in QGIS. I would like transform it to a linestring instead so I can save it as a GPX file later.

How can I transform a polygon to a linestring in QGIS?


texts: Is it possible to fix Quick Maps layers not displaying properly when zoomed out in WGS84 in QGIS?

texts:
I often want to display some global point or polygon data over a base layer, to provide some context. Quick Maps layers like OpenStreetMap are handy for this, but these layers are usually in EPSG:3857, and when I zoom out to view the full globe in EPSG:3857, the projection maps incorrectly:

This is not a problem if zoomed in further, the transformation is applied correctly at finer scales:

Is there something I can do to make the zoomed-out version map correctly? I know I can use a global EPSG:3857 projection, and transform my vector data instead, but that doesn't always play nice:

and even if it did, EPSG:4236 is a much nicer projection for a full globe view for data like this (less pole dominance).


texts: Split a polygons into many polygons based on points using ArcMap

texts:
I have:

A polygon feature that is a national park boundary,
A multi-point feature that are security guard posts (number = n ) of the same park.

I want to divide the national park area into 'n' polygons such that each polygon represents the command area of a security guard post. The areas can vary.

How do I do this in ArcMap 10.1?


texts: Specify geom field name with ogr2ogr: gdb to PostgreSQL

texts:
I use the following ogr2ogr command to import my open file geodatabase into PostgreSQL.

# Note, I use the -append because I am adding to preexisting tables with the same structure
ogr2ogr -append -f "PostgreSQL" PG:"dbname=database host=localhost user=username password=password" my.gdb

This works just fine, but it always specifies the geometry field as wkb_geometry, and I'd like it to be geom as is the usual convention. I thought this might be controlled by the -geomfield option, but it seems that this is the not the correct flag (the documentation is too vague for me to be sure though).

If it was just one geodatabase, I could simply loop through and rename all the columns to geom, but since I will be appending multiple databases together that won't work.


texts: Tweepy Psycopg2 creating points, coordinate system SRID confusing

texts:
I am using Tweepy and Psycopg2 to extract tweets and input them in a PostgreSQL table. When I try to insert the point of the tweet I succeed in creating a point in the geom column I create. I however do not succeed in getting a basemap aligned behind it, while I thought I had the tweets in SRID=4326 which is WGS84.

Is there something wrong with my script? I suppose the basemap is not wrong but I can't be sure.

cur.execute("SELECT AddGeometryColumn('public', 'test', 'geom', 4326, 'POINT', 2)")
cur.execute("INSERT INTO Test(geom) VALUES(ST_SetSRID(ST_MakePoint(%s,%s),4326))",(tweet.coordinates['coordinates'][0],tweet.coordinates['coordinates'][1]))
        con.commit()

Or are Tweepy points just not in WGS84? I thought they were.

*** update
This is my search statement

for tweet in tweepy.Cursor(api.search, q="*",since="2016-02-10", until="2016-02-29", count=100000, geocode="5.29126,52.132633,150km").items(10000000):

Expecting the tweets to be in the Netherlands and parts of Belgium and Germany.

I did make some steps getting tweets in Belgium on  the right location. But it's still weird. I load in a basemap in EPSG::3857 and then need to put the tweets on EPSG::4326 and they align. When I put them in the same CRS they do not align.


texts: Setting parameter dependencies in ArcGIS python toolboxes?

texts:
I'm trying to build a Python Toolbox where the user selects a layer and then specifies a column in that layer. According to the Parameter documentation, that is done via the parameterDependencies attribute of an arcpy.Parameter instance. That same documentation says that you need a list of integers specifying the indexes of the downstream parameters. Presumably they reference the list of parameters you're supposed to return in the getParameterInfo method of your tool's class.

However, even the most basic of examples fails:

import arcpy

class Flooder(object):
    def __init__(self):
        self.label = "1 - Create Flood Scenarios"
        self.description = ""
        self.canRunInBackground = True

    def getParameterInfo(self):
        polygons = arcpy.Parameter(
            displayName="Zones",
            name="polygons",
            datatype="DEFeatureClass",
            parameterType="Required",
            direction="Input"
        )

        tidegate_column = arcpy.Parameter(
            displayName="ID column",
            name="tidegate_column",
            datatype="Field",
            parameterType="Required",
            direction="Input"
        )

        return [polygons, tidegate_column]

    def updateParameters(self, parameters):
        polygons = parameters[0]
        tgcol = parameters[1]
        polygons.parameterDependencies = [1]

f = Flooder()
p = f.getParameterInfo()
f.updateParameters(p)

Which raises:

---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<ipython-input-23-504b0ce950cb> in <module>()
      1 f = Flooder()
      2 params = f.getParameterInfo()
----> 3 f.updateParameters(params)

<ipython-input-22-c19883891bbb> in updateParameters(self, parameters)
     11         polygons = parameters[0]
     12         tgcol = parameters[1]
---> 13         polygons.parameterDependencies = [1]
     14
     15

C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\arcobjects\_base.pyc in _set(self, val)
     87                     return val
     88         try:
---> 89             return setattr(self._arc_object, attr_name, cval(val))
     90         except AttributeError:
     91             raise NameError(

ValueError: ParameterObject: Dependency list value out of range

Any idea what's going wrong?

I have triple checked my code and the documentation, and I'm passing the specified list of integers that the property needs.


texts: How to produce a hazard map using slope and geology information

texts: for my project I need to display a landscape's susceptibility to erosion. I created a slope-map out of my DEM and added the bedrock geology as a polygon-feature shapefile. Now I want to tell ArcGIS that areas with a certain slope (lets say >30°) and a soft rock underlying (e.g. schists) are particularly affected by erosion, whereas plain areas with harder lithologies are not. I used the Raster Calculator tool before to produce hazard maps, but I never used a shapefile as input. How can I transform the information stored in my shapefile into a raster?


texts: When I join a table to a shapefile and then export it the titles of the columns are transformed to data1, data2

texts:
I'm using QGIS 2.0.1

The table is in an excel format that i import through  "add vector" and the shapefile is a polygone

I join the attributes by right clicking the polygone-->properties-->join
Then once done if i look at the attributes table of the polygone everything is fine
But when i do save as shapefile and add the new layer, all the data of the attribute table is there expect that the titles of the columns become data1, data2

Does anyone knows how to fix it? or maybe i'm doing something wrong?

Thanks


texts:
I've been searching for an EPSG code for the coordinates I'm working with: geodetic latitude and longitude (not geocentric) and height above the WGS84 ellipsoid. I don't care about coordinate order. EPGS:7912 is very close but it's based on the GRS80 ellipsoid and my data is with respect to the WGS84 ellipsoid.

Does this EPSG code exist? What is it?


texts: How do I add my own map layers to Leaflet

texts:
I have a Leaflet map and want to add two of my own small polygon layers (currently in shapefile format, but they could be converted to GeoJSON).  Can this be done without a mapserver to publish them as map services?  Is so, are there specific instructions for this?

If it can not be done, are there "free" services for publishing small map layers?


texts: I'm researching how can I create a model urban floodplain depending on rainfall. And Which programme should I use? I want to show floodplain depending on temporal and spatial distribution on study areas. Which are parameters I should know? Soil characteristic, evaporation, moisture, climate, rainfall interval, rainfall intensity, drainage system, infrastructure pipes etc. But, I haven't got sufficient information.


texts: Leaflet GeoJSON legend with custom icons

texts:
I have been developed a legend, details are here:

Leaflet GeoJSON map legend

Now I am wondering how to take into account my custom icons, set for GeoJSON file.

var myIcon = L.icon({
  iconUrl: 'icon.png',
  iconSize: [32, 37],
  iconAnchor: [16, 37],
  popupAnchor: [0, -28]
});

Here is my GeoJSON custom icon set above.

Now the code, which I am considering as a potential to change...

function getColor(d) {
    return d === 'Company'  ? "#ff6600" :
           d === 'Church'  ? "#ffeecc" :
           d === 'Shop' ? "{icon:myIcon}" :
           d === 'Other' ? "#984ea3" :
                        "#ff7f00";

although, it washes out my color completely, so it doesn't work then...

function style(feature) {
    return {
        weight: 1.5,
        opacity: 1,
        fillOpacity: 1,
        radius: 6,
        fillColor: getColor(feature.properties.TypeOfIssue),
        color: "grey"

    };
}

var legend = L.control({position: 'bottomleft'});
legend.onAdd = function (map) {

var div = L.DomUtil.create('div', 'info legend');
labels = ['Categories'],
categories = ['Company','Church','Shop','Other'];

for (var i = 0; i < categories.length; i++) {

        div.innerHTML +=
        labels.push(
            ' ' +
        (categories[i] ? categories[i] : '+'));

    }
    div.innerHTML = labels.join('
');
return div;
};
legend.addTo(map);

I was trying to make sth like "categories2" and place between

labels.push(
            ' ' +  +
        (categories[i] ? categories[i] : '+'));

but it doesn't work too.

Any ideas about how to customize this legend on your needs?

Is there a chance to make this legend with more than 1 style?


texts: Probability of iOS/Android device location accuracy

texts:
I'm working with Android and iOS apps that report location. Both iOS and Android can derive location from a combination of cell tower triangulation, visible wifi access points, and assisted GPS. The location APIs return a lat/long and an "accuracy" number in meters. In the case of Android the API also tells us whether GPS was used, but iOS does not report the source.

What I have not been able to figure out from the Android/iOS documentation is how to read the accuracy number in terms of probability. Some GPS devices return the CEP, which means that there's about 50% probability that the device was within that radius. There are other ways of describing accuracy (e.g. 2DRMS) that provide up to 98% probability.

Is there any standard for reporting these accuracy numbers in Android and iOS? Or would the probability of the device being within the accuracy circle vary from one reading to the next?


texts: Cannot get arcpy.MosiacToNewRaster to work with list

texts:
Below I have a snippet of a much larger code that I cannot get to work and I am not sure why.  It seems that I always have trouble using arcpy functions with rasters.  Can anyone help me get this code to work? Thanks!

outpath = 'G:\\PROJECTS\\Cedar\\Environmental\\FEMA\\Results\\Processing.gdb'
arcpy.env.workspace = outpath

# List the relative elevation rasters in gdb and Mosiac
rasters = arcpy.ListRasters('Rel_elv*')
arcpy.MosaicToNewRaster_management(rasters, outpath, 'Relative')

I have tried all sorts of different ways to do this and the mosiac to new raster function does not seem to like my list.


texts: ArcGIS Pro - Clip (Modify Features) aggregates nearby geometry

texts:
I have a large polygon that contains several several other (smaller) polygons. Some of these smaller polygons also intersect with each other but they all at least 'touch' the larger polygon.
I want to clip this larger polygon with a unionized version of these smaller polygons (i.e. symmetrical difference/erase depending on your GIS of choice).
There are several ways you can do this but most of these require several steps and some temporary files. Thankfully, ArcGIS Pro has an Clip editor tool that should allow me to do all necessary steps at once and inplace (i.e. just modifies the existing geometries). It unfortunately does appear to aggregate nearby polygons (not touching) even when the optional buffer is set to 0.
You can test this yourself by opening a new feature class and drawing 2 nearby (again, not touching) rectangles (i.e. the input features) enclosed by a larger square (i.e. the target feature; see screenshot):
Is there some environmental setting that I'm not aware of that causes this behaviour? I'm running ArcGIS Pro 2.5.2


texts: Combine 8 different shapefiles into 1 with combined attribute fields

texts: I am working on a project where I want to add the attribute fields of 7 different shapefiles into 1 base shapefile. Specifically, I have a parcel map of a city, and I want to append attribute fields onto each parcel (things like trash day, city councilor, etc). I was trying to do a Union of the Parcels and then each subsequent map one at a time, but I was wondering if there is a faster way to achieve this. I am using QGIS 3.


texts:
Is there a WMS service of satellite imagery that works within China?

I know that Google satellite imagery is blocked. What about Bing? ESRI? Is there a local service?

I'm not interested in using a remote VPN, I would like a solid solution.


texts: How mix 3D Data from Google Map and one's 3D object?

texts:
Is it possible to add some 3D object in the 3D maps from Google ?
Which tools should I use (never used 3D modelling tools but I'm motivated :)

Here is the picture that triggered my question :


texts:
I am trying to follow these steps http://www.paolocorti.net/foss4g_2017_geonode_solr/10_customization.html but I installed geonode using the quick start tutorial http://geonode.org/#install. I am not able to run the solr app. I think the paths and configuration should be different and I tried changes like changing

mkdir geonode/solr to mkdir solr
python manage.py startapp solr geonode/solr to geonode startapp solr solr
# solr application urls
urlpatterns += patterns('',
url(r'^solr/', include('geonode.solr.urls')),
)
to
# solr application urls
urlpatterns += patterns('',
url(r'^solr/', include('solr.urls')),
)

But I cannot get it to work

Figured out path. change cd /workshop/geonode to cd /usr/local/lib/python2.7/dist-packages

Now I get Error occurred while trying to load geonode.urls: name 'patterns' is not defined
`


texts:
I am trying to design a beautiful map using QGIS.
There is a similar question here Seeking QGIS tutorials and web resources? but I would like to focus on "designing a map using QGIS".

I was looking for some tools, style database or tutorials to guide me.
How to use label classes, expressions, and annotations? helped me a lot and OSM seems to look great: 1, 2. However I need to use my own shapefiles. Also there is Quantumnik. It could be a great help, however it prints map on another tab and I need it to be on the same with my QGIS project.

I am looking for a way to design a beautiful looking road map using basic QGIS tools, any resources on that?


texts: Adding TFW metadata to TIFF header to create GeoTIFF

texts:
I'm aware this question has been asked several times already:
Convert .tif with .tfw to a GeoTiff?
tif tfw to GeoTiff

However, my aim is a bit different here:
I have a few hundred TIFF files that have formerly been GeoTIFFs. I batch edited all of them in Photoshop so they lost their GeoTIFF header.

I'm still having the respective TFW file for each of them. Is there a way to re-attach the information from the TFW file to the TIFFs to create GeoTIFFs WITHOUT having to re-write all the GeoTIFFs again? (like GDAL does with gdal_translate -of GTiff input.tif ouput.tif).

I'm pretty sure I've seen a tool a few years ago that can simple re-attach the headers from the TFW files to Tiffs to create GeoTIFFs of them, I simply can't find it anymore.


texts: Reconciling UTF encoding for OpenStreetMap?

texts:
I frankly am a bit confused when I am working outside the United States so please excuse my ignorance.

I downloaded some shapefiles for Moldova
(MoldovaData)
and had a question regarding the encoding of the attributes.

I have other data I want to link to it but many of the city names are encoded
differently. For instance I believe the attribute BÄƒlÈ›i corresponds to
Balti (Bălți) how do I reconcile the attribute names ?


texts: I have been working with some rasters and would like to know how to calculate the area occupied by one element of a raster in QGIS?


texts: Is it possible to build an ESRI addin (.esriaddin) using C++? I see templates for .NET and C# only but perhaps there is a manual method?


texts: in QGIS version 2.18.0, can we save queries for further usage on other data sets

texts:
In QGIS version 2.18.0, using Query Builder on attribute data, can we save the defined Query for further usage on other shp files with attributes.

I tried selecting a layer> properties> query builder . wrote simple query for finding out name of cities beginning with "B"and it gave query results. I wanted to further save this query for future usage, but could not find an option in the Query builder.

I am looking for LOAD Query and SAVE query buttons in the query builder dialogue box. This functionality was available in earlier versions of QGIS.


texts: Solving flagrant shared object errors when compiling postgis 2.1SVN from source on Ubuntu 12.04

texts:
I have spent the past few days of my life trying to figure out how to get postgis to function properly with a non-standard directory installation of postgres 9.3, but have been unable to resolve the following obnoxious errors:

ERROR:  could not load library "/pginstall/postgresql93/lib/postgis-2.1.so": libgeos_c.so.1: cannot open shared object file: No such file or directory

********** Error **********

ERROR: could not load library "/pginstall/postgresql93/lib/postgis-2.1.so": libgeos_c.so.1: cannot open shared object file: No such file or directory
SQL state: 58P01

I installed geos,gdal and postgres into contained directories in order to be able to update components without needing to manually find individual files and remove them.

Thus my libraries would be located in the following installation directories:

/pginstall/postgresql93/lib
/pginstall/gdal110/lib
/pginstall/geos34/lib

All other dependencies are installed using standard apt packages and I am using the standard build-essential package.

I tried setting various environment variables

    export LD_LIBRARY_PATH=/pginstall/geos34/lib:/pginstall/gdal110/lib
    export LDFLAGS="-Wl,-rpath,/pginstall/geos34/lib/,-rpath,/pginstall/postgresql93/lib,-rpath,/pginstall/gdal110/lib"
    export LDFLAGS="-Wl,-L,/pginstall/geos34/lib,-L,/pginstall/postgresql93/lib,-L,/pginstall/gdal110/lib"
    export LDFLAGS="-L/pginstall/geos34/lib -Wl,-rpath,/pginstall/geos34/lib"
    export LDFLAGS="-Wl,-rpath,/pginstall/geos34/lib/,-rpath,/pginstall/gdal110/lib"

But they all failed to work with the configuration below

./configure \
    --prefix=/pginstall/postgresql93 \
    --with-pgconfig=/pginstall/postgresql93/bin/pg_config \
    --with-geosconfig=/pginstall/geos34/bin/geos-config \
    --with-gdalconfig=/pginstall/gdal110/bin/gdal-config \
    --with-topology \
    --with-raster

I did manage to get this woking by adding the LD_LIBRARY_PATH variable to my upstart configuration for postgres --but this is a crude hack and is clearly not suitable for any kind of pre-production or production environment. I don't want to go the ldconfig route either as that requires root access.

I can verify that this issue is that the postgis configure process is ignoring my direct commands to add the paths to the binaries, by running the following command:

chrpath -l /pginstall/postgis/postgis-2.1.0SVN/postgis/postgis-2.1.so

which yields

RPATH=/pginstall/postgresql93/lib

The LDFLAG commands work when compiling GDAL with GEOS and Postgres, so I believe this is a postgis specific issue.

I have no idea what else I can do as I am not a c compiler expert, nor should I need to be to perform this simple task on the OS upon which postgis was developed!

One would assume that postgis should know where the libraries are given that I set them explicitly in the configure step and after concurrently setting LD_LIBRARY_PATH and LD_FLAGS. This is pretty depressing. What more should one need to specify?

Does anyone know of a simple way to fix this issue?

As a side note I am glad I program in Java, as properly building from source in C basically seems to follow the steps below:

1) Hope configure/make/make install just miraculously work

2) Upon inevitable failure, set random environment variables that each have 6.022E^23 contradictory explanations for its function on the internet for each operating system --and are sourced from.

3) Upon inevitable failure, Sacrifice a macbook to the gods of C

4) Consign yourself to your grim fate and download a mostly broken and ridiculously out-of-date package from apt instead.


texts:
I want to add a line break to a long text line in the QGIS attribute table. I made a small excel example to visualize it:

Is this possible somehow? I use geopackage as datasource.


texts:
I use QGIS and I have a problem with WMS file. Since WMS maps are not overlapped to Google Maps, so to solve this issue I create a new shape file drawing the image from WMS maps but when I save this file with Google Maps frame of reference (EPSG 4236), my image is pointed in a unknown point in Africa.

So I enough to change frame of reference... Do I have to use projection on the fly?
Yes, I am using 2.14.22 I tryied the version 3 but is quite different and I have difficult to find many features... For example projection on the fly is configured in a different manner


texts: Getting same result with less code with PythonWin ArcPy?

texts:
I have finished writing code and it does what I need without having any error. However, I am wondering if there is any option to get the same result in fewer lines, pecially the for loop inside the UpdateCursor.

I am using ArcMap 10.7.1

# -*- coding: utf-8 -*-

# @Author: Daniel Ibáñez Campos
# @Abstract:

# Import the arcpy and os modules
import arcpy
import os
import sys

#=============================================================================
# Functions
#=============================================================================

# Define functions here

#def myfunction1( text ):
    #print "This is myfunction 1"
    #print text

#=============================================================================
# Main script
#=============================================================================

# It lets the user know that the script has started
print "Script starting"
# Set up the workspace environment
arcpy.env.workspace = r"D:\python_data"
# Overwrite files by default
arcpy.env.overwriteOutput = True

#=============================================================================
# Call functions here
#=============================================================================

#myfunction1("Example text")

# Input feature class (shapefile)
fc = "10_and_more_acres.shp"
# Creates the new field name "CAUSE_TEXT"
newfield = "CAUSE_TEXT"
# Defines the new field type (This is a text field)
fieldtype = "TEXT"
# Validates that the new field created has a valid name
fieldname = arcpy.ValidateFieldName(newfield)
# This function clears up the field name
print "cleaned up fieldname:", fieldname
# Call addField to create the new field
arcpy.AddField_management(fc, fieldname, fieldtype, "", "",50)
# Tells the user that the new field has been created
print "New field created!"
# This function generates the correct syntax for a where clause
delimfield = arcpy.AddFieldDelimiters (fc, "CAUSE_TEXT")
# Opens update cursor on column "CAUSE"
cursor = arcpy.da.UpdateCursor(fc, ["CAUSE_TEXT", "CAUSE"])
# For each row where the where clause is true
for row in cursor:
    # Insert
    if row[1] == 0 and 14:
        row[0] = "Unknown / Unidentified"
    if row[1] == 1:
        row[0] = "Lightning"
    if row[1] == 2:
        row[0] = "Equipment Use"
    if row[1] == 3:
        row[0] = "Smoking"
    if row[1] == 4:
        row[0] = "Campfire"
    if row[1] == 5:
        row[0] = "Debris"
    if row[1] == 6:
        row[0] = "Railroad"
    if row[1] == 7:
        row[0] = "Arson"
    if row[1] == 8:
        row[0] = "Playing with fire"
    if row[1] == 9:
        row[0] = "Miscellaneous"
    if row[1] == 10:
        row[0] = "Vehicle"
    if row[1] == 11:
        row[0] = "Powerline"
    if row[1] == 12:
        row[0] = "Firefighter Training"
    if row[1] == 13:
        row[0] = "Non-Firefighter Training"
    #if row[1] == 14:
        #row[0] = "Unknown / Unidentified"
    if row[1] == 15:
        row[0] = "Structure"
    if row[1] == 16:
        row[0] = "Aircraft"
    if row[1] == 17:
        row[0] = "Volcanic"
    if row[1] == 18:
        row[0] = "Escaped Prescribed Burn"
    if row[1] == 19:
        row[0] = "Illegal Alien Campfire"
    # Update rows in the attribute table
    cursor.updateRow(row)
# Clear up the cursor
del cursor

# Tells user that the script has finished
print "End of script"


texts: How to project US States in Transverse Mercator

texts:
Possible Duplicate:
  Layers having the same coordinate system should overlap, but they don’t. What’s wrong?

I created two different MXDs, one for City of Tucson and another for US States. If you click on the ArcGIS.com Map link above (in the services link page), you will see that City of Tucson Layer is overlaid on the basemap but the US States is projected somewhere in the ocean. I know this is a projection issue but if you look at the metadata in the services link, both are showing Spatial Reference: 102100 (3857).

Now the projection of the City of Tucson is NAD_1983_HARN_StatePlane_Arizona_Central_FIPS_0202_Feet_Intl in the ArcMap and the US States is WGS_1984_Web_Mercator_Auxiliary_Sphere in ArcMap. I tried to change the projection to WGS84 but the layer is still not projected properly.

How can I correct it? By "correct it" I mean that the projection should be like City of Tucson where it is projected properly over the basemap in ArcGIS.com.

UPDATE: Projection Tool used

I used the Project tool in the Projections and Transformations Toolbox, which creates a new Feature Class as per the Co-ordinate system we provide. So the original data had co-ordinate system of WGS_1984_Web_Mercator_Auxiliary_Sphere and the new one I assigned was GCS_WGS_1984. The new output was saved in a new File Geodatabase. The Spatial Reference that is now reflected in the Meta Data is 4326, which is not what I wanted. I wanted it to be same as City of Tucson which was 102100 (3857).


texts: Producing a map from columns with highest number

texts:
I'm trying to produce a map with different categories based on four columns (lag, mlag, mhog and hog), these are income status. I want each polygon in the map to be represented by whatever number who is the highest among these four columns, thus making it a map with four different categories that represent the most prevalent income in that area.

I.e. for FID 0 it will be 'hog'

I figure it must be something related to Symbology but there is no option to select categories based upon highest number or something like it.

I hope I was clear enough, the task is quite simple I think but I can't really see right now how I should do it.


texts: To make HDF format files into tiff files

texts:
I have downloaded the MODIS Monthly Fire Location Product from the University of Maryland ftp Server. All the files are in HDF format.

How do you make these into tiff's?


texts: Transforming geometry PostGIS column with unknown geometry type?

texts:
I run PostgreSQL 9.1 and PostGIS 2.0. I have a table that contains one geometry column.

But that column contains point, polygons lines, etc.

So I set it like so,

ALTER TABLE jake ADD COLUMN jake_geom geometry;

and then I setted some constraints to make it geometry enabled, but not limited on a single geometry type

ALTER TABLE jake
  ADD CONSTRAINT enforce_dims_geom CHECK (st_ndims(jake_geom) = 2);

ALTER TABLE jake
  ADD CONSTRAINT enforce_srid_geom CHECK (st_srid(jake_geom) = 900913);

Now, I want to reproject the geometries in that column to 4326.

According to this, for the transform to work, I need to set a geometry type.

(the TYPE geometry(MultiPolygon,2163) part)

but my column does not have certain geometry type. How do I proceed?

Or I can simply do

ALTER COLUMN geom USING ST_Transform(geom,2163);

avoiding to set a type?


texts: R error reprojecting from EASE 2.0 to WGS84

texts:
I have a data file which is in the EASE 2.0 grid (EPSG:6933) which read in with raster looks like so:

class       : RasterLayer
dimensions  : 3000, 3000, 9e+06  (nrow, ncol, ncell)
resolution  : 6000, 6000  (x, y)
extent      : -9e+06, 9e+06, -9e+06, 9e+06  (xmin, xmax, ymin, ymax)
coord. ref. : +proj=laea +lat_0=90 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0
data source : /Users/user/Documents/SERDP/FT_ESDR_PER_sort/AMSR_36V_CO_FT_2002_day153_NH_06km.tif
names       : AMSR_36V_CO_FT_2002_day153_NH_06km
values      : 0, 255  (min, max)

and it plots fine.

I need to get this file in WGS84 though and I am trying to use projectRaster.

projectRaster(EASE2_raster, crs = '+init=EPSG:4326', method = 'ngb')

but this returns:

Error in if (xmn == xmx) { : missing value where TRUE/FALSE needed

I also tried in Qgis with GDAL warp but the output is not correct, is this some problem with the source EPSG maybe?


texts: Open source server option for ESRI tile cache

texts:
I've been given a data extract that appears to be from an ESRI server, and I think is meant to be map tiles (e.g. from a tile cache server).

I don't know enough about ESRI products to identify which one it comes from, and the timing (summer break in this hemisphere) is bad for asking the originator.

The directory structure looks like this:

 ├── _alllayers
     ├── L00
     │   ├── R0000C0000.bundle
     │   └── R0000C0000.bundlx

  ... More "Lnn" directories here, down to L14, with more files in lower levels

 ├── conf.cdi
 ├── Conf.xml
 └── Status.gdb
    ├── a00000001.gdbindexes
    ├── a00000001.gdbtable
    ├── a00000001.gdbtablx
    ├── a00000001.TablesByName.atx
    ├── a00000002.gdbtable
    ├── a00000002.gdbtablx
    ├── a00000003.gdbindexes
    ├── a00000003.gdbtable
    ├── a00000003.gdbtablx
    ├── a00000004.CatItemsByPhysicalName.atx
    ├── a00000004.CatItemsByType.atx
    ├── a00000004.FDO_UUID.atx
    ├── a00000004.gdbindexes
    ├── a00000004.gdbtable
    ├── a00000004.gdbtablx
    ├── a00000004.spx
    ├── a00000005.CatItemTypesByName.atx
    ├── a00000005.CatItemTypesByParentTypeID.atx
    ├── a00000005.CatItemTypesByUUID.atx
    ├── a00000005.gdbindexes
    ├── a00000005.gdbtable
    ├── a00000005.gdbtablx
    ├── a00000006.CatRelsByDestinationID.atx
    ├── a00000006.CatRelsByOriginID.atx
    ├── a00000006.CatRelsByType.atx
    ├── a00000006.FDO_UUID.atx
    ├── a00000006.gdbindexes
    ├── a00000006.gdbtable
    ├── a00000006.gdbtablx
    ├── a00000007.CatRelTypesByBackwardLabel.atx
    ├── a00000007.CatRelTypesByDestItemTypeID.atx
    ├── a00000007.CatRelTypesByForwardLabel.atx
    ├── a00000007.CatRelTypesByName.atx
    ├── a00000007.CatRelTypesByOriginItemTypeID.atx
    ├── a00000007.CatRelTypesByUUID.atx
    ├── a00000007.gdbindexes
    ├── a00000007.gdbtable
    ├── a00000007.gdbtablx
    ├── a00000009.gdbindexes
    ├── a00000009.gdbtable
    ├── a00000009.gdbtablx
    ├── a00000009.spx
    ├── a0000000a.gdbindexes
    ├── a0000000a.gdbtable
    ├── a0000000a.gdbtablx
    ├── a0000000a.spx
    ├── a0000000b.gdbindexes
    ├── a0000000b.gdbtable
    ├── a0000000b.gdbtablx
    ├── a0000000b.spx
    ├── a0000000c.bundleNameIndex.atx
    ├── a0000000c.gdbindexes
    ├── a0000000c.gdbtable
    ├── a0000000c.gdbtablx
    ├── a0000000c.jobIDIndex.atx
    ├── a0000000c.scaleIndex.atx
    ├── a0000000c.spx
    ├── gdb
    └── timestamps

I'd like to be able to serve this data up in a TMS or (less preferred) WMTS format. Failing those two, WMS would also be OK.

Is there an open-source server that can take this format and serve it up directly? If not, is there an open source conversion tool that can convert it into a "normal" format (mbtiles, geopackage, or an on-disk directory structure) that can then be ingested into an open-source server?

I've tried pointing gdalinfo at some of the more likely looking files, but it resulted in gdalinfo failed - unable to open messages.


texts: Raster alignment doesn't produce aligned results

texts:
I have two rasters with different extent and resolution, same coordinate reference, from two different surveys - one RGB and one NIR - takes on different times.

  nir_in
  class       : RasterBrick
  dimensions  : 981, 1232, 1208592, 4  (nrow, ncol, ncell, nlayers)
  resolution  : 1.04782e-06, 9.801315e-07  (x, y)
  extent      : -45.40288, -45.40158, -21.56267, -21.56171  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

  rgb_in
  class       : RasterBrick
  dimensions  : 978, 1228, 1200984, 4  (nrow, ncol, ncell, nlayers)
  resolution  : 1.05155e-06, 9.835644e-07  (x, y)
  extent      : -45.40288, -45.40159, -21.56272, -21.56176  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

I have aligned both rasters using align_rgb = resample(rgb_in, nir_in, "bilinear") and it returned

  align_rgb
  class       : RasterBrick
  dimensions  : 981, 1232, 1208592, 4  (nrow, ncol, ncell, nlayers)
  resolution  : 1.04782e-06, 9.801315e-07  (x, y)
  extent      : -45.40288, -45.40158, -21.56267, -21.56171  (xmin, xmax, ymin, ymax)
  coord. ref. : +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0

which seem right, but when I try to plot view the results in QGIS the rasters remains unaligned. I have noticed that the differences are from 6th decimal place onwards.

Am I doing something wrong?


texts: I have created a Webapp with sensitive information that I would like to password protect.  Is this at all possible?  I know you can keep it private within your ESRI Organization but I would like to share it with non-esri users but restrict access from the general public.