texts: About the shortest path returned by pgrouting

texts:
I have a couple of questions related to the shortest path returned by pgrouting. I have this result for example.

edge_id   cost            reverse_cost  x1           y1         x2           y2
1         0.0016861729    1000000       -93.2518843  44.9718147 -93.2527683 44.9707752

160       0.0034403359    1000000       -93.2544283 44.9686054  -93.2527683  44.9707752

Now as you can see the first two results of the shortest path query are showing edges which are one way. It is because the reverse cost is high 1000000. Now if I want to trace out the path of the shortest path then I will join the coordinates like this

(-93.2527683  44.9707752) -> (-93.2527683 44.9707752) -> (-93.2527683 44.9707752)

and soon. Now my question is the coordinate pair (-93.2527683 44.9707752) is common in the first and second edge which are both one ways. Now when joining the coordinates from the second pair, I am joining it like

(-93.2527683 44.9707752) -> (-93.2527683 44.9707752)

which is in opposite direction, so is it fine? I mean the edge is one way but I am joining the coordinates from like (x2,y2) to (x1,y1). Is this correct or I am missing something?


texts: Cost Distance Path ArcPy Code Failure: Error 000865

texts:
I am attempting to run a cost distance analysis where my list of source points (roughly 100 points) corresponds to the same number of destination points. Instead of running the cost distance analysis on each pair of points individually, I was hoping to run a script to do it for me. Here is the code below:

    import arcpy
arcpy.CheckOutExtension("spatial")
arcpy.env.workspace = 'H:\\IASGIS\PythonScripts\\CostSurfaceLoops.gdb'
TargetWorkspace = r'H:\\IASGIS\\Geodatabase\\PythonScripts\\CostSurfaceLoops.gdb'

SourcePoints =  "H:\\IASGIS\\PythonScripts\\CostSurfaceLoops.gdb\\PFNZ_Northland_SOURCE_Points_FID_TEST"
DestinationPoints = "H:\\IASGIS\\Geodatabase\\PythonScripts\\CostSurfaceLoops.gdb\\PFNZ_Northland_DESTINATION_Points_FID_TEST"
CostSurface = ("H:\\IASGIS\\Geodatabase\\Island_Isolation\\CostSurface\\PFNZ_CostSurface\\PFNZ_Northland_CostSurface.tif")

TestCostDist = "H:\\IASGIS\\PythonScripts\\CostSurfaceLoops.gdb\\CostDistSource"
TestBacklink = "H:\\IASGIS\\PythonScripts\\CostSurfaceLoops.gdb\\BacklinkSource"
TestCostPath = "H:\\IASGIS\\PythonScripts\\CostPathTest"

int(arcpy.GetCount_management(SourcePoints).getOutput(0))

for i in range (int(arcpy.GetCount_management(SourcePoints).getOutput(0))):
    arcpy.MakeFeatureLayer_management(SourcePoints, "point" + str(i), ' "IN_FID" = ' + str(i))
    TestCostDist = arcpy.gp.CostDistance_sa("point" + str(i), CostSurface + str(i), TestBacklink + str(i))
    TestCostDist.save("CostSurface_Test" + str(i))

How do I solve the issue using ArcGIS 10.3?

When I run the output, I receive the following error:

      Failed to execute. Parameters are not valid.
ERROR 000865: Input cost raster: H:\IASGIS\Geodatabase\Island_Isolation\CostSurface\PFNZ_CostSurface\PFNZ_Northland_CostSurface.tif0 does not exist.
Failed to execute (CostDistance).


texts: Openlayers 3: Hover effect below top layer with labels?

texts:
I am using OpenLayers 3 and I want to have a hover effect of a polygon layer below the top layer with labels. I can arrange the order of the layers that the labels are on top of the polygon, but unfortunately, the hover effect (pointerMove) jumps on top of the labels. Is there a way to fix that?

I created a fiddle with a simple example: http://jsfiddle.net/a4kL9441/1/


texts: List of useful Add-Ins for ArcGIS Desktop?

texts:
What are the best Add-Ins for ArcCatalog and ArcMap v10?

XRay for ArcGIS 10 is very useful, what else is out there?


texts: Generating sf dataframe from raster based on intersection with polygons and distance from polygons

texts:
I'm working on a project looking at the effect of a particular housing policy applied on a very micro scale in Berlin, but I'm dealing with a number of different geometries; my plan is to have my final object of analysis on which I'll be performing regressions be an sf dataframe of cells covering Berlin converted from a raster. Currently, I'm trying to incorporate a column into this raster that includes whether a cell is within a protected area, and, if not, how far from the nearest protected area it is. I'm struggling to create a raster that preserves the attribute data on when these areas were created while I'm creating a raster. Here is what I have thus far, and any suggestions would be really appreciated.
get_X_Y_coordinates <- function(x) {
  sftype <- as.character(sf::st_geometry_type(x, by_geometry = FALSE))
  if(sftype == "POINT") {
    xy <- as.data.frame(sf::st_coordinates(x))
    dplyr::bind_cols(x, xy)
  } else {
    x
  }
}

sf_fisbroker <- function(url) {
  typenames <- basename(url)
  url <- httr::parse_url(url)
  url$query <- list(service = "wfs",
                    version = "2.0.0",
                    request = "GetFeature",
                    srsName = "EPSG:25833",
                    TYPENAMES = typenames)
  request <- httr::build_url(url)
  print(request)
  out <- sf::read_sf(request)
  out <- sf::st_transform(out, 3035)
  out <- get_X_Y_coordinates(out)
  out <- st_as_sf(as.data.frame(out))
  return(out)
}

load(url("https://userpage.fu-berlin.de/soga/300/30100_data_sets/berlin_district.RData"))
berlin_base <- st_transform(berlin.sf, 3035)
berlin_template <- raster(extent(berlin_base), resolution = 424, crs = st_crs(berlin_base)$proj4string)

eg <- sf_fisbroker("https://fbinter.stadt-berlin.de/fb/wfs/data/senstadt/s_erhaltgeb_em")

# uses raster package; returns all cells from base template with intersection, but unclear how to preserve attribute data
eg_poly_test <- rasterize(eg, berlin_template, field=1)

# uses stars package; helpful but doesn't preserve attributes
test <- st_rasterize(eg, ttemplate = berlin_template, options = "ALL_TOUCHED=TRUE")


texts:
I was trying to sum two different rasters and the final outcome is an error (image attached below)?
The main goal is to sum the values of each pixel in those rasters (both raster files have the same size and pixel size), for that i was using raster calculator, with a simple expression the "TIPO_SOLO@1" + "declives_map_reclass@1", but probably i doing some steps wrong.


texts: Customization of Line drawings in Carto Mobile

texts:
I've been following up the "Add a line" section in the tutorial of Getting started for the Carto Mobile SDK https://carto.com/docs/carto-engine/mobile-sdk/getting-started/#basic-map-features and so far it's being so helpful. However, I find that the documentation about customizing the drawing of lines is either incomplete or it's hard to find.

I've already applied a couple of improvements to my line (which is actually a route that I'm displaying over the map):

Smooth line joints, so they are connected with curves and not sharpen edges:

  LineStyleBuilder lineStyleBuilder = new LineStyleBuilder();
  lineStyleBuilder.setLineJoinType(LineJoinType.LINE_JOIN_TYPE_ROUND);
  lineStyleBuilder.setStretchFactor(2);
  new Line(result.getPoints(), lineStyleBuilder.buildStyle());

Improve drawing when zoom is in upper levels, reducing points to be drawn (this is applied on the DataSource object used to store the Lines):

  routeDataSource = new LocalVectorDataSource(projection);
  routeDataSource.setGeometrySimplifier(new
  DouglasPeuckerGeometrySimplifier(1.0f / 320.0f));

That's pretty good, however I'd like to go further, and:

Display the line with dashes, instead of a solid line from beginning to end
Apply a transparency/alpha to the color of the route, so I can see the roads/streets/paths under the Line. This I tried, applying the following on the LineStyleBuilder, but it looks weird:

  lineStyleBuilder.setColor(new com.carto.graphics.Color(Color.argb(180, 64, 125, 191)));


texts: Chatbox within/over Google JavaScript API (basemap) ?

texts:
I'm looking to build a demo utilzing the Google Maps APIs and some sort of Chatbox software so that I can chat with users directly within my mapping application.

So essentially, anyone with access to my site (HTML5) would be able to enter a message. OR, what would be really cool is if you went to my hypothetical mapping site, saw other users on your map (via the browsers HTML geolocation) selected their "blue dot" location, had an infowindow pop up, then were able to enter a message within said infowindow.

I've been looking at different technologies (Firebase, Twilio), for real-time chatting, but haven't found any solid examples.

Could anyone offer recommendations/examples?


texts: ST_Buffer won't accept bevel join styles (always displays as round)

texts:
I'm having a bit of trouble with ST_Buffer and join styles. Basically, if I try and use the bevel style it outputs as if I was using the round style.

I notice that the ST_Buffer docs state that GEOS 3.2 or above is needed for bevel to work. I'm using GEOS 3.3.7, but I've also tried downgrading to various GEOS versions (3.3.5, 3.3.0, etc) to no avail.

The only way I've managed to get bevel to work is by using Postgres.app as my PostGIS database instead of my manual homebrew installation. I can't work out why my homebrew version doesn't do it even when they're both using the same GEOS (3.3.5).

Is there something that I'm missing? Perhaps I need to update / do something with my existing PostGIS database after downgrading / changing GEOS?

Update

Basically, what I'm trying to achieve is an expanded polygon (say by 3 metres) with sharp corners. ST_Buffer seems to be the logical choice here. However, I'm happy to explore other options that would a) let me remove the rounded corners after using ST_Buffer, or b) let me use something other than ST_Buffer to achieve the same effect.


texts: NDWI Calculation with Surface Reflectance Products

texts:
I have downloaded L8 OLI/TIRS C1 Higher Level Data from USGS Earth Explorer to map Chlorophyll content in lake. The file contains original images and surface reflectance images. When I calculate NDWI using the original images, the lakes and surrounding area can be distinguised clearly. However, when I use the surface reflectance images, they produce a map of single colour. I have used the same NDWI formula for both the images.
I have used the following code to calculate NDWI:

LS_ndwi <- (tmp3-tmp5)/(tmp3+tmp5)
plot(LS_ndwi)

Here tmp3 is the Green band and tmp5 is the NIR band.
I wanted to know, should I use the original images or the surface reflectance images for my analysis? I have to retrieve the reflectance data from the images for my analysis, so wanted to use the surface reflectance imageries.
I checked my data type and it is in "FLT8S". So the problem of integer is not valid here I think.


texts: Rotating all features by a single other feature's azimuth

texts:
I have a set of CAD drawings all published neatly squared to a page, but not located or rotated to true north. One of the drawings contains some referencing that I can extract and use to then apply to the rest of the feature sets.

Short of using pen and paper to write the results of an AzimuthCalculator value and then input that into a Rotator, how can I plug that output into the input?


texts: Supervised classification with only one class with Google Earth Engine

texts:
I am a beginner with geospatial analysis and Google Earth Engine. I am trying to classify only one class of Landsat 5 image (swimming pool). I got several training sites and applied the classifier. As a result my classified image appeared totally red (so the classification did not give me the expected results). Is that because  I should classify several classes and not just one? And how to ask to classify my defined class by my training sites and create another class that gather all the pixels that does not belong to the class previously defined?
Below the code I used:

var bands = ['B1', 'B2', 'B3', 'B4', 'B5', 'B6', 'B7']

var image= ee.Image('LANDSAT/LT05/C01/T1_TOA/LT05_015036_20111025')
          .select(bands)

// Train is the feature collection containing my training sites (points)
var training = image.sampleRegions({
collection: train,
properties: ['class'],
scale: 30
});

var trained = ee.Classifier.cart().train(training, 'class', bands);

// Classify the image with the same bands used for training.
var classified = image.select(bands).classify(trained);


texts: How to build topology without Standard/ArcEditor or Advanced/ArcInfo license?

texts:
I have a huge dataset that I am capturing that was full of errors previously and I want to make sure that the new version is error free - which can be very time consuming with only a Basic/ArcView standard license.

Therefore, I was wondering if anybody knew of any free/low cost (<£200/$350) alternatives that can be used to build topology without having to shell out for Standard/ArcEditor?


texts: Cannot find UTM17W84 World Geodetric Projection

texts: I am working on transferring QGIS data to Revit. I need my data to be in the UTM17W84 World Geodetric Projection; however, I cannot find it anywhere in the predefined projections. I am new to the software and wasn't sure if anyone could give me an alternative projection to use or how to obtain the desired projection.


texts: Inconsistent coordinates of centroid were found using the given value of radius of curvature in the prime vertical and in the meridian

texts:
I am currently writing a function on geodetic datum transformation in Hong Kong by referring to the Explanatory Notes on Geodetic Datums in Hong Kong by the Survey & Mapping Office of the Lands Department.
On p. C7,

upsilon_s = radius of curvature in the prime vertical = a / (1 - e^2 * (sin(phi))^2)^(1/2)
rho_s = radius of curvature in the meridian = a * (1 - e^2) / (1 - e^2 * (sin(phi))^2)^(3/2)
a = semi-major axis of the reference ellipsoid
e^2 = the first eccentricity of the reference ellipsoid

On p. C9, you can find the value of these parameters in the table "Parameters for Projection Formulae", and below the table, there is a note that

upsilon_s, rho_s and psi_s are parameters of a point near the centroid of Hong Kong and given to simplify the transformation.

What I am interested is to find the phi (the latitude) of the centroid, the default value of my function calculating the parameters.
Using the radius of curvature in the prime vertical = 6381480.500, I got phi = 0.38942 (in radian);
While using the radius of curvature in the meridian = 6359840.760, I obtained phi = 0.6638568 (in radian, corrected).
My calculation:
asin(sqrt((1 - (6378388 / 6381480.500)^2) / (2/297 - 1/297^2))) = 0.38942
asin(sqrt((1 - (6378388 * (1 - (2/297 - 1/297^2)) / 6359840.760)^(2/3)) / (2/297 - 1/297^2))) = 0.6638568
The difference is considerable. So, I am wondering if I mis-calculated the centroid or the wrong values are put in the document.


texts: Converting DEM (TIFF) files to terrain files?

texts:
I want to create an app to show 3D using ol-cesium. In ol-cesium example it use cesium terrains, But I want to do it with my DEM files.

How can I convert my DEM (TIFF) files to terrain files?


texts: Points of LinearRing do not form a closed linestring - one point intersection

texts:
I'm trying to index geojson data using elasticsearch.

There is some kind of polygons that causing an error: "Points of LinearRing do not form a closed linestring".

Looks like it happens because these polygons have intersection in one point:

Is there some way to index such polygons or fix it programmatically?


texts: Extract vertical planes from Point cloud

texts:
I am looking for a tool/method for extraction of vertical planes (building facades, fences, ...) from mobile mapping point clouds.
There is software (Cloud compare e.g.) that offers RANSAC plane detection, which works not bad after tweaking parameters, but the planes are rectangles, there is no option for cutting the plane along the convex hull (or alpha shape?) of the facade.
Is there a tool that can handle the sectioning/cutting of the rectangular plane?


texts: Expanding Polygon by distance using PostGIS?

texts:
I am trying to expand a polygon in a particular manner with PostGIS. I need a new geometry that is a bit like a Buffer, except Buffer produces rounded corners (lots of vertices) when using it on a square and I need a new square whose sides are N meters away from the inner/original square (and still have only 4 vertices).

My first approach was to use a Buffer and then Simplify, but that is not producing the desired result.

I checked ST_Expand but this returns a BBOX, so it does not work either when the square is not perfectly N-S/E-W oriented nor will it work on irregular polygons.

I also looked into ST_Scale, but this uses a multiplying factor which I don't know how to find out based on a metric distance.

Another function I've looked into is ST_Affine to see if I can scale and translate in one go, but I got no clue how to find out the values I should use in this function.

I have searched and found out nothing. Has anyone done this with PostGIS? then, how?


texts: Seeking polygon files corresponding to Russian Census?

texts:
My team is using the 2010 Russian Census and we'd like to have polygons that correspond to these population values.  We're flexible to any sort of polygon format (shapefiles, GeoJSON, KML, etc). However we'd like low-level administrative boundaries, probably at the 'district' level.

We're currently using polygons from OSM, but would like to try polygons officially associated with the census (like the TIGER files are associated with the US Census values).  I imagine these files exist somewhere internally within the Russian Census organization, so the staff can associate the right people with each administrative area.

Are these files publicly available?  If not, what is the best alternative, or where should we look?  Our team has a few native Russian speakers, so the material can be in Russian.


texts: Is is possible to have some 0-value pixels as NoData while others not in GeoTiff using GDAL?

texts: I have a GeoTiff file in byte. It has values ranges from 0 to 101, while 0 is NoData value, and 1 - 101 are real data. I want to recode the actual data to 0 - 100, but also have the NoData pixels remain 0. This means that in the result Tiff file, there are some 0-value pixels are real data and the others are NoData. Is it possible to do this process with GDAL?


texts: Are traffic_signals always part of a way?

texts:
I have a question concerning the data. Are nodes that are tagged as traffic_signals expected to be part of a way that is a k="highway" itself?

<node id="12345678" lat="60" lon="10">
    <tag k="highway" v="traffic_signals"/>
</node>


texts: Geoserver (automatic labeling generalization)

texts:
I am a Master student looking to do my thesis in cartographic labelling using GeoServer. The thesis topic will be something like "Cartographic Labelling in Real Time Mapping using Web Services.

I am looking for the best way I could write my algorithm, where I can put my generalization in GeoServer.

I'm not professional in this matter and seek suggestions on how to get started. For example, where can write the algorithms in GeoServer, which programing languages could be used.

The concept is that if you have a real time map and as long as using the zoom the represented data should vary according to a standers that i shall control ... those standards should be algorithm that i will design, but from what i get that there is a pre-generalized option within the sld standard inside the geoserver ... now for me i would like to put my own standards and modify the ( pre-generalized )

Does anyone know where I can enter my algorithms?

In summary, I'm looking for suggestions on the best way to write my algorithm (where? how? which programming language?) and make it usable by GeoServer.


texts: Issues in Intersecting Voronoi Polygons With Other Boundary Shapes (QGIS)

texts:
I'm having problems in intersecting Voronoi polygons with another shape. As the image shows, I want to clip the Voronoi layer at the red costal perimeter of the UK so that the additional surface area of those polygons doesn't affect distance calculations. The Voronoi polygons represent telephone exchange areas.

When I attempt to intersect the two layers in QGIS via the Vector-Geoprocessing menu, it produces a few random shapes, as detailed in the image below:

Any ideas?


texts:
I have a shapefile with 4 attribute fields (MC_ID, MC_info, C_ID, C_info).

I want to change some MC_ID values selecting the features by C_info.

For example: I want to set MC_ID = 2 for C_info = g19, C_info = g22 and C_info = g23.

The problem is that I am not succeeding in filtering the shapefile.
If I set

mylayer.SetAttributeFilter("C_info = 'g19'" or "C_info = 'g22'" or "C_info = 'g23'")

it filters only one feature (the first one).

I also tried to use the command ExecuteSQL

result = dataSource.ExecuteSQL("select * from roi_classMacro WHERE C_info = 'g19'" or "C_info = 'g22'" or "C_info = 'g23')

and also

result = dataSource.ExecuteSQL("select * from roi_classMacro WHERE (C_info = 'g19') or (C_info = 'g22')")

but it returns me NoneType (in the second case QGIS crashes).

Where am I wrong?


texts: How to simplify shapefiles without losing attributes?

texts: I want to simplify a huge shapefiles using mapshaper. However whenever I simplify the shapefile I loose a lot of data attributes. how can we simplify the shape files while retaining at least some of the data attributes?


texts: Automatically refresh Leaflet Markers from MySQL

texts:
I have a leaflet map that loads marker details from a MySQL database. I have a timer that clears and reloads the layers (and therefore markers); however; it doesn't seem to be refreshing the data. Code below:

var map = L.map('map').setView([52.474751, 1.753640], 08);
L.tileLayer( 'https://api.mapbox.com/styles/v1/mapbox/streets-v10/tiles/{z}/{x}/{y}?access_token=pk.eyJ1IjoiZmVybmNvbSIsImEiOiJjam96dHY0Y2Myb3liM3FwYWgyM2xhdXN6In0.aiq5NoW5QMJSc0JUrlz_tA', {
  maxZoom: 20,
  attribution: 'Map data &copy;  OpenStreetMap  contributors, ' +
    ' CC-BY-SA , ' +
    'Imagery © Mapbox',
  id: 'examples.map-i875mjb7'
}).addTo(map);

var fernicons = L.Icon.extend({
  options: {
    iconSize:     [20, 20],
    iconAnchor:   [10, 10],
    popupAnchor:  [0, 0]
  }
});

var aisicon = new fernicons({iconUrl: 'js/images/ais.png'}),
  radioicon = new fernicons({iconUrl: 'js/images/radio.png'});

var markerGroup = L.layerGroup().addTo(map), markerGroup2 = L.layerGroup().addTo(map);
$( document ).ready(function() {
  addData();
  addRadio();
  timer();
});

function timer() {
  setInterval(function(){
    map.removeLayer(markerGroup);
    addData();
    map.removeLayer(markerGroup2);
    addRadio();
  }, 5000)};

function addData() {
  <?php  $alias = $conn->getList();  ?>
  var List = JSON.parse( '<?php echo json_encode($alias) ?>' );
  markerGroup = L.layerGroup().addTo(map);

  for(var i=0; i<List.length; i++) {
    marker = L.marker( [List[i]['lat'], List[i]['lng']], {icon: aisicon}).addTo(markerGroup);
    marker.bindPopup( "" + List[i]['alias']+"
MMSI:" + List[i]['ident'] + "
";
  }
}

function addRadio() {
  <?php  $alias = $conn->getOnline();  ?>
  var List = JSON.parse( '<?php echo json_encode($alias) ?>' );
  markerGroup2 = L.layerGroup().addTo(map);
  for(var i=0; i<List.length; i++) {
    marker = L.marker( [List[i]['lat'], List[i]['lng']]).addTo(markerGroup2);
    marker.bindPopup( "" + List[i]['alias']+"
Radio ID:" + List[i]['ident']+ "
Edit Radio");
  }
}


texts: Topography: How to get the x,y,z coordinates of highest or lowest point/pixel of a raster GIS?

texts:
Given a .tiff topographic raster image with mountains and deep sea, I am looking for the x,y,z specifics of the highest or lowest point.

The x,y,z values being:

altitude (z-coordinate)
latitude (y-coordinate)
longitude (x-coordinate)

While gdalinfo raster.tif would give a summary of the bounding box and the highest / lowest elevation values (see my previous question here, and note comments below), I would like to find the elevation, latitude, longitude of the highest and/or lowest pixels of my raster.

Would be better if these values are got as isolated output integer. I think raster processing iterating on all pixels of the raster and keeping values of the z-highest point may be a good way to go.


texts:
We have an ArcGIS server hosted on Amazon. The maps and layers on that server are used to build a website (i.e. xxxx.com/map. The problem is, that page always shows an error "load unsafe scritps". If anyone allows to load those scripts then the webpage works fine with all the contents. I have inspected the page source in google chrome and it shows error/warnings such as

Mixed Content: The page at 'https://xxxx.com/map/' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://ec2-xx-xxx-xx-xxx.compute-1.amazonaws.com:6080/arcgis/rest/services/FinalMaps/MapServer/export?bbox=-8588464.498122405%2C5106604.985676053%2C-7998370.639760844%2C4564819.329190728&size=965%2C886&dpi=96&format=png24&transparent=true&bboxSR=3857&imageSR=3857&layers=show%3A46&f=json'. This request has been blocked; the content must be served over HTTPS.

Is there anyway so that the hosted layer on ArcGIS server can be accessed through a https link instead of http


texts: Generating list of feature classes from .gdb file using ArcPy Idle script: Error thrown

texts:
I'm new to ArcPy and Python and have a very simple question. I'm trying to write a Python script in idle to extract the number of feature class files from a geodatabase. I can do it just fine in the console, but when I try to write a script, I get the following error:

Traceback (most recent call last):
  File "C:\Users\ihb\Documents\assignmente_7.py", line 22, in <module>
    for feature in fcList:
TypeError: 'NoneType' object is not iterable

Here is the code that is generating the error:

#Import arcpy and set output environments
import arcpy, sys
from arcpy import env
print "Please enter desired workspace in the 'Args' space: "
if sys.modules['idlelib']: sys.argv.extend(raw_input("Args: ").split())
workSpace = sys.argv[1]
env.workspace = workSpace
env.overwriteOutput = True

#Get Feature Classes
fcList = arcpy.ListFeatureClasses()
for feature in fcList: ### <-- **ERROR OCCURS HERE** <--####
    desc = arcpy.Describe(feature)
    print feature

I need to include the sys argument so that users can specify the workspace directory.


texts: Make feature class Z and M aware with geoprocessing

texts:
ArcGIS 10.4. I am looking for a geoprocess to take an existing feature class and make it Z and M aware. The feature class is in a file geodb. I have been looking in the ESRI website but have not found anything that applies.

Edit: The solution was to copy the feature class with M and Z flags enabled, delete the original feature class, and rename the new feature class. Code looks like this:

        Using releaser As New ESRI.ArcGIS.ADF.ComReleaser
            'initialize the geoprocessor
            Dim GP As ESRI.ArcGIS.Geoprocessing.GeoProcessor = New ESRI.ArcGIS.Geoprocessing.GeoProcessor
            GP.AddOutputsToMap = False  'True if we want to add outputs to map, False if we dont. however we manually do this at the very end since the GP doesnt give us a layer reference.
            GP.OverwriteOutput = True   'True if output exists then will delete the old output before creating new output

            'set environment settings to enable M and Z awareness
            GP.SetEnvironmentValue("outputMFlag", "Enabled")
            GP.SetEnvironmentValue("outputZFlag", "Enabled")

            'create an IVariantArray to hold the parameter values
            Dim parameters As IVariantArray = New VarArray

            'populate the variant array with parameter values
            parameters.Add(outGdbFeats)     'feature class or feature layer that will be converted
            parameters.Add(outDst)          'location in which the output feature class will be created
            parameters.Add(outGdbFeatsMz)   'name of the output feature class
            parameters.Add("")              '(optional) SQL expression used to select a subset of features
            parameters.Add("")              '(optional) fields and field contents chosen from the input feature class
            parameters.Add("")              '(optional) configuration keywords

            'execute the model tool by name
            Dim res As ESRI.ArcGIS.Geoprocessing.IGeoProcessorResult = GP.Execute("FeatureClassToFeatureClass_conversion", parameters, Nothing)
        End Using


texts: Calling QGIS functions via Function Editor?

texts:
I am trying to write function in QGIS via function editor and the problem is to call QGIS built-in functions e.g. azimuth, centroid... etc. When I run my script, I get

'global name 'azimuth' is not defined'.

The same problem I got while I'm not specified module 'math' to function degree. My function code is on the picture:

I imported different libraries, nevertheless function doesn't work.
Does anyone have any ideas how to call these functions?


texts: Need help installing QGIS 2.0 Need GDAL then SQLite3 3.7.16

texts: OSX 10.7.5  I need help installing QGIS 2.0   It says I then need GDAL.  When I try to install GDAL it says SQLite3 3.7.16 or newer framework is required.  I can't find SQLite3 3.7.16.


texts: R SP library: identicalCRS and parameters in different order

texts:
The following returns FALSE:

library(sp)
points <- matrix(rnorm(30, 50, 10), ncol=2)
proj1 <- CRS("+proj=utm +zone=10 +datum=WGS84 +ellps=WGS84 +units=m +no_defs +towgs84=0,0,0")
proj2 <- CRS("+proj=utm +zone=10 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0")
sp1 <- SpatialPoints(points, proj1)
sp2 <- SpatialPoints(points, proj2)
identicalCRS(sp1, sp2)

However, the proj4strings have the same options, just in a different order. Are the projections truly not equivalent? That is, I'm thinking of replacing identicalCRS with something like

length(setdiff(unlist(strsplit(sp1@proj4string@projargs, ' ')),
               unlist(strsplit(sp2@proj4string@projargs, ' ')))) == 0


texts: ArcGIS web app builder near me find my location

texts:
Anybody know where to find this in the near me widget config?

I built my last version with it but now can't find the option to add it anywhere.


texts: How to add WMS legend in leaflet from Geoserver?

texts:
Can anyone explain me how I can include a legend within the layer control for any individual WMS layers in leaflet?

The wms service works fine. I just want  assign the symbol label to each layer of the group.

This is an example of my app:

My code is similar to the leaflet groupedlayercontrol plugin: https://github.com/ismyrnow/Leaflet.groupedlayercontrol


texts: GeoServer OpenLayers.Protocol.WFS available options?

texts:
Possible Duplicate:
  Understanding OpenLayers documentation

I'm trying to use OpenLayers as part of OpenGeo to display WFS data.

My data isn't displaying and I am having trouble finding out what options are available to the OpenLayers.Protocol.WFS class. The help just says

  Parameters:

  options   {Object} Optional
  object whose properties will be set on
  the instance.

...and doesn't give any information as to what options are available. Google just came up with the same quote.

This is really hard to debug as I'm not getting any errors - even if I type in stuff that I know is wrong - the data is just not showing.


texts:
I am working in TileMill and I have a number of layers in two different levels of detail. I have assigned classes to the layers "highdetail" and "lowdetail", and I know how to use the zoom selector - now how can I hide all the low detail layers when zoomed in past e.g. zoom level 6?
The layers are a mix of polygon/raster/line.


texts: Archaeological spatiotemporal map using QGIS TimeManager?

texts:
I have been trying to use TimeManager to make a spatiotemporal map of artefacts found on a archaeological site.

My goal is to show if there is areas on the site wich concentrates artefacts having the same chronology and then to show how it is changing in time.

I have a vector layer based on a .csv containing attributes like this for example.

Bronze sword / X coordinate / Y coordinate / 99-01-01 (start) / 140/01/01 (end)

everytime I press play i got something like that :

Traceback (most recent call last):
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timemanagercontrol.py", line 314, in playAnimation
    stepFunction()
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timemanagercontrol.py", line 353, in stepForward
    self.timeLayerManager.stepForward()
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timelayermanager.py", line 222, in stepForward
    self.setCurrentTimePosition(self.getCurrentTimePosition() + self.timeFrame())
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timelayermanager.py", line 217, in setCurrentTimePosition
    self.refreshTimeRestrictions()
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timelayermanager.py", line 136, in refreshTimeRestrictions
    timeLayer.setTimeRestriction(self.getCurrentTimePosition(),self.timeFrame())
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/timevectorlayer.py", line 193, in setTimeRestriction
    self.getDateType(), date_format=self.getTimeFormat(), query_idiom=idiom)
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/query_builder.py", line 109, in build_query
    sub1=create_ymd_substring(ioy,iom,iod,from_attr,quote_type='"') # quote type for column
  File "/Users/Antoine/.qgis2/python/plugins/timemanager/query_builder.py", line 71, in create_ymd_substring
    ystr = "SUBSTR({}{}{},{},{})".format(q,col,q, ioy+1,ioy+5) if ioy>=0 else None # adding 1
UnicodeEncodeError: 'ascii' codec can't encode character u'\u017d' in position 6: ordinal not in range(128)

I'm new to QGIS so I don't really now what it means.

It would be really interesting if we could manage to make TimeManager work for archaeological use!


texts: How to select a Subset of PolySet data in R?

texts:
I am using the PBSmapping package in R to model data from diva-gis. I can read in the shapefiles and plot them with no issue.

library(PBSmapping)
df = importShapefile("/path/df.shp")
plotPolys(df)

But the problem is I can't figure out how to subset the PolySet data. For example, for Bhutan's administrative areas file, runnning str(df) shows:

Classes ‘PolySet’ and 'data.frame': 59294 obs. of  5 variables:
 $ PID: int  1 1 1 1 1 1 1 1 1 1 ...
 $ SID: int  1 1 1 1 1 1 1 1 1 1 ...
 $ POS: int  1 2 3 4 5 6 7 8 9 10 ...
 $ X  : num  91 91 91 91 91 ...
 $ Y  : num  27.2 27.2 27.2 27.2 27.2 ...
 - attr(*, "PolyData")=Classes ‘PolyData’ and 'data.frame': 201 obs. of  19 variables:
  ..$ PID       : int  1 2 3 4 5 6 7 8 9 10 ...
  ..$ ID_0      : int  35 35 35 35 35 35 35 35 35 35 ...
  ..$ ISO       : Factor w/ 1 level "BTN": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ NAME_0    : Factor w/ 1 level "Bhutan": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ ID_1      : int  486 486 486 486 486 486 486 486 472 472 ...
  ..$ NAME_1    : Factor w/ 20 levels "Bumthang","Chhukha",..: 15 15 15 15 15 15 15 15 1 1 ...
  ..$ ID_2      : int  9280 9281 9282 9283 9284 9285 9286 9287 9141 9142 ...
  ..$ NAME_2    : Factor w/ 201 levels "Aemeri","Athang",..: 8 19 73 126 129 138 163 186 4 29 ...
  ..$ VARNAME_2 : Factor w/ 0 levels: NA NA NA NA NA NA NA NA NA NA ...
  ..$ NL_NAME_2 : Factor w/ 0 levels: NA NA NA NA NA NA NA NA NA NA ...
  ..$ HASC_2    : Factor w/ 0 levels: NA NA NA NA NA NA NA NA NA NA ...
  ..$ CC_2      : Factor w/ 0 levels: NA NA NA NA NA NA NA NA NA NA ...
  ..$ TYPE_2    : Factor w/ 1 level "Unknown": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ ENGTYPE_2 : Factor w/ 1 level "Unknown": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ VALIDFR_2 : Factor w/ 1 level "Unknown": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ VALIDTO_2 : Factor w/ 1 level "Unknown": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ REMARKS_2 : Factor w/ 1 level "Second level is probably 3rd level": 1 1 1 1 1 1 1 1 1 1 ...
  ..$ Shape_Leng: num  0.82 0.706 0.433 1.053 0.751 ...
  ..$ Shape_Area: num  0.01852 0.01736 0.00877 0.04298 0.01871 ...
 - attr(*, "parent.child")= num  1 1 1 1 1 1 1 1 1 1 ...
 - attr(*, "shpType")= int 5
 - attr(*, "prj")= chr "GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"D"| __truncated__
 - attr(*, "projection")= chr "LL"

How can I subset out PolySet data where "Name_1" is "Bumthang"? Incidentally, in maptools, this can be done by:

library(maptools)
df = readShapeSpatial("/path/df.shp")
df.data = as.data.frame(df) #For understanding the data structure
df.Bumthang = admin.mpt[as.character(admin.mpt$NAME_1)=='Bumthang',]


texts: Geoserver & PostGIS: Cannot create PoolableConnectionFactory

texts:
I am trying to add a PostGIS database a data store in my Geoserver installation but I keep getting this error:

Error creating data store, check the parameters. Error message: Unable to obtain connection: Cannot create PoolableConnectionFactory (Something unusual has occurred to cause the driver to fail. Please report this exception.)

I am thinking that maybe I need to add an entry to my pg_hba.conf file, but it seems that adding anything to it causes the postgres server to not be able to start back up again.

Has anyone had this issue before? Was it solvable by addeding an entry to pg_hba.conf?

Since my geoserver resides on http://localhost:8080/ I tried adding:

host    all    all    127.0.0.1/8080

to pg_hba.conf but trying to restart the server just results in postgres crashing until I remove it again.

This is what the contents of my pg_hba.conf look like:

# Database administrative login by Unix domain socket
local   all             postgres                                peer

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     postgres                                peer
#host    replication     postgres        127.0.0.1/32            md5
#host    replication     postgres        ::1/128                 md5

Here are the geoserver log outputs after I try to make the data store:

catalina.out: https://pastebin.com/aBuJchYP

catalina.2018.06-16.log: https://pastebin.com/MuXhkcA9

localhost_access_log.2018-06-16.txt: https://pastebin.com/qh61BmAs

Other info:

geoserver version: 2.13
Postgres version: 9.6.9
PosGIS version: 2.4


texts:
I compute a slope raster in percentage and then a slope raster in degree from the same DEM with a precision of 5 meters.

Why my percent slope raster has a maximum value of 110% (+ 45 °) while my slope raster in degree has a max slope of 90 °?

More generally could someone explain to me how the calculations are carried out by this command GDAL (gdaldem slope)?

here are my orders in percent

  "C: / Program Files / QGIS 3.4 / bin / gdaldem.exe" slope -co "COMPRESS = DEFLATE" -co "PREDICTOR = 2" -co "ZLEVEL = 9" "F: /3d/MNT_2017_VRT.vrt" "F : /3d/MNT_2017_RASTER_PENTE_pourcent.tif "-p in degree "C: / Program Files / QGIS 3.4 / bin / gdaldem.exe" slope -co "COMPRESS = DEFLATE" -co "PREDICTOR = 2" -co "ZLEVEL = 9" "F: /3d/MNT_2017_VRT.vrt" "F : /3d/MNT_2017_RASTER_PENTE_degre.tif "


texts: How can I dynamically restrict pan extents on an image layer in OpenLayers 3?

texts:
I have been sandboxing with OpenLayers 3 and thus far have been happy with the results.  I have used answers on this site to restrict my most zoomed out level from panning and to restrict the range of allowed zooming.

I have encountered the problem though that once a user zooms in I want the extent to be restricted to the original boundaries of the image and not to the new limits of the viewport, that is, you should still be able to pan to the edge of the original map, even zoomed in.

How can I adjust the extent correctly on zoom so that my users can pan on the zoomed map, but not on the unzoomed version?

var extent = [0, 0, 700, 800];
var projection = new ol.proj.Projection({
  code: 'EPSG:4326',
  units: 'pixels',
  extent: extent
});
var map = new ol.Map({
    target: 'map',
    layers: [
new ol.layer.Image({
  source: new ol.source.ImageStatic({
    url: 'http://realmsofdespair.info/world-map.jpg',
    projection: projection,
    imageSize: [700, 800],
    imageExtent: extent
  })
})
    ],
      view: new ol.View({
minZoom: 2,
maxZoom: 5,
projection: projection,
center: ol.extent.getCenter(extent),
extent: [350, 400, 350, 400],
zoom: 2

})
      });

The above is my test code, forgive the crudeness of the model, I'm new to GIS in general and to OpenLayers in specific.

I realize that this example has the panning completely locked down, I suppose I've been looking for a per zoom level extent transformation or a javascript event, perhaps zoomend,  that can be called on zoom so that the extent can be rewritten.

I suppose I could be confusing my actual resolution with the mapunits, so that if I'm zoomed in 8x 1 pixel in the original picture is now 8 in the zoomed.  Eventually I plan to replace the jpg with a vector graphic, but this is a test of concept.


texts: Annotation Scaling to ensure fixed text size

texts: Is there a way to fix the scale of annotations such that when I zoom in or out of the map canvas the annotations can still be visible at the same size?


texts: How to add multiple shapefiles with VB.Net

texts:
I have created a toolbar add in for arc with a button that opens a form with 3 selections that are shapefiles, once the shapefile is selected I click the Add Layer button. Currently I can only get one shapefile at a time, unless I duplicate the code for each shp and once I do add the one shapefile it keeps on adding it. Here's the code I have so far:

Public Function AddLayers()
        Dim pMxDoc As IMxDocument
        Dim pMap As IMap
        Dim pWorkspaceFactory As IWorkspaceFactory
        Dim pFeatureWorkspace As IFeatureWorkspace
        Dim pFeatureLayer As IFeatureLayer
        Dim pFeatureClass As IFeatureClass
        ' Specify the workspace and the feature class.
        pWorkspaceFactory = New ShapefileWorkspaceFactory
        pFeatureWorkspace = pWorkspaceFactory.OpenFromFile("E:\Customization\Data\Cities", 0)
        pFeatureClass = pFeatureWorkspace.OpenFeatureClass("Cities")
        ' Prepare a feature layer.
        pFeatureLayer = New FeatureLayer
        pFeatureLayer.FeatureClass = pFeatureClass
        pFeatureLayer.Name = pFeatureLayer.FeatureClass.AliasName
        ' Add the feature layer to the active map.
        pMxDoc = My.ArcMap.Application.Document
        pMap = pMxDoc.FocusMap
        pMap.AddLayer(pFeatureLayer)
        ' Refresh the active view.
        pMxDoc.ActiveView.Refresh()
        Return AddLayers()
End Function


texts: Why is my north arrow pixelated when being imported as emf?

texts:
I've tried to import my own North Arrow with the Style Manager (ArcGIS 10.1) both as .emf and .bmp but the North Arrow is pixelated although the resolution of the picture should not cause this problem (i've saved the Arrow in a DinA3 file) and although the vetor format of the picture.
Has anyone an idea how to solve this problem?


texts: Change Dashboard's map with ArcGIS Python API

texts:
Is it possible to change the map used in a Dashboard with the ArcGIS Python API?
I know it can be done manually by changing the map's id in the ArcGIS Online Assistant, but I would like to do this automatically.

Updating other item's (like web map or feature layer) properties can be done with the .update() method, I'd like to do something similar with Dashboards.
I can't find the Dashboard item properties in the doc.


texts: Identifying coordinate systems of racing circuits?

texts:
I have some "latitude" and "longitude" data that describes the Silverstone motor racing circuit in the UK. The coordinates look something like this:

latitude     longitude
+03124.27986 +00061.07652
+03124.27902 +00061.06950
+03124.27866 +00061.06632
+03124.27734 +00061.05942
+03124.27722 +00061.05852
+03124.27710 +00061.05780

These are clearly not "real" degrees & minutes latitudes and longitudes, since the latitudes aren't even valid, and the longitudes are clearly wrong for a place in the UK.

How do I identify the coordinate system used here?

The data is from Circuit Tools, which is a free program http://www.vboxmotorsport.co.uk/index.php/en/products/performance-meters/2-products/39-circuit-tools-driver-analysis-software . Once installed, the data is in C:\ProgramData\Racelogic\CIR Files\

The files are also available independently of the program here: http://www.vboxmotorsport.co.uk/index.php/en/products/performance-meters/performancebox/12-products/video-loggers/35-circuit-tools-track-database#u

Another set of coordinates in the same format, for a Singapore racetrack looks like

latitude     longitude
+00077.47468 -06231.29347
+00077.47699 -06231.29440
+00077.47890 -06231.29519
+00077.47957 -06231.29553
+00077.47959 -06231.29644


texts: Changing/editing street name in local OpenStreetMap server?

texts:
I followed instructions for install my own osm server on ubuntu  with osm2postgresql with carto style. It works well with Mapnik.

My area street names are wrong or missing on osm map. I found my local map from government. I want to update street names.

There are some tables, osm_planet roads, _lines, _way, _rels etc.

I am not sure Which table is exactly used in Mapnik and which coloumn should i edit for correct road name on map?


texts:
I'm looking for an ArcGIS Online alternative. It needs to be

linked to a private MySql server
Use shapefiles
Display attribute data and charts upon click/hover
Toggle shapefile to display/disappear
Privacy options
User can drag one layer on top or below other layers.

I like ArcGIS but it's very expensive. I like TileMill but haven't seen options where you can drag layers above or below.


texts:
I am new to MapBasic.

I googled for tutorials and found various PDFs but could not get started with the resources.

I would be glad if anyone could provide some path for learning MapBasic.


texts: Plot areas by class in a polygon with Google Earth Engine

texts:
I would like to plot the number of pixels or the area for each class contained in a polygon (shape of a country). I have found the ui.Chart.image.byClass function but I don't understand how to use it with only one raster

for example :

// load
var landCover = ee.ImageCollection('MODIS/006/MCD12Q1');
var country = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017');
// filter
var sn = country.filter(ee.Filter.eq('country_na', 'Senegal'));
// filter on image for 2017 and clip with country shape
var modis2017 = ee.Image(landCover.filterDate('2016-01-01', '2016-12-01')
                .select('LC_Prop1')
                .first()).clip(sn);

// display
Map.addLayer(sn, {}, 'country');
//Map.addLayer(country, {}, 'country');
Map.addLayer(modis2017, {}, 'raster');


texts:
I'm running QGIS 3.4 Madeira on Linux Mint 17. The upgrade to 3.4 seemed to go smoothly, but there is no "3D View" option in my "View" menu.

Is there something else I need to do? FWIW QGIS 3 J's works OK.


texts: Can't Open Geodatabase in QGIS on External Harddrive

texts:
I have a geodatabase that opens in QGIS fine on my internal drive, but not on my external.

They both have the same permissions. The internal drive is formatted as APFS, and the external is ExFAT.

I'm using the NYC LION dataset for reference.


texts: How to zoom to specific Openlayers point feature on map?

texts:
I'm creating website for divers in my country and beside all standard contents and informations it also offers a map which shows some diving clubs, locations and similair.
I also have table with textual informations about those clubs that is placed in other part of that website.
You can see it here.

Although the map I create is separate part of this site and although data from table doesn't have to be linked to that map I would still like to do that if it's possible.

So, what I want to achieve is that when user clicks on icon 'Map' within the table that he gets displayed map but centered and zoomed to that club instead to default center and zoom level which I've already set. It should probably be done by getting long and lat of each point in layer 'diving_clubs' and then setting it as center but I'm not quite sure how to do it in most correct way so I'd appreciate your help.

Until know, I was creating maps using geoext and everything was placed in same window (same html file) so it was easier. Beside that I could use feature grids (tables) there whcih made things much easier.
This is new to me and I'm obviously missing good ideas so I hope you guys can help me with that.

Thanks.


texts: Get value of Variable in custom python expression function

texts:
I am writing a custom python expression function to return the value of a variable. By variable, I mean the layer, project, or global variables. I looked at this answer https://gis.stackexchange.com/a/189815/94852 and came up with the following code.

from qgis.core import *
from qgis.gui import *
from qgis.utils import *

@qgsfunction(args='auto', group='Custom')
def env(var_name, feature, parent):
    """ Returns the value of the variable 'var_name'
    Example usage: env('user_full_name') """

    active_layer = iface.activeLayer()

    if QgsExpressionContextScope.hasVariable(QgsExpressionContextUtils.layerScope(active_layer), var_name):
        return QgsExpressionContextScope.variable(QgsExpressionContextUtils.layerScope(active_layer), var_name)

    elif QgsExpressionContextScope.hasVariable(QgsExpressionContextUtils.projectScope(), var_name):
        return QgsExpressionContextScope.variable(QgsExpressionContextUtils.projectScope(), var_name)

    elif QgsExpressionContextScope.hasVariable(QgsExpressionContextUtils.globalScope(), var_name):
        return QgsExpressionContextScope.variable(QgsExpressionContextUtils.globalScope(), var_name)

    else:
        return ""

I am wondering if there is a better way to do it with fewer lines of code, and if there exists a simpler function getProjectVariable() similar to setProjectVariable(), since I have not been able to find any.

I know I can access the variables directly in the expression engine as well, but I would like to be able to retrieve the value within the python function and further do something with it.

Slightly modified the code, but it will still be nice to know if there is a single function that can return values of any variable, whether layer, project or global.

from qgis.core import *
from qgis.gui import *
from qgis.utils import *

@qgsfunction(args='auto', group='Custom')
def env1(var_name, feature, parent):
    """ Returns the value of the variable 'var_name'
        Example usage: env('user_full_name') """
    active_layer = iface.activeLayer()
    return QgsExpressionContextScope.variable(QgsExpressionContextUtils.layerScope(active_layer), var_name) \
         or QgsExpressionContextScope.variable(QgsExpressionContextUtils.projectScope(), var_name) \
         or QgsExpressionContextScope.variable(QgsExpressionContextUtils.globalScope(), var_name)


texts: Unsupervised raster classification using GDAL

texts: Is there an equivalent in GDAL to the Arcpy ISO data unsupervised classification tool, or a series of methods using GDAL/python that can accomplish this?


texts: How to enable 3D analyst in ArcGIS through VB.NET?

texts: I tried to create a TIN and suddenly an error comes saying "3D analyst is not enabled". In ArcGIS it can be done through managing extensions. How to do it through vb.net ?


texts: QGIS: data defined position of bar diagram

texts:
I am using QGIS to visualise communal water balances of different years as bar plots (QGIS 3.8). I have a point layer (communal area's centroids) with the balance values as attributes.
I'd like to show deficits in reds and surpluses in blue. Given that QGIS only supports one colour per bar, I decided to do create two plots at the same location. As stated here, bar plots do not support all-negative values. Thus, I inverted the bar orientation of the deficit graph and print only negative values
[*if(value<0,-value,0*].
Now, the bar plots seem to be oriented in the middle quadrant. As I want both graphs to share y=0, I moved the negative plot by setting the x-Coordinate to $x and the y Coordinate to $y-(max(values) -min(values))/(bar length per map unit)/2. This led to the expected bar plot:

However, the bar graph's position is not fixed on the map, but moves around when I change the map extent (as if the placement setting were set to "around point"). In order to label the bars, I need them to remain at ($x,$y) strictly.


texts:
In QGIS, is there any plugin that can download OSM map tiles once save it and not have to download it every time I scroll move on the canvas?

I use OpenLayers for now, but what if I do not have internet connection?


texts: How to implement added cost point barrier in ArcMap Network Analyst?

texts:
I am trying to figure out how the cost point barrier in Network Analyst works. I am doing an OD cost matrix and I want to add border crossing points as cost point barrier. Is it possible to configure the values of cost point barrier with border delays in minutes so that it will add to the total travel distance once the OD cost matrix is solved? I found some references like the ff. but nothing mentioned about how to implement it.

http://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/barriers.htm
http://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/creating-network-analysis-objects-with-the-create-network-locations-tool.htm


texts: Connecting Desktop to SQL Server 2012 SP1 via ArcGIS Server 10.1 very slow?

texts: We have just built and new ArcGIS/ArcSDE system with SQL Server 2012 SP1.  We are experiencing very long periods (up to 2 minutes) just to connect to the database in Desktop.  Desktop does connect and we can publish map services, but everything is painfully slow.  We have ruled out network issues, and wonder if we are missing something.  Has anyone experienced this?


texts: Remove leading zero from a string in QGIS

texts:
How can I in QGIS through expression calculator remove the 0 leadings from a string?
09 ->  9
0150 -> 150
09850 -> 9850
054a23 -> 54a23
5837 -> 5837
Something like the example above.


texts: Data missing while importing .kml file to PostgreSQL using ogr2ogr

texts:
As I am newbie to both dealing with KML and PostgreSQL.
I am able to load KML file to PostgreSQL. But feature data table is empty. My file structure is same as mentioned in link.
while importing .kml file, it has asked to create schema and table. So after creating both, KML table has some data. but placemark data table is empty.

I took help from this link
How to import KML file, with custom data, to Postgres/PostGIS database?.

Is there a way to see placemark data as a table view?


texts: Interpreting raster values generated by QGIS Heatmap plugin?

texts:
I have generated a nice heatmap (point density) based on a point layer using the QGIS Heatmap plugin, set up as follows:

I calculated both outputs as shown in the screenshot below:

'Scaled by Kernel size' range from 0 ... 0.0212594
'Raw values' range from 0 ... 60.1269

... as indicated by the legend. Strangely, identifying on the resulting maps at the coordintes given by the yellow circle (300m Radius, Points within search radius count ~883) gives values far exceeding the max values in the legend:

'Scaled by Kernel size' 0.0859
'Raw values' 243.2

Isn't the raw value the point count within the search radius (here ~883) and the scaled value the points per area (here: #points/m², ~0.003...)?

Two questions:

How to interpret the legend values, what units do they have?
why am I sampling values so far exceeding the max values in the legend?


texts: Doing spatial correlation between two layers on ArcGIS?

texts:
I have two datasets and I'm trying to determine the extent of their spatial relationship. I suspect they are closely related but I would like to produce a map output to illustrate this relationship.

A points layer and polygon layer, i want to illustrate the relationship between density of points and what is their control from any attribute of polygons. the variables are not numerical fields. i don't know if is better  to work only from one layer obtaining the relationship between tow attributes (extracting before the polygon's attributes)

I don't know which technique will provide me with what I want. i have been reading about Geostatistical Analyst tool, but i didn't find what i have to use.

Does anyone have any ideas of how I can investigate and represent this relationship in Arcgis?


texts: GeoWebCache seed task dies immediately after being submitted

texts:
The data comes from Geofabrik's Brazil slice: http://download.geofabrik.de/south-america/brazil.html

Imported into a PostGIS DB with osm2pgsql. GeoServer is 2.4.0, running on latest Tomcat 7.0.x, on latest Oracle JVM, on CentOS 64 bits. The GeoServer VM has 1GB RAM and 100 GB disk.

I defined a layer group having planet_osm_line, planet_osm_point, and planet_osm_roads.

I try to seed the cache on this group with the following parameters:

Grid set: EPSG:900913
Format: image/png
Zoom start: 0; Zoom end: 15

When I press Submit, it shows the created tasks, but when I come to the seed page again, there's none. And the CPU isn't being used.

The GCW demo does work and it seems to be feeding the cache. When I use that, I can see the heavy usage on top.

Another thing: after panning through the map in the demo for a bit, the cache directory is populated with PNGs and has 19 MB. But in the Tile Layers screen, "Disk Used" still shows 0.0B. What's happening?


texts: Whitebox Tools ClipLidarToPolygon writes no points to output file?

texts:
Running Whitebox Tools (v 0.11) on Windows from the official binary.

The ClipLidarToPolygon tool creates an output LAS file with no points and the message There are fewer than two points in the LAS file.

The command I am using is:

whitebox_tools -r=ClipLidarToPolygon -v  --wd="D:\Documents\Dir" -i='StElisAk.las' --polygons='Test.shp' -o='output.las'

Where Test.shp is a single-polygon ShapeFile created in ArcGIS (UTM 6N) which overlaps the sample StElisAk.las file. Naturally I have tried my own LAS and ShapeFiles as well.

Is the ClipLidarToPolygon tool broken, or is it very particular about its inputs and I'm missing something?


texts: Splitting rectangles into a desired number of parts in QGIS

texts:
I'm working on a project using QGIS and there is a process that I'd like to try to automate.
I'm working with the "rectangles,ovals digitizing tool" plug-in to make perfect rectangles. The next step in my process is to split these rectangles horizontally and vertically in equal intervals in order to make many smaller equal-area rectangles as shown in the picture below.

I am currently using a help line layer and the plug-in "qchainage" to split the lines equally across each side of the rectangle. Then I use snapping to cut the polygon where the vertices's were created.
This process isn't bad, but it's getting too slow and opens a door for manual mistakes.

I'd like to find or develop a plug-in or a script, where I can input a selected rectangle, an integer m for the number of parts I want to split the short side to and another integer n for the number of parts I want to split the long side to. In the example above - m = 2 , n = 5 .

I've tried to learn from this discussion, but didn't find what I was looking for. I've written a few scripts using pyqgis so if anyone has a suggestion I can try to implement it.


texts:
when I open "Derived" part in the table, gained by using "Identify features" on a polygon, I see two "Area" types.
One is Cartesian and another is in a EPSG projection.
EPSG projection does not match the one of my project. Is there a way I can change this or control it better?


texts: Simple WebMapping application with postgis Database

texts:
am very new to web-mapping, so this question may be a little misguided.

I want to develop a simple web mapping application using OpenLayers  which can display Cadastral information that are currently in PostGIS(2 tables: property and boundaries).

I want this to be as simple (and as low maintainence) as possible:
-Use java for developping
-The user can search a parcel by 4 fields (name, indice complement and nature) existing in table : "titre"
-and then the user can generate the an A4 sheet for print that contains the title/property plan and also a table containing the name, X and Y of boundaries of title/property from the second table : "Boundaries"
-Styling of the vector layers is of minimal importance.

PS: i tried to use the library geotools with applets but i have a problem with versions, because the tuto that i used is old 2004, and i couldn't find the old version 2.1 on the net, i only have 2.7


texts: Assign coordinate values if the variable is undefined

texts:
Whe user inputs an address, the variables latitude and longitude are passed from my geocoding python script. However when no input is given (IE when the page loads initially) I want my map to centre on coordinates (53.483837, -2.225899).
How can I give lat and long these values when there is no input, but change them to lat = latitude and long = longitude when the users completes an input?
    if(typeof latitude === 'undefined' || latitude === null){
          var lat = 53.483837;
        }
        // if the variable has been passed, assign them to lat and long
        // this is never triggered !
        else if(latitude !== 'undefined'){
          var lat = latitude;
        }

    if(typeof longitude === 'undefined' || longitude === null){
      var long = -2.225899;
    }
    else if(longitude !== 'undefined'){
      var long = longitude;
    }

▲


texts: How to show hidden columns in QGIS 3.6.1 (?)

texts:
I have hidden a lot of columns in my attribute table and now I can't show them.

How can I show hidden columns?


texts:
I came across some KAP charts which don't display correct corner coordinates from gdalinfo; despite them having REF fields in the header. For the NOAA file11425_3.KAP gdalinfo displays the coordinates:

Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 7820.0)
Upper Right (23476.0,    0.0)
Lower Right (23476.0, 7820.0)
Center      (11738.0, 3910.0)

Any thoughts about this?


texts: Identify point information OpenLayers works GeoExplorer not

texts:
I am using the OpenGeo Suite. I can preview a layer in the GeoServer OpenLayers view, I can click on points and see the data from a layer produced from a PostGIS view. However when I do this in GeoExplorer I click and nothing happens. But if I click on a standard layer produced from a table (happens to contain the same geom data, just different fields) I can identify the point data.

I should say, I click the point, and in Firefox it brings up the little load icon, but that then disappears.

Update
I have narrowed down the issue to be with views with a where statement that limits records that are only a certain species. Without this where clause the layer allows me to click. Going to try make the view using GeoServer rather than PostgreSQL directly.

Update 2
The above did not work with the GeoServer query. See my SQL below, the issue comes when I place the last where clause. The layer still loads and I can see the points, in GeoExploer + OpenLayers, but I can only click and identify points in the OpenLayers example.

SELECT
 taxom_tbl.scientificname,
 sheet_tbl.eventtime,
 sheet_tbl.eventdate,
 sites_tbl.the_geom,
 sites_tbl.sitename,
 rivers_tbl.rivername,
 rmi_group_tbl.rmigroupname,
 record_tbl.category_of_taxom,
 record_tbl.number_of_taxom
FROM
 public.taxom_tbl,
 public.sites_tbl,
 public.sheet_tbl,
 public.rmi_group_tbl,
 public.rivers_tbl,
 public.record_tbl
WHERE
taxom_tbl.taxom_id = record_tbl.taxom_id AND
sites_tbl.site_id = sheet_tbl.site_id AND
rmi_group_tbl.group_id = sites_tbl.group_id AND
rivers_tbl.river_id = sites_tbl.river_id AND
record_tbl.sheet_id = sheet_tbl.sheet_id AND
taxom_tbl.scientificname = 'Cased caddisfly'

Any suggestions?


texts:
I have a binary classification file shows urban areas.
I need to convert this file to 8 bit unsigned integer GIF format.

ENVI can't save images as GIF so I've used IDL and write a few lines to change the image format to GIF.

pro envi2gif
e = ENVI()
File = FILEPATH('1990_urban.tif',Root_Dir='C:\Users\urban_comparison\7tiffs')
image = READ_IMAGE (File)
filename = FILEPATH('1990_urban.gif',Root_Dir='C:\Users\urban_comparison\\final_')
WRITE_GIF, filename, bytscl(image)
end

How can I avoid this rotation ?


texts: I'm making a costing model.  I need to require the user to input unit costs and then the model will multiply the unit cost by number of units.  How do I add an input box that has no connection to a layer or table?


texts:
I'm trying to install ArcGIS 10.1 Desktop Advanced Student Edition. I'm currently running Windows 8.1 on my Macbook Pro (2014, 16GB ram, 250GB SSD) using Parallels.

When I access the DVD from my USB optical drive, I can open up the ESRI.exe and the Quick Start Guide opens up as expected. I then click the 'Setup' hot button to the right of 'ArcGIS for Desktop', and a User Account Control window appears asking if I'd like to allow the program 'ArcGIS for Desktop 10.1 to make changes to this computer?'

I select 'Yes', at which point the User Account Control window disappears, and exactly nothing happens. The Setup does not begin. As well, the 'Install Guide' hot button to the right of 'Setup' does not link to a valid file.

Any ideas what could be inhibiting the installation?


texts: Fast way of querying existence of a point between two dataframes

texts:
I'd like to check if a point in one dataframe exists in another using Python. I have two shapefiles / GeoPandas dataframes with each over 10000 rows, and the geometry is stored as points (eg. POINT (3.14159265359 2.71828182846)). I now would like to add a column to the first dataframe, and populate it with a certain value if this point happens to be in the other dataframe.

Using .isin() works, yet very slowly compared to gpd.sjoin(foodf, bardf). I assume that .isin() brute-forces its way, whereas the latter uses indices. (Needless to say and understandably, gpd.sjoin omits rows which are not joined.)

I would like to know, how I could speed up the process. All I need is to assign 1 for points which exist in both datasets and 0 for other cases. Is there a function in GeoPandas (or another package) included helping me, or would you recommend me to use an rtree index?

import geopandas as gpd

foodf = gpd.read_file("C:\\monty.shp")
bardf = gpd.read_file("C:\\python.shp")

foodf['centroid_exists'] = foodf.centroid.isin(bardf.centroid).astype(int)
# it works, yet very slowly


texts: Seeking Mobile Data collection software recommendations?

texts:
What COTS software is available to do mobile data collection, with GPS positioning.  Map display not required. I'm looking across the board (platform wise).

I'm already aware of...

RhinoSpect
ArcPad
ArcGIS Mobile
Field Assets
Retriever
Geopaparazzi
EpiCollect
Trimble Field Inspector
iGIS

Any others you're aware of?


texts: Saving part of OSM shapefile in QGIS as GeoJSON strips 'name' field to 25 characters long

texts:
I want to copy part of OSM data in ESRI Shapefile (downloaded from http://download.geofabrik.de/europe/ukraine.html ) and save in in GeoJSON to style later in Tilemill.

After saving, I see that string values in 'name' column get truncated to be 25 letters long.
Any ideas how to overcome mentioned problem?

Thanks in advance!

P.S. I've seen answers related to letters truncation (like here: How to overcome field truncation when converting OSM to shapefile with QGIS?), but I am not sure if I can use that advice.


texts:
I've been working with loads of shapefiles projected according to OSGB 1936 (CRS 27700). The project CRS is set to EPSG:27700 and "On the fly reprojection" to EPSG:27700 is set (I keep this as a default as I work with OSGB 1936 95% of my time).

I decided to download OSM layers from the OpenLayers plugin. When I load this, the EPSG in the bottom right of the screen goes from EPSG:27700 to EPSG:3857

Question 1: should this be happening anyway as it would suggest that the whole project has been re-projected to EPSG:3857?

As soon as the OSM layer is loaded it's way out of alignment but a quick pan seems to bring it altogether quiet nicely.

What I have noted is that (Question 2), if I try to re-specify the CRS to 27700, then the shapefiles "move" by a few tens of meters with respect to the OSM. Does this suggest that QGIS is doing a second re-projection (from what to what?)?

Also (Question 3), does it mean that if I import another shapefile that would be originally a dataset digitised with EPSG:27700 it would be re-projected to EPSG:3857 because the CRS in the bottom right of the screen was set to EPSG:3857 after the OSM import. This is all a bit confusing and logic would suggest that the import of a non-ESPG:27700 (project default CRS) should not go and change the EPSG setting in the bottom right of the screen. Anita Graser's book says on page 34 "Your project CRS will automatically be changed to Pseudo Mercator when you load a background map using the OpenLayers plugin option".

Does that mean there is no way of keeping ESPG:27700 active in the project when importing basemaps from OpenLayers? If so, what alternatives are there?

What I am trying to bottom out is to understand the correct way of importing basemaps (usually Google, Bing or OSM through the OpenLayers plugin) into my projects (always EPSG:27700) without losing alignment and getting layers to correctly re-project. I'm trying to support greater use of QGIS in my company but don't want to lose credibility by promoting the use of a tool that is misaligning datasets. Don't get me wrong. QGIS is a great tool and I am very fond of it but importing layers with different CRS's is quite common these days and getting this right from the start is half the job done.

I did quite an extensive Google search before posting and didn't come up with a recent, clear cut answer to my questions above. There is a bit of content out there on problems with older versions of QGIS, PROJ4, etc. but nothing recent for QGIS 2.0 so worth an update.


texts:
I have been trying to calculate Enhanced Vegetation Index (EVI) using Sentinel-2 Level 1C imagery. I have atmospherically corrected the imagery (so the imagery is in BOA) but I can't seem to derive EVI in ArcGIS.

I have been calculating EVI using Raster Calculator using the following formula (2-band EVI):

  (2.5 * ("Band 8" - "Band 4")) / ("Band 8" + (2.4 * "Band 4") + 1)

The range of the values are between 2.4 and -1.8 and the theoretical range is between 1 and -1.

Is there anyway that I can correct this?


texts: Identifying side of point from closest polyline in ArcMap?

texts:
I have a set of polylines (a network of streams and rivers) with information on the left and right side of the streams on riparian structure. I also have locations (points) of either side of the lines. Now I need to know on which side each point is to its nearest polyline (left or right) in order to join the data from that polyline to the point.

I have seen that there is something like iHittest which could solve my problem, but I could not figure out how this is working. Ideally, I need some "cook book recipe" what to put into the Field calculator as VB script and all its details therein. I use ArcMap 10.0.

Does anyone know how to do this?


texts: Using Clipper tool on QGIS and file size not changing

texts:
When I use the Clipper tool on QGIS on a tiff file to reduce the tiff's area to the Area of Interest the file size is the same for both TIFF files (the smaller tiff and the original).  Is there a way to reduce the file size and clip the area of an original tiff to a smaller area.  Or is there also a way to reduce the size now that I clipped it besides reducing the resolution.

As shown, I have a large area in the first image shown, then after clipping into 4 different sections (where the redlines are) the Tiff files looks like in the second picture.


texts: Create a 3D map with extruded polygons for use in ArcGIS Javascript API

texts: I am working on a project which contains several choropleth maps (State and County level mostly).  In very simple terms, I would like to create 3D extrusions of the polygons based on an attribute.  So far I have worked in ArcGIS Pro and tried to publish these as a web scene but it seems that the extrusion part is not yet possible when publishing to ArcGIS Online.  I am open to working with KMLs or other formats.  In the end, I would like to be able to integrate whatever service or layer I create into the ArcGIS Javascript API but I am open to other platforms as well.


texts: Move and/or Remove Markers in ArcGIS Graphics Layer

texts:
I'm using the ArcGIS 100.6 iOS SDK and am populating the map with markers on a Graphics Overlay Layer
whose locations are stored in a database common to all users of my application. Each marker is stored in a unique record and each record contains the Latitude & Longitude of the marker.
When the App is launched it reads the location of all markers in the database and adds each one to the Graphics Overlay as shown below:

let areaMarker = AGSPictureMarkerSymbol(image: UIImage(named: "CustomMarker")!)
let areaMarkerLocation = AGSPointMakeWGS84(y ?? 0.0, x ?? 0.0)
let markerIcon = AGSGraphic(geometry: areaMarkerLocation, symbol: areaMarker, attributes: >["marker": markerKey])
self.overlay.graphics.add(markerIcon)

As shown above, each marker is assigned an attribute "marker:markerKey" that is the unique database record number (key) where the marker location information is stored and serves as the marker ID.

Once the initial markers are added to the Overlay, the App "Listens" to the database for the following events:

A new marker is added
An existing marker is moved to a new location
An existing marker is deleted

When a marker is moved or deleted the database listener is notified and passed the record number (key) of the marker that was moved (or deleted).  If the marker was moved, the record will then contain the new Latitude & Longitude information.

I have experimented with reading the graphics overlay and determined that it is a Collection contained in a NSMutable Array.  I can read all attributes as follows:

let graphicsCollection = self.overlay.graphics.mutableArrayValue(forKey: "attributes")
print(graphicsCollection)

The result is:

(
        {
        marker = "-KlRW2_rba1zBrDPpxSl";
    },
{
        marker = "-Lu915xF3zQp4dIYnsP_";
    }
)

I can do the same for "geometry" and get the array of AGSPoints:

let graphicsCollection = self.overlay.graphics.mutableArrayValue(forKey: "geometry")
print(graphicsCollection)

The result is:

(
    "AGSPoint: (-117.826127, 44.781139), sr: 4326",
    "AGSPoint: (-112.056906, 33.629829), sr: 4326"
)

I have been unable to determine how to get the "index" of the attribute array (e.g. marker "-KlRW2_rba1zBrDPpxSl" above should have an index of [0]) so I can then use that "index" to access the appropriate AGSPoint and update the Latitude & Longitude or remove the marker.


texts:
I am currently working with compressor stations on centerline routes. These compressor stations have a 3 mile buffer surrounding them. I wish to cut a portion of the circular buffer off. These cut buffers represent unidirectional flow on the route. I plan to clip the lines within each of the buffers so I can ultimately highlight these clipped lines.

Below is a picture of what I have done manually through the polygon editor. I wanted to see if there was an arcpy script available to help me automate this process.


texts: Coordinates offset when using Mapshaper to convert shapefile to GeoJSON

texts:
I'm a newbie to the GIS world and I'm trying to convert a shapefile to GeoJSON for use in Mapbox.

When I view the resulting layer in Mapbox, most of the features appear southeast by 20-30 feet of where they should be to match up properly with the underlying Mapbox map. (View at http://blueroomdesign.net/stlv/)

How do I adjust the Mapshaper command to fix this offset issue?

Here's the command line I'm currently using to convert it:

mapshaper -i prcl.shp -proj latlon -o prcl_out.geojson precision=0.000001

Some of the information from running the Mapshaper Info command on the shp file (below) looks relevant but I'm not quite sure how to interpret it or correct for it in the conversion process.

Layer name: prcl
Records: 127,748
Geometry
Type: polygon
Bounds: 551318.459568 982946.566771 592589.572865 1070913.306444
Proj.4: +proj=tmerc +x_0=152400.3048006096 +lon_0=-90.5 +k_0=0.9999333333333333 +lat_0=35.83333333333334 +to_meter=0.3048006096012192 +ellps=clrk66

Here's a link to the original shapefile zip: St Louis Parcel Data


texts: Exporting .jpg files from Data Driven Pages using ArcPy?

texts:
I have generated about 90 maps through data driven pages(ArcGIS 10.0). I now want to export them as .jpg files in either landscape or portrait format.
I tried python but it is not working, it worked to export as.png though.

Any suggestions?


texts: Removing the "Earth Engine Apps Experimental" logo

texts: Is there a way to remove or hide the "Earth Engine Apps Experimental" logo found in published Earth Engine Apps?


texts: Load external geojson file into leaflet map

texts:
Have studied How to load external GeoJSON file into Leaflet map but not getting desired result.

My index.html looks like this:

<!DOCTYPE html>

    <meta charset=utf-8 />
    <title>GeoJSON data</title>
    <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
    <link rel='stylesheet' href='http://cdn.jsdelivr.net/leaflet/0.7.3/leaflet.css' />
    <link rel='stylesheet' href='index.css'>

My index.js looks like this:

var map = L.map('map').setView([32.71, -85.59], 10);
var layer = L.esri.basemapLayer('Topographic').addTo(map);
var geojsonLayer = new L.GeoJSON.AJAX('counties.geojson', {onEachFeature:popUp}, {style:geojson});
var myStyle = {"color": "#ff7800", "weight": 4, "opacity": 0.65};
geojsonLayer.addTo(map);

function popUp(feature, layer) {
    layer.bindPopup(feature.properties.name);
}

my index.css looks like this:

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

A sample of the counties.geojson file can be seen on geojson.io here

How to update the files to add the counties.geojson data to the ESRI basemap?

After that works, would like to popUp the counties.geojson properties, such as the "NAME": "Cleburne".

With the update to index.css this combo now works.

Will need to narrow the borders on counties and change blue to an ear color, but it works. @toms refocused my attention on index.css.


texts: JSAPI: How to prevent GetImageUrl from being called twice?

texts:
I posted this on the ESRI forum a while back but got no response.

PROBLEM:
GetImageUrl is called twice resulting in two trips to the server if caching is off.

QUESTION:
How can this be prevented (other than turn browser caching on)?

HOW TO REPRODUCE:

Go to any sample with a dynamic layer (e.g. https://developers.arcgis.com/en/javascript/jssamples/layout_mapcontainersplitinthree.html)
Run a tool like fiddler2 to monitor IP traffic
Resize the browser
Notice that two identical requests are sent:

"http://server.arcgisonline.com/ArcGI...%2C506&f=image"
"http://server.arcgisonline.com/ArcGI...%2C506&f=image"

A single call to map._resize results in getImageUrl being called twice (once for the resize and once for the change of extent).

I am looking for a way to eliminate the redundant call with a minimal amount of coding.


texts:
We are having a problem in our Search feature for our app. We are using arcgis published REST services and SDE database. When we try to do our search manually using the REST url, it takes roughly 9 minutes for it to finish. Although it is searching an LSD layer, i don't think it should take that much time.

My question is: Is there anything we can do to improve the performance of the find task?

We already did the compress, analyze and rebuild indexes in our SDE database.

Thanks.


texts: Correct CRS for the Ordnance Survey Open Data products

texts:
What's the correct CRS for the Ordnance Survey Open Data Products?
The spatialreference website shows a number of projections identified as British National Grid:

SR-ORG:6812: BritishNatGrid
SR-ORG:6832: UK National Grid
SR-ORG:6971: Great Britain National Grid with additional Helmert Corrections
SR-ORG:7132: uk nat grid
SR-ORG:7237: test
SR-ORG:7340: test
EPSG:7405: OSGB36 / British National Grid + ODN height
SR-ORG:7415: ordinance survey boundry-line
SR-ORG:7460: osgb:BNG
EPSG:27291: NZGD49 / North Island Grid
EPSG:27292: NZGD49 / South Island Grid
EPSG:27700: OSGB 1936 / British National Grid


texts: Aligning two layers captured in different coordinate systems

texts:
I have two layers, one of points (locations of fruit trees) and one of Atlanta zip codes, in an ArcMap, but the layers are not aligning. The zip codes are in the top right and the fruit points are tiny in the bottom left corner.

I successfully converted the fruit points to a shp file from a csv file. The fruit points in the csv are decimal coordinates taken from a GPS.

The zip code map is in NAD83.

**I should have also included that I set the fruit projection to NAD83 (the same as the zip code map). If I understand correctly, this is what is being suggested to me -- but I have already done so. The fruit is a shp layer and the zip codes are as well.

How would I go about aligning these layers so the points fall correctly over the zip code map?  Using ArcGIS10.

Thanks in advance.


texts:
I am looking for some information about Editing in ArcSDE in a PDF or online that I would like to read about. I came to the USDA's Forest Service from the USDA NRCS and NRCS does not have ArcSDE. The US Forest Service is currently using their ArcSDE and I need to learn how it works.

We have Citrx for ArcGIS 10.2.2  and also have ArcGIS 10.2.2 on our PC as well.


texts:
What is the complete recipe for installing VBA for ArcGIS 10 Desktop?

The Esri help topic on this is incomplete. From the number of threads I found troubleshooting this I'm not the only one experiencing difficulties. I've opened a tech support issue, but am still waiting for a response. Perhaps GIS.se is faster?

I have installed the VBA sdk kit from %install_media%\ArcGIS Desktop 10\SDK_VBA.
In ArcGIS Desktop Adminstrator I've set license level to Single Use.
Under Desktop > Availability VBA is listed as installed but not authorized.
When I run the [Authorize Now] wizard VBA is not listed in the available extensions.


texts: QGIS print composer export excludes one layer

texts:
I am trying to export a map from QGIS print composer but the resulting files (I've tried all image, .svg, and .pdf formats) do not appear as the map did in the composer.

It is as if one of the raster layers (an elevation model) has just not been included although the other raster layer (a hillshade layer) has worked. Every other layer, all vectors, appear fine.

Below is a screenshot of how it looks in the print composer. The topography colouring is from the elevation model raster layer, the hillshade is a semi-transparent layer above it.

Here is what the resulting export looks like. This is also what it would look like if the elevation raster wasn't present at all.

Has anyone come across this problem before? I'm using QGIS 2.6.1 but have also tried the recent 2.7 dev version.

Edit (2017-03-07): Prompted by the latest reply I tried to recreate the issue that I had which hadn't been solved by any of the previous answers. I was unable to recreate the problem despite attempting to export at a range of resolutions and file types. I assume it must have been a memory problem as suggested by Juan which has since been fixed (I am now using version 2.18.3) but I cannot be sure.


texts: Geoserver/GeoWebCache (Built In) GridSubset Extent Saves Incorrectly

texts:
We have a very strange problem occurring with GeoServers Built in administration interface when dealing with GWC layer configuration.  It seems when saving a layer cache configuration from the GeoServer admin, the resulting GWC layer configuration XML generates vastly different results (seemingly arbitrarily) under the <gridSubsets> tag. We've tested this on the two most recent versions of Geoserver (2.11.1 and 2.12.0) and both give the same results.

All examples below use only the built in GWC grid sets (so, I don't think it's a grid set configuration problem).

On first turning on GWC caching for a layer, the <gridSubsets> tag populates the default gridsets configured for GWC without any extent information. :

 <gridSubset>
  <gridSetName>EPSG:900913</gridSetName>
</gridSubset>

Then when going back to the administration interface and modifying the cache settings (say to add/remove parameter filters) the generated XML will sometimes modify the <gridSubsets> area and sometimes not...and when it does modify the XML it frequently populates the extent coords with values inconsistent with the built in gridset extent (900913's extent is +/-20,037,508.34):

 <gridSubset>
  <gridSetName>EPSG:900913</gridSetName>
  <extent>
    <coords>
      <double>-5314392.490470881</double>
      <double>1679982.1474796906</double>
      <double>1.8662712631492313E7</double>
      <double>2.003750834E7</double>
    </coords>
  </extent>
</gridSubset>

Then other times, after saving the layer through the admin interface the extent is set correctly based on the grid extent:

<gridSubset>
  <gridSetName>EPSG:900913</gridSetName>
  <extent>
    <coords>
      <double>-2.003750834E7</double>
      <double>-2.003750834E7</double>
      <double>2.003750834E7</double>
      <double>2.003750834E7</double>
    </coords>
  </extent>
</gridSubset>

Now, the core issue here is; unless the admin interface decides to populate the correct grid set extent in the layer xml, GWC tiles will fail to render (due to what I am assuming is effectively a bad bounding box/extent). Going in and manually setting the extent to the correct values in the XML and reloading works...until the layer is saved again through the admin interface...which puts us right back into this seemingly arbitrary cycle.

Does anyone have any idea what in the world could be going on here? Seen this behavior before?

UPDATE
Also confirmed this is still an issue in 2.12.1. Every time we save a layer change through the UI, it's necessary to hunt down the GWC Layer XML file and confirm the extent didn't go haywire.


texts:
I would like to order my field like "normal" but as this column is string it won't work.
I got "Emplacement réservé 105";"Emplacement réservé 106"; .... before "Emplacement réservé 20".

What should I do? to have
Emplacement réservé 10
Emplacement réservé 25
Emplacement réservé 99
Emplacement réservé 105
Emplacement réservé 105


texts:
What I have
I have 5 layers with the following content

One with 350 000 points
One with 300 000 points
One with 30 000 points
One with 100 polygons
One with 25 polygons

What I'm trying to do

I want to create a webmap whith the help of qgis2web.

Problem

Only the the ones with 30 000 point and the two polygon layers appears when the map os completed.

Is there any limitation to the number of points you can have?

Or am I missing something?


texts:
Trying to find details for a ISO element.

We looking for a place to put a formatted citation that users of a content management system include in a dataset description. These citations are in reference to a published papers.

We have the general details of the dataset (title, author detail(s), abstract), these would be put into the citation element.

We could repeat a the MD_datasetInfo/gmd:citation, but the citation is not fielded, it's as input by the user using what they see as a standard citation reference.

I am thinking that the appropriate MD_datasetInfo fields are citation, or suppliemental information.

If I look in the ISO 19139 XML schema, there is no annotation of what citation is intended for.

So, what is appropriate content to put in gmd:credit element?

http://www.schemacentral.com/sc/niem21/t-gmd_MD_DataIdentification_Type.html

Answering myself, since I guess questions about actual ISO geographic metadata specifications are out of scope.

  Credit - recognition of those who contributed to the resource(s)

Found on pdf page 55 in retired OGC document:    The OpenGIS Abstract Specification: Topic 11: OpenGIS(tm) Metadata (ISO/TC 211 DIS 19115) (may require OGC member access)


texts:
I have a set of GRIB files that are fliped (longitude spans from 0 to 365), and I am using gdal to first transform the data to GeoTIFF, and then warp the gridded data to  a standard WGS84 longitude (-180 to 180). So far, I have been using a combination of gdal_translate and gdalwarp from the command line, and using parallel to go through all the files fast. These are the functions in my bash script:
gdal_multiband_transform(){
    FILEPATH=$1
    SAVEPATH=$2

    NUM_BANDS=$(gdalinfo $FILEPATH | grep 'Band' | wc -l)

    if [[ $NUM_BANDS -eq 1 ]]
    then
        echo "Extracting 1 band from $FILEPATH"
        gdal_translate -of GTiff -b 1 $FILEPATH $SAVEPATH
    else
        echo "Extracting 2 bands from $FILEPATH"
        gdal_translate -of GTiff -b 1 -b 2 $FILEPATH $SAVEPATH
    fi
}

warp_raster(){

    echo "Rewarp all rasters in $PATH_TO_GRIB"
    find $PATH_TO_GRIB -type f -name '*.tif' | parallel -j 5 -- gdalwarp -t_srs WGS84 {} {.}_warp.tif \
        -wo SOURCE_EXTRA=1000 --config CENTER_LONG 0 -overwrite
}

warp_raster

Now, I wanted to replicate this same behavior in Python using the osgeo library. I skipped the translation part since I realize osgeo.gdal can warp the GRIB file directly instead of having to convert/translate to a GeoTIFF format. For that I used the following Python code:
from osgeo import gdal

OPTS = gdal.WarpOptions(dstSRS='WGS84',
                        warpOptions=['SOURCE_EXTRA=1000'],
                        options=['CENTER_LONG 0'])

try:
   ds = gdal.Open(filename)
except RuntimeError:
   ds = gdal.Open(str(filename))

if os.path.getsize(filename):
   ds_transform = gdal.Warp(file_temp_path,
                             ds,
                             options=OPTS)
   # is this a hack?
   ds_transform = None
else:
   print(f'{filename} is an empty file. No GDAL transform')

Where I define the same option from my bash script using the gdal.WarpOptions. The outcome is visually the same; the code achieves the main goal: warp the longitude between -180 and 180. But, when I take local statistics the differences are wild. Just a mean of the whole gridded data has a difference of 4 celsius (is surface temperature data). There's any GDAL option I am missing in osgeo that is generating these differences? I do not want to use a bash script since I am looking for an only-Python implementation.
Also posted in SO


texts: Surfacing data in ArcSDE enterprise geodatabases in Portal

texts: Is it possible to use data from ArcSDE geodatabases (hosted in Oracle, in this instance) in Portal webmaps? I've been searching documentation and the internet for a while, and it's implied that it's possible, but I can't seem to find a specific instance of it being done or how to do it.


texts: automatically update Arcmap attribute when updatin Excel table

texts:
I have a map in arcmap where i want to display information that contains values that will probably change every year.
I would rather not having to remove joins and then join my new excel sheet every year. Is there a way:

To directly link my excel sheet to asrcmap so that my map would be modified upon the excel modification
As my excel numbers would change based on a multiplication factor, is there a way to save the formula in the attribute table so that my values would automatically change when i input the new multiplication factor into arcmap?


texts: Attention ESRI - Loading http://help.arcgis.com/en/webapi/javascript/arcgis/samples/fl_any_projection/index.html inside of sIEve shows a significant amount of memory loss each time the page loads (+10MB).  Any workarounds?


texts: I am following this tutorial about how to create my own tiles and got stuck on slide 20. I am trying to tell my web server about my mod_tile installation. However the folder /etc/apache2 doesn't have a conf.d. How can I fix that?


texts: Quickest method to show/hide labels in QGIS 2.8

texts: In order to show or hide labels in QGIS 2.8, I currently right click a layer, select Properties, then Labels, then click the checkbox to show/hide, then click OK. This seems like quite a long-winded method for something that is quite simple in MapInfo - especially as I'm often switching one set of labels off then another on individually several times. Can anyone recommend any plugins? Perhaps a way to add "show/hide labels" to the right click menu for each loaded dataset in the Layers pane?


texts: QGIS Server in an ipv6-only environment?

texts:
Has anyone deployed any QGIS Server version in an ipv6-only environment? I need to ensure server-wide use of ipv6 only.

Any recommendations on how to do so on Linux and/or Windows servers, if you have?

Happy to expand but I'm  neophyte when it comes to working in server environments in GIS.


texts: Select By Location then Append if points selected ModelBuilder

texts:
I am iterating through a point shapefile to assign the points to buffer zones that they fall within, because some points fall within several buffer zones I am doing this using the Append tool into a pre-made shapefile so I will have a copy of each point for every buffer zone it is in. I have this set up in ModelBuilder currently using the Clip tool to 'clip' my points by my buffer, if the output is empty I move on, and if it is not then I assign the new points the buffer ID and append them to my final point shapefile.

However it is running very slow and I have about 11,000 buffer zones in total to get through. Previously I had been using Select By Location on my points instead of clip, but I realized that if no points were selected (as happens with this data set) then ALL of my point are assigned that buffer ID and appended to my final shapefile. I need to find a way to prevent the Calculate Field and Append tools from running if no rows are selected, but I can't seem to make that work. I know the Get Count tool would only work for that if I was using the Select tool, is there any other way to work this? Is there a Get Count but only for selected rows?

This leg of my model seems to be the slowest one.


texts: Exporting bounding area only via ArcGIS Pro?

texts:
I use ArcGIS Pro to export a layout as jpg format image.

I just wonder if any tools in ArcGIS pro can help me export the polygon area only and remove or symbolize the rest area as grey?

My quick thought is that it may not directly operate on the basemap because so far I didn’t find any easy tool to either symbolize the out-of-bound area into grey or other style to distinguish it from the bounding area.

I guess if I need to copy the map view into an imagery first and then dealing with it as an image file and crop it further.


texts: Encoding issues in Arcpy, appears unicode?

texts:
I have a column that has Greek characters:

Example:

Like "*\u0395\u03a*")

What can I do to make it appear as it should?

What I have tried:

import sys
reload(sys)
sys.setdefaultencoding('utf-8')

It didn't work.

When I print it in the console it looks with unicode. If I check the attribute table looks normal.

To be more specific:

If I try this:

datasetList = arcpy.ListTables("*") # Here putting the name of the table
...
... for dataset in datasetList:
...      with arcpy.da.SearchCursor(dataset, ["TheTableName","SqlString"]) as cur:
...           for row in cur:
...               print row

It gives:

(u'Wes1', u'SELECT Wes1.KA, \r\nFROM Wes1\r\nWHERE (Wes1.KA) Not Like "*\u0395\u039a*"'))

Example of table

  qname TheTableName SqlString
0   shp_q1  Wes1     SELECT ...
1   shp_q2  Wes2     SELECT ...
2   shp_q3  Wes3     SELECT ...

each Wes1,2,3 are files in a gdb.

The result with the unicode said above is produced in the terminal(python editor for ArcPy) INSIDE ArcMap.


texts: Symmetrical Difference using fiona and shapely

texts:
I have a polygon that I want to merge into an existing polygon. To do this I first need to run symmetrical difference between the two overlapping polygons, and then merge them.
Before symmetrical difference:

After symmetrical difference:

The problem is that when I run the symmetrical difference, the values in the properties is changed to 1. I need this value to be the same as before I run the symmetrical difference.
In the code below, I have to set a value in the properties – how can I keep the properties as it is (not edited in the properties.
prop = {'code':1, 'fclass':1, 'fclass_no':1, 'Runoffcoef':1} #By running this code, the properties will be changed to 1. I need the properties not to be changed.

import fiona
from shapely.geometry import Polygon, shape, mapping
poly1 = fiona.open("\pol\poly1.shp")
poly2 = fiona.open("\poly2.shp")

geom1 = [shape(feat['geometry']) for feat in poly1][0]
geom2 = [shape(feat['geometry']) for feat in poly2][0]

with fiona.open(r'...\Poly3.shp', 'w',driver='ESRI Shapefile', schema=poly1.schema) as output:
   prop = {'code':1, 'fclass':1, 'fclass_no':1, 'Runoffcoef':1}
   output.write({'geometry': mapping(geom1.symmetric_difference(geom2))'properties':prop})


texts: Automating report layout with data driven pages

texts:
Pretend that I have a geodatabase or shapefile with many layers of roads, waterways, gas-line network, etc. People come to my office to give me coordinates of their land property and ask if it intersects with any of the data features found in the general database or not.

How to make a (map on-demand tool) to get the sample output in the
picture attached, using ArcGIS 10.x?

NOTE:

  Intersection with every feature might be in a separate page (but all
  have the same layout ... kind of map book)

Sample output is here


texts: Can't find point/polygon intersect using QGIS (Windows only)

texts:
Below I describe the method I am using.

I have two machines:

ubuntu linux, qgis 1.4 - intersection works
WIN xp, qgis 1.8 - intersection does not work

Hopefully, someone will find what I am doing wrong I uploaded this screencast showing my problem. The error massage:

"Feature geometry error: One or more output features ignored due to invalid geometry.
Some output geometries may be missing or invalid."

I also tried some other tweaks:

buffering the points layer so I will be doing polygon/polygon intersect - didn't work
saving both layers while specifying the same CRS - didn't work

What am I missing here?