texts: Create non-GIS Front End to ESRI Server Web Map

texts:
I have a webmap that I have created using the ESRI ArcGIS Javascript API / Web App Builder. It manages City projects. The departments that manage this data would like a web-interface to manage the information. They want to update in an excel spreadsheet (or something similar) and have the webmap autoupdate. Now I have two thoughts here.

Create a web-editor map giving edit-level capabilities to the feature classes involved and place this map on an INTERNAL-ONLY server so that only City employees can access this.
Create a web-form that displays and interacts with the database data only, no spatial access.

My problem is, I have experience building the web-map editor where users view a web-map, click on the targeted features, and pop-up the edit toolbar. But the desired option is to provide a spreadsheet entry point to allow a non-GIS clerical user to update the information without any GIS training. I'm wondering if anyone has information on how someone would create a non-map-based edit point for GIS data on an ArcGIS Enterprise Server?


texts: Extract lat/lon from overlapping raster files and assign value?

texts:
I have two raster files that overlap (see picture below): one is a raster of a region (smaller picture on left top side), the other is the smoke plume in that region (huge black polygon blob). I am able to mask the areas that overlap, but how do I get the lat/lon coordinates and assign TRUE to areas that overlap? Both rasters have the same crs (EPSG:4326).
Sample files are accessible here in this link: https://www.dropbox.com/sh/2wwgr9mp3v8hrqq/AADCA24O8PC2qQ9fW_m0KYeda?dl=0

Here's what I have done to visualize that I can mask the overlapping areas from two rasters using Python:
import rasterio
from rasterio.plot import show
from rasterio.mask import mask
from shapely.geometry import box
import geopandas as gpd
from fiona.crs import from_epsg

# specify input/ouput filepaths
fp = r"\smoke_raster.tif"
out_tif = r"\masked_smoke_raster.tif"

data = rasterio.open(fp)

from the above code I can visualize the smoke extent:

#to mask areas where smoke covers region, I create a bounding box with Shapely (this is the bounding box of the region)
minx, miny = -139.1346, 47.65661
maxx, maxy = -110.4208, 60.03192
bbox = box(minx, miny, maxx, maxy)

#Insert the bbox into a GeoDataFrame
geo = gpd.GeoDataFrame({'geometry': bbox}, index=[0], crs=from_epsg(4326))

#get the coordinates of the geometry compatible with rasterio
def getFeatures(gdf):
    """Function to parse features from GeoDataFrame compatible with rasterio"""
    import json
    return [json.loads(gdf.to_json())['features'][0]['geometry']]

coords = getFeatures(geo)
print(coords)

#clip raster with polygon
out_img, out_transform = mask(data, shapes=coords, crop=True)

with rasterio.open(out_tif, "w", **out_meta) as dest:
    dest.write(out_img)

clipped = rasterio.open(out_tif)

I can see that the raster is clipped and I see the regions covered by smoke appears white in this visualization:

How do I get the lat/lon coordinates and assign TRUE to areas that overlap?


texts: Splitting lines and assigning two new values

texts:
It is my understanding that when a line is manually split using the split tool in ArcGIS 10, the geoprocessing follows a create and copy format, meaning that one new feature is created, while the other retains all of the values of the original line segment.  My question is, is it possible to set up the behavior so that when a split is performed, a delete and two creates is executed.

I am working with a sewer dataset and utilitizing the attribute assistant add-in provided by ESRI.  I have a rule set up to generate a new facility id upon creation of a new main.  This works fine for one half of the split line, but since the other half is not considered a "new" line, it retains the facility id of the original segment.  I'm hoping there's a way to modify the split tool to create two new, unique lines upon split.


texts: Filtering a raster by pixel cluster size in ArcGIS?

texts:
I have a raster image representing islands in a river (see image) created using the following process:

1) Clip a water surface DEM and watershed DEM by a bounding polygon (waters' edge).

2) Subtract the water surface DEM from the watershed DEM (containing island - i.e. elevation values > waters surface).

3) Apply a conditional so that only values > 0 (above the water surface) are kept. All other values become 'no data'. This produces the following image:

By looking at this image you can generally pick out the large island and couple smaller ones. What I would like to do is only keep these islands and remove single pixels or lines of pixels that are artifacts of the clipping process. Is there a way to accomplish this in ArcObjects/ArcGIS 10?

I am thinking something along the lines of: Only keep a group of pixels if it contains at least a 3x3 window within it that contains values. This should produce only islands 3x3 or larger and remove any long artifact "strings" of pixels.

EDIT: Thanks to @whuber I've come up with the following solution. I'll continue on with step four from where I left off above:

4) Convert the output conditional raster to integer format.

5) Region group the integer raster.

6) Perform a Zonal Geometry analysis based on area.

7) Apply a condition to the raster from Step 3 based on the zonal geometry area. For this example I just used a "VALUE > 1", meaning an area larger than 1m square (given the original raster had a resolution of 30cm.

Here is the resulting raster:


texts: Where to find World Latitude and Longitude Grid (arctic circle, equator, tropics..) in shapefile/ e00?

texts: i was wondering if you could teach me how to find World Latitude and Longitude Grid (arctic circle, equator, tropics..) in shapefile/ e00? I saw some of these datas affiliated with universities but unfortunately i am not one of their students.


texts: Using Proj4js in Openlayers - Proj4js is not defined

texts:
I want to use Proj4js.

    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.js"></script>
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.3/proj4-src.js"></script>
<script type="text/javascript" >
....

    Proj4js.defs['EPSG:31466'] = 'xyz';
....
 </script>

I get a javascript error: ReferenceError: Proj4js is not defined. When I look at the source specified at /cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.3/proj4-src.js, I do not see any specification of an object called Proj4js having a property defs. Still, that is what the tutorials are saying (like http://wiki.openstreetmap.org/wiki/OpenLayers_Simple_Example).

What do I do wrong?


texts: I'm fairly new to QGIS and GIS altogether. I'm curious if it's possible to generate contours from a DEM in feet, as opposed to meters. I'm hoping to then have my labels in feet.


texts: Adding transportation schedules to a network dataset

texts:
How do I add transportation schedules to a multimodal network dataset? For example, Bus 1 runs between 08:00 and 16:00, and Bus 2 between 14:00 and 23:00. If a passenger wants to solve for a route starting at 16:30, Bus 1 cannot be included in the result as it is not in service at that time.

After some research, I came across this article about managing a public transit system in GIS using ArcInfo 8 (the article is from 2004). The transit data model is essentially the same as the one that ESRI currently has available, except they added a table called ScheduleTimetable, which contains the bus schedules which are related to routes. This table can't be added to the network dataset though, as file gdb tables can't be stored inside a feature dataset (and therefore can't be used in a network dataset). How would I be able to access the time fields so they can be used as restrictions for the routes?


texts: How to display my XYZ Tiles at a certain extent


texts: How to retrieve oneway taxiways from Overpas API?

texts:
I have was able to make a query to http://overpass-turbo.eu/ where I request the taxiways of a specific airport like this:

[out:xml]/*fixed by auto repair*/[timeout:25];
// fetch area “airport” to search in
area[icao~"LOWW"]->.searchArea;
// gather results
(

  // query part for: “taxiway”
  node["aeroway"="taxiway"](area.searchArea);
  way["aeroway"="taxiway"](area.searchArea);
  relation["aeroway"="taxiway"](area.searchArea);

);
// print results
out meta;/*fixed by auto repair*/
>;
out meta qt;/*fixed by auto repair*/

When I check the tags I see that there is an information I would like to have but I don't know how to get it. Basically I would like to make sure that all the taxiways have also the tag oneway=yes. I tried to achive my goal by modifying the line of code in the following way:

way["oneway"="yes"]["aeroway"="taxiway"](area.searchArea);

But with no success. Would you be able to provide a possible way to achieve my goal?


texts: How do I convert State Plane coordinates to latitude-longitude?

texts: Given a specific state plane coordinate system (whether NAD27 or NAD83), are there any resources to convert to latitude-longitude?


texts: Receiving "ImportError: cannot import name" with QGIS Plugin Builder

texts:
While doing a first-time attempt to craft a simple plugin, I ran into this error:

  ImportError: cannot import name

I am using QGIS 2.6.0 for windows, the QT Designer that comes with that package, and the plugin builder plugin 2.0.3

I created the simplest of UI's almost identical to that found at:
   http://anitagraser.com/2014/04/26/getting-started-writing-qgis-2-x-plugins/

Compiled the UI and resource file, as instructed, and then placed the folder within the bounds of the QGIS folders.

Opening QGIS, then the plugin manager, I saw my plugin, and attempted to click it, and the DLG box reported this error [full stack, below "==="):

File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python/plugins\TestPlugin\testplugindialog.py", line 24, in
    from ui_testplugin import Ui_TestPlugin
ImportError: cannot import name Ui_TestPlugin

I infer a circular import, or other problem, but that file referred to is created by the Plugin Builder.

Can anyone provide any hints as to why this error is popping up?

Couldn't load plugin TestPlugin due an error when calling its classFactory() method

Traceback (most recent call last):
  File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 208, in startPlugin
    plugins[packageName] = package.classFactory(iface)
  File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python/plugins\TestPlugin\__init__.py", line 26, in classFactory
    from testplugin import TestPlugin
  File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 460, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python/plugins\TestPlugin\testplugin.py", line 29, in
    from testplugindialog import TestPluginDialog
  File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python\qgis\utils.py", line 460, in _import
    mod = _builtin_import(name, globals, locals, fromlist, level)
  File "C:/PROGRA~1/QGISBR~1/apps/qgis/./python/plugins\TestPlugin\testplugindialog.py", line 24, in
    from ui_testplugin import Ui_TestPlugin
ImportError: cannot import name Ui_TestPlugin

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]


texts: How to create your own CRS using sf package in R

texts:
I am trying to map basketball shots using the sf package in R to create interactive maps for players and coaches. I have managed to create a basketball court as a spatial object using Todd Schneider's ballr , plot_court() function (more specifically the court_points).
library(sf)
spatial_court_points <- st_as_sf(court_points, coords = c("x", "y"))

court = st_sf(
  aggregate(
    spatial_court_points$geometry,
    list(spatial_court_points$desc),
    function(g){
      st_cast(st_combine(g),"MULTILINESTRING")
    }
  ))

plot(court)

I have also divided the court into 17 zones as seen in the picture below:

Let's say I have 5 shots with the following coordinates:
shots <- data.frame(
  x = c(8, -12, 0, 23, -16),
  y = c(8, 16, 30, 6, 12),
  made = as.factor(c(1, 0, 1, 1, 0))
)

plot_court(court_theme = court_themes$light) +
  geom_point(data = shots, aes(x,y, shape = made))

How should I go about mapping these shots using the sf package? When I use tmap, I get the following warning:
Warning message:
Currect projection of shape polys unknown. Long-lat (WGS84) is assumed.

And the court happens to be plotted over the world map where I want the entire window to be the basketball court. How to I set the crs for my objects so that it is a rectangular grid from (-25, 0) to (25, 35)?


texts: QGIS: Creating custom CRS without using the GUI

texts:
What would be the appropriate way to create a custom CRS without using the GUI of QGIS on Windows?

I am trying to create a custom CRS but my GUI seems to be broken. I cannot use the  normal way ("Settings -> User Projections") because no matter what I do the OK-Button does not work. I have tried several things, but none worked (details in this question: Creating custom CRS in QGIS)

So, I'm following the approach of nmtoken mentioned in this question. According to him I could edit the SQLite database where QGIS stores all the CRS. However, the QGIS website advises against messing with this db and I'm not familiar with SQL, anyway.

Does anyone have experience with this db? Or is there another way to either export it from one system to another or to create it via Python code?


texts: How to display names from KML file in google-earth?

texts:
I exported via QGIS a .shp file in .kml. Labels are displayed without any problem in QGIS from a field "REG_NAMES". Now I want to display these names on GGearth from the .kml, but it does not work.

In the question of Pravin Kumar it was said to associate, in the export windows, to "names" the field that you want, so here "REG_NAMES".

I wrote "REG_NAMES" in the field "names" of the Export windows of QGIS, but it does not display the names in GGEarth from the generated .kml. When I click on a polygon, all the informations are displayed in a small windows, but I just want the names to be always displayed on the map


texts: Does ArcGIS Server include Tracking Server?

texts: I want to create a vehicle tracking application. I have ArcGIS Desktop and ArcGIS Server. Can I create application for real time with these two software? I saw in ESRI site another server called Tracking Server. Does ArcGIS Server include Tracking Server or the Tracking Server is another product?


texts: Dataplotly - displaying percentages over bar graph (QGIS)

texts: Is there a way to display percentages above a bar plot? So its easier for viewers to determine how much of an environment is one type (another visual aid). We aren't supposed to show pie graphs. Alternatively, is there a way to display this in the legend(if the other option is not possible)? Otherwise I will go and manually do it for all the graphs. Also is there a way to colour the bar graph in accordance of the feature colour it already has?


texts: Clicking polygon in OpenLayers map and zooming, centering polygon in map?

texts:
I click on the map on a polygon and I'd like to zoom the map and center it around the polygon.

We have done so until now:

map.on ('click', function (e) {
     console.log (s);
    // coordinate = evt.coordinate;

    var feature = map.forEachFeatureAtPixel (e.pixel, function (feature) {return feature;});

    var coordinate = e.coordinate;
    var hdms = ol.coordinate.toStringHDMS (ol.proj.transform (coordinate, 'EPSG: 31700', 'EPSG: 3857'));

    _myStroke = new ol.style.Stroke ({
       color: 'yellow',
       width: 4
    });

    _myFill = new ol.style.Fill ({
       color: 'rgba (255,0,0,1.0)'
    });

    selected_polygon_style = new ol.style.Style ({
       stroke: _myStroke,
       fill: _myFill
     });

   feature.setStyle (selected_polygon_style);

   map.fitBounds (e.layer.getBounds ());
)}

I'm trying to do this with this code line taken from an example here:

 map.fitBounds (e.layer.getBounds ());

But it is error:

Uncaught TypeError: Can not read property 'getBounds' of undefined

And I do not know what it could be.


texts: Get directly a layer with all features from OUTPUT  in processing.runalg() results?

texts:
I'm using Processing algorithm with PyQgis, and I'm asking how can I directly get a layer from the OUTPUT <OutputVector> value returned by the qgis:fixeddistancebuffer algorithm.

print processing.alghelp("qgis:fixeddistancebuffer")
ALGORITHM: Fixed distance buffer
    INPUT <ParameterVector>
    DISTANCE <ParameterNumber>
    SEGMENTS <ParameterNumber>
    DISSOLVE <ParameterBoolean>
    OUTPUT <OutputVector>

I try to compute multiple radius on multiple feature stored in my vlayer shapefile.

from qgis.core import *

vlayer = QgsVectorLayer("my_shapes.shp", "blabla", "ogr")

poly_output_file="test_poly.shp"

radius = [0.2, 0.5]
for r in radius:
    processing.runalg("qgis:fixeddistancebuffer", vlayer , r, 99, False, poly_output_file + "_%s" % r )

Is there a more direct way to get all features generated into one layer, without creating multiple poly_output_file_r.shp ?

Error with 2.18 :

Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 196, in qgis_excepthook
    showException(type, value, tb, None, messagebar=True)
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 107, in showException
    open_stack_dialog(type, value, tb, msg)
  File "/usr/lib/python2.7/dist-packages/qgis/utils.py", line 142, in open_stack_dialog
    iface.messageBar().popWidget()
AttributeError: 'NoneType' object has no attribute 'messageBar'

Original exception was:
Traceback (most recent call last):
  File "/home/reyman/Projets/cours/exercice/pyQgis/generateBufferIsland.py", line 73, in <module>
    get_output= general.getObject(buff_res['OUTPUT']) # you can use any name intead of get_output
AttributeError: 'module' object has no attribute 'getObject'


texts: GEE problem in classification of China city

texts:
When I used random forest to classify Hangzhou (China) in Google Earth Engine, the code editor displays that "Image (Error)Image.select: Pattern 'B1' did not match any bands."And when I delete the "B1", "B2" shows the same error.
I have no idea how to solve the problem.
code below:
//监督分类 (Supervised Classification)
/**
unbuilding 0
building 1
*/
var build_sample = ee.FeatureCollection("users/425490093/Tpoint");
Map.addLayer(build_sample, {}, "build_sample");

function maskL8sr(image) {
  // Bits 3 and 5 are cloud shadow and cloud, respectively.
  var cloudShadowBitMask = 1 << 3;
  var cloudsBitMask = 1 << 5;

  // Get the pixel QA band.
  var qa = image.select('pixel_qa');

  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudShadowBitMask).eq(0)
      .and(qa.bitwiseAnd(cloudsBitMask).eq(0));

  // Return the masked image, scaled to reflectance, without the QA bands.
  return image.updateMask(mask).divide(10000)
      .select("B[0-9]*")
      .copyProperties(image, ["system:time_start"]);
}

//NDVI
function NDVI(image) {
  return image.addBands(
    image.normalizedDifference(["B5", "B4"])
         .rename("NDVI"));
}

//NDWI
function NDWI(image) {
  return image.addBands(
    image.normalizedDifference(["B3", "B5"])
         .rename("NDWI"));
}

//NDBI
function NDBI(image) {
  return image.addBands(
    image.normalizedDifference(["B7", "B5"])
         .rename("NDBI"));
}

var collection = ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA")
    .filterBounds(roi)
    .filterDate('2017-06-15', '2017-06-30')
    // Pre-filter to get less cloudy granules.
    .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE', 20))
    .filterBounds(roi)//
    /**.map(maskL8sr)
    .map(NDVI)
    .map(NDWI)
    .map(NDBI);*/
var bands = [
  "B1", "B2", "B3", "B4", "B5", "B6", "B7","B8","B11",
  "NDBI", "NDWI", "NDVI"];

var l8Image = collection.median()
                   .clip(roi)
                   .select(bands);
                   print(l8Image);

var rgbVisParam = {
  min: 0,
  max: 0.3,
  bands: ["B4", "B3", "B2"]
};
Map.addLayer(l8Image, rgbVisParam, "l8Image");

//切分生成训练数据和验证数据
build_sample = build_sample.randomColumn('random');
var sample_training = build_sample.filter(ee.Filter.lte("random", 0.7));
var sample_validate  = build_sample.filter(ee.Filter.gt("random", 0.7));

print("sample_training", sample_training);
print("sample_validate", sample_validate);

//生成监督分类训练使用的样本数据
var training = l8Image.sampleRegions({
  collection: sample_training,
  properties: ["value"],
  scale: 30
});
//生成监督分类验证使用的样本数据
var validation = l8Image.sampleRegions({
  collection: sample_validate,
  properties: ["value"],
  scale: 30
});

//初始化分类器
var classifier = ee.Classifier.randomForest(5).train({
  features: training,
  classProperty: "value",
  inputProperties: bands
});

//影像数据调用classify利用训练数据训练得到分类结果
var classified = l8Image.select(bands).classify(classifier);
// 对测试数据进行预测
var test = validation.classify(classifier);
// 制作混淆矩阵，并打印出来
var confusionmatrix = test.errorMatrix("value", 'classification');
Map.centerObject(roi, 8);
Map.addLayer(roi);
Map.addLayer(classified.clip(roi), {min: 0, max: 2, palette: ['red', 'blue']})
print('confusion Matrix', confusionmatrix);
print('accuracy',confusionmatrix.accuracy());
print('consumersAccuracy',confusionmatrix.consumersAccuracy());
print('producersAccuracy',confusionmatrix.producersAccuracy());
print('kappa',confusionmatrix.kappa());


texts: Filtering in QGIS similar to dropdown in Excel

texts:
I have a large amount of point data that has so far been managed in an Excel list. In the future, these should be shown in QGIS.
To convince colleagues of this, I am looking for a way to make filtering this data as easy as it is in Excel. Using the clickable query creation, you do not necessarily have to write SQL queries yourself, but it is still not as easy as the drop-down menus in Excel (see picture).

Is there another way, or a helpful plugin, that can make filtering a little easier?


texts:
i'm using SQLite + SpatiaLite and converted maps from OSM to sqlite data base format.

I'm trying to get a polygon from road.

First trying:

select
s1.name,
ConcaveHull(Collect((s1.geometry))) as s1_geo
from ln_highway as s1
where s1.name like '%road_name%'

It's only working when road have more than one lane. But it's polygon of centered paths of lanes. So it's false representation of road.

Second trying:

select
s1.name as s1_name,
Collect((s1.geometry)) as s1_geo
from ln_highway as s1
where s1.name like '%road_name%'

It's showing multilinestring of centered path of road.

If i'll know width of road is there some way to make polygon from this multilinestring (path of road) ?


texts: ArcMap Field Calculator Remove Null values

texts:
I would like to remove the NULL/empty values from a table that is stored in a Geodatabase. Last time I tried doing so it worked fine, today I have some issues with the codes (Double Field). I have used the following python sequence;

Pre-logic:

def RemoveNULL(x):
  if x is None:
    return '0'
  elif x == ' ':
    return '0'
  else: return x

Second Field:

    RemoveNULL(!Field_name!)

According to my opinion the code is correct but the Geoprocessing window illustrates a failure each time I calculate just after 1-3 seconds.


texts: Retrieving OpenStreetMap data with Python using GeoJSON geometry as boundary

texts:
I'd like to :

Select OSM map from a polygon geometry defined by a .geojson file

Extract data (ex : parks area, building height,...) included in the geometry

Any idea?


texts: Creating polygon grid with un-even spacing between research plots?

texts:
I have an orthomosaic of a crop field with small research plots (3.8 X 1.44 m and 0.22m  b/w plots and 0.50m b/w range spacing).

I would like to create a polygon layer using this information. After every three ranges and ten columns there are 1.0m and 1.30m wide allies, respectively.

I tried using the 'pyshp' module in python following this answer to Creating square grid polygon shapefile with Python?, but it did not help much.

So I was wondering if there is any tool available that would allow me to create polygon layers more efficiently ?

Do you have any suggestions on what would be the best way to do in Python, ArcGIS for Desktop, or QGIS ?

Edit: Here is the raster image of the field. So I tried the layer copy-paste method but the attribute table had FID all over the place i.e. without any proper sequence. The only way to asign the plot id to each polygon is to highlight each polygon in attribute table and enter the id manually. As MappaGnosis suggested, I would like to give python scripting a try.


texts: Using OR and ISNULL in Raster Calculator

texts:
I am using ModelBuilder for ArcGIS Desktop 10.2

I have the following code in the Raster Calcualtor which works in some cases but not in others.

Int(Con(IsNull("%A%")|"%A%"== 0,"%B%",float(%Max%) + "%A%"))

In cases that A is Null I want the code to return the value from B however it is returning a Null. I suspect there is a flaw in the OR syntax but I can't work out what is wrong.


texts: How to extract mountain peak points from a given digital elevation model?

texts:
For past couple of days, i m trying to determine how many mountain peaks are visible (line of sight) from a given location using POSTGIS.

The data i have is DEM for Swiss and address locations from Swiss which are stored in a table in postgis database. I downloaded the mountain peak points from OSM(Open street Map), and then wrote a function in postgis to find if the peak is visible from a given address location using address data from the table, elevation raster(imported in the postgis db), and mountain peak data imported from OSM to POSTGIS...

The Funtion is giving me output but the quality of the results are very poor as OSM mountain peaks are not proper and are not aligned to the mountain peak points in the  elevation raster(problem with OSM data Quality). projections are matching of both the layers.. so now to solve this problem i need to get the exact mountain peaks.
So i was just wondering if i can extract mountain peaks from elevation raster. with it co-ordinates n elevation.. which i can then used to calculate Line of sight...

can anyone here please help me?? i m not sure if this is possible

Thanks in advance


texts: Updating ESRI Hosted Feature Layer is retaining old versions of the layer

texts:
The problem is that there should only be one Layer included. Instead there are 4 with the same name.
I uploaded a zipped shapefile to ArcGIS Online and created a feature service out of it for creating an ArcGIS Online Webmap. Later there were changes to the mapping so I overwrote (being careful to choose overwrite and not append) with a new zip file. For some reason there is still four copies of Zip_Codes_sum_amounts (name of the shapefile in the zip) within and sure enough, the popup has information for all othe various copies. I only want the latest version.
I'm aware of the Append Option so I specifically chose overwrite expecting the layer to be "over-written" but it was not to be. If anyone has a quick easy solution, I like those best but of course I'll entertain whatever.


texts: Shapefile fails to import into Google Earth Pro

texts:
My shapefile fails to import into Google Earth Pro. Is the map projection of my shapefile to blame?

When I heard Google Earth Pro was now free I thought it might be a good tool for non-GIS people to view some of the data we distribute in the shapefile format.  Unfortunately most of the shapefiles fail to import. All of the files that fail use our provincial map projection - EPSG 2953 (New Brunswick Stereographic Double):

PROJCS["NAD83(CSRS) / New Brunswick Stereo",GEOGCS["NAD83(CSRS)",DATUM["D_North_American_1983_CSRS98",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199433]],PROJECTION["Double_Stereographic"],PARAMETER["Latitude_Of_Origin",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",2500000],PARAMETER["false_northing",7500000],UNIT["Meter",1]]

Here is a simple file that fails to import (1:250,000 map grid):
http://geonb.snb.ca/downloads/250k_grid/geonb_250kgrid-250kgrille_shp.zip

However, the “Aboriginal Lands” shapefile will import fine.  It is produced by the federal government and uses the following projection:

`GEOGCS["GCS_North_American_1983_CSRS98",DATUM["D_North_American_1983_CSRS98",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.0174532925199432955]]`

The Aboriginal Lands shapefile can be downloaded here:
http://ftp2.cits.rncan.gc.ca/pub/geobase/official/al_ta/shp_eng/al_ta_nb_shp_eng.zip

Are there certain projections that cannot be imported by Google Earth?  Is there a list I can refer to?


texts: Can I export the RGB values from an ArcGIS layer symbology?

texts:
I've got a point layer in ArcGIS that has 100 specific color codes based on the name of the store. I'm trying to export the RGB values for these colors (along with the name value it's tied to) so I can create a qml style file for QGIS.

So, basically I'm trying to apply ArcGIS symobology rules into a QGIS qgs project.

Anyone know how I can do this?


texts: We are using Saex tools for Parcel operations. While splitting parcels, we can perform all the operations successfully except the last one. when performing split parcel operation we get Error: Cannot perform parcel split operations


texts: features label didn't appear for some featuresClass

texts:
i'm working in a stand-alone application using arcEngine , arcSDE geodatabase , VB.net
so my problem is  that i can't appear the features label for some featuresClass.
when i opened it in arcMap to test it, despite Labels are set in Properties, layers are checked to label in the TOC,I'm unable to get labels to display in Arcmap 10.

like this question but mine is different :
Labels not appearing on any layer in ArcMap?

i'm not looking to change my mxd file. all feature classes are in a geodatabase.


texts:
I'm looking for an Android application (best would be Open Source), that can display georeferenced images on top of a map (Google, OSM, ...).

By Georeferenced I mean that the images four corners are related to world coordinates and a SRS like in GeoTiff or image + worldfile + prj-file. I DO NOT understand a photo + EXIF-Geotag.

A plus would be the possibility to georeference an image.

Edit: I would like to georeference in Android, because I sometimes have unreferenced Plans on my SD-card or find maps out there, take a photo of them, and overlay them with my base map.


texts: PostgreSQL/GIS table relations in QGIS 1.8.0

texts:
I am building a database in PostgreSQL 9.2 with the PostGIS 2.0 extension. The database consists of a schema called Water which contains water related geographic features (as example, boreholes and water filters as points with coordinates). Each feature type, eg. water filters or boreholes, is in a separate table. In other words, water filters are in a table named water_filters and boreholes are in a table named Boreholes and the tables are in a schema called Water.

In the same database I have a schema called maintenance with non-geographic tables. The maintenance tables houses the maintenance records of the respective geographic features. The maintenance table for water_filters will house, for example, a unique number/name/identifier for a water filter and the latest service date.

Thus far, I have selected for the geographic features (eg water filters) a unique number/name/identifier as the primary key. For the corresponding maintenance table the number/name/identifier of the geographic features was selected as a foreign key.

My questions:

Is this the correct way to define relations between two tables in PostgrreSQL/GIS?
How do I view the relations in QGIS 1.8.0?

Thanks in advance


texts: How to sum the values for bins with the same location?

texts: I have two maps in CSV form, each has a latitude, longitude, and value column. Since not all the positions in one map are in another map, is there any way in QGIS to display a new map which only shows the points that are in both of the original maps? Besides, is it possible to display the value of each bin in the new map as a function (e.g. sum) of the values of original maps?


texts: Can I retrieve google map data for traffic and whose the users?

texts:
Can I retrieve Google map data for traffic on a specific street?

Does the the data include attributes about the users who are creating the traffic (users age in the traffic, gender, etc.)?


texts: Error when trying to add system:time_start when using reduceRegions in Google Earth Engine

texts:
I am reducing an image collection into a feature collection by using a function to map the reduceRegions function to each image in a collection. I'm trying to make sure the system:time_start property is carried over. My code is below
var DHW_region = DHW.map(function(image){
  return image
  .reduceRegions({
  collection:reefsEdit ,
  reducer:ee.Reducer.mean(),
  scale: 30
 })
  .set(ee.Date(image.get('system:time_start')));
 });

 DHW_region = DHW_region.flatten();

However, it doesn't seem to work and I'm getting an error
FeatureCollection (Error)
Error in map(ID=0): Dictionary: Unrecognized arguments to Dictionary constructor.

Where am I going wrong with this? Link to my code is here


texts: Can you create new annotation feature classes with Python in ArcGIS for Desktop?

texts:
I am working on a project that needs to create file geodatabases from scratch and I cannot find any information about how to make new feature classes as annotation with Python.

Does anyone have any thoughts or suggestions on this? Is there another way to do this programmability outside of Python?

This question was written for ArcGIS Desktop 9.3 but Answers using ArcGIS 10 for Desktop are also welcome.


texts: gridlines are on top of some text boxes but below others, how do I make it so that the text boxes are above the gridlines in all cases

texts: I am working with a map and instead of using the labels feature I chose to use text boxes because the labels were not where I wanted them to be. I set up all the text boxes and then added gridlines using the add grid feature and some of the text boxes appear above the grid lines and some of the text boxes are below the gridlines aka the there are lines right through my text box. I have noticed when I try and click on the above gridline text boxes I cannot get them to move or edit them at all but I can with the textboxes that are underneath the grid. I have tried to send all the text boxes to the front using the order option but that did nothing. I have also looked at all the properties under text boxes and grids.


texts:
I have this line in my project's layer which I can't make disappear:

I hope you can see it. In QGIS is much more visible. An it also appears on the print composer.

Any suggestions would be very useful.


texts: Coordinate system for Finland in ArcGIS Desktop?

texts:
I have a shapefile of Finland in WGS84 (EPSG:4326), that I would like to convert to projected coordinate system, most commonly used in Finland.

But, here is my confusion:
I have found that from 2005, topographic maps should be in EUREF-FIN CS, as ETRS89 realization in Finland http://www.kolumbus.fi/eino.uikkanen/geodocsgb/ficoords.htm

But, here they also list ETRS-TM35FIN to use for country wide displays. So, what is the difference between EUREF-FIN CS and ETRS-TM35FIN?

In ArcGIS, I can find both of them, under different WKID code:

WKID: 3067: EUREF_FIN_TM35FIN
WKID: 5048: ETRS_1989_TM35FIN_NE

Checking using EPSG codes (https://epsg.io/), the same WKID codes represent the same CS name, but with switched Northing and Easting! (why would anyone do that?!)

EPSG: 3067: ETRS89 / TM35FIN(E,N)
EPSG: 5048: ETRS89 / TM35FIN(N,E)

SYKE institute provides free open data in ETRS-TM35FIN (EPSG:3067), which again mixes the name (ETRS) with EPSG for EUREF_FIN_TM35FIN.

Well, what is proper coordinate system to use in Finland? and how is it specified in ArcGIS/proj4 library?


texts: Where are coordinate system files saved when using the ArcGIS Citrix app?

texts: Is there a standard location where coordinate systems are saved within ArcGIS when using a Citrix app? Or maybe a redirected folder location?


texts: QGIS 2.14.6 Processing Extension, 'Polygonize' Tool missing

texts:
Just installed QGIS 2.14.6 64Bit from OSGEO4W installer. Processing extension Version is 2.12.99. As can be seen in the screenshot, I'm not able to switch to 'Advanced Interface' as usual in order to access the Polygonize Tool (Lines to Polygons does still not work, cp. QGIS 2.12 Lines to Polygons not work properly):

Same installation run parallel on another machine has Processing Plugin Version 2.10.3, and here I'm able to switch to advanced Interface and access the Polygonize tool:

Add/Update:

Completely confusing: In 2.14.5 installed from the standalone installer the processing plugin version is 2.12.99 too, but herein I can access the Polyonize tool:

Research effort so far: I realised that in case 2. the processing plugin was installed under username\.qgis2\python\plugins\, unusual path for a core plugin. Obviously (or maybe?) the problem is a previous installation of QGIS before processing has become a core plugin, so the plugins herein seem to override core plugins. This would explain too, why the plugin under 2. is not affected by the update (since processing is a core plugin, it is not available in the repository). The solution was simply to uninstall the plugin, restart QGIS and the core plugin version 2.12.99 is available. Remarkable: Polygonize Tool is still available (in contrast to case 1.). So far so good.

To sum it all up:

In all three cases processing plugin version is 2.12.99:

OSGeo4W installer, No Polygonize Tool
OSGeo4W installer, Polygonize Tool available
Standalone installer, Polygonize Tool available

So what can be the problem in case 1? May I have missed something in the OSGeo4W installer?


texts: Update name of nearest OSM road in Postgresql

texts:
I have OSM data in postgresql for my local city. I want to change the name of a road which is near my lat long.

Like:

Update planet_line set Name='My road 1' where (if it is a road/way) and (if it is nearst road to (mylat, mylong))

Update should change only one lines name, like the top 1 nearest one. I don't want to affect rivers or other lines, only road.

Can you help me to fix my query?

edit:

-- Table: public.planet_osm_line

not : osm_id  is not uniqe. It can be used in few different rows.

CREATE TABLE public.planet_osm_line
(
osm_id bigint,

access text COLLATE "default".pg_catalog,
"addr:housename" text COLLATE "default".pg_catalog,
"addr:housenumber" text COLLATE "default".pg_catalog,
"addr:interpolation" text COLLATE "default".pg_catalog,
admin_level text COLLATE "default".pg_catalog,
aerialway text COLLATE "default".pg_catalog,
aeroway text COLLATE "default".pg_catalog,
amenity text COLLATE "default".pg_catalog,
area text COLLATE "default".pg_catalog,
barrier text COLLATE "default".pg_catalog,
bicycle text COLLATE "default".pg_catalog,
brand text COLLATE "default".pg_catalog,
bridge text COLLATE "default".pg_catalog,
boundary text COLLATE "default".pg_catalog,
building text COLLATE "default".pg_catalog,
construction text COLLATE "default".pg_catalog,
covered text COLLATE "default".pg_catalog,
culvert text COLLATE "default".pg_catalog,
cutting text COLLATE "default".pg_catalog,
denomination text COLLATE "default".pg_catalog,
disused text COLLATE "default".pg_catalog,
embankment text COLLATE "default".pg_catalog,
foot text COLLATE "default".pg_catalog,
"generator:source" text COLLATE "default".pg_catalog,
harbour text COLLATE "default".pg_catalog,
**highway** text COLLATE "default".pg_catalog,
historic text COLLATE "default".pg_catalog,
horse text COLLATE "default".pg_catalog,
intermittent text COLLATE "default".pg_catalog,
junction text COLLATE "default".pg_catalog,
landuse text COLLATE "default".pg_catalog,
layer text COLLATE "default".pg_catalog,
leisure text COLLATE "default".pg_catalog,
lock text COLLATE "default".pg_catalog,
man_made text COLLATE "default".pg_catalog,
military text COLLATE "default".pg_catalog,
motorcar text COLLATE "default".pg_catalog,
**name** text COLLATE "default".pg_catalog,
"natural" text COLLATE "default".pg_catalog,
office text COLLATE "default".pg_catalog,
oneway text COLLATE "default".pg_catalog,
operator text COLLATE "default".pg_catalog,
place text COLLATE "default".pg_catalog,
population text COLLATE "default".pg_catalog,
power text COLLATE "default".pg_catalog,
power_source text COLLATE "default".pg_catalog,
public_transport text COLLATE "default".pg_catalog,
railway text COLLATE "default".pg_catalog,
ref text COLLATE "default".pg_catalog,
religion text COLLATE "default".pg_catalog,
route text COLLATE "default".pg_catalog,
service text COLLATE "default".pg_catalog,
shop text COLLATE "default".pg_catalog,
sport text COLLATE "default".pg_catalog,
surface text COLLATE "default".pg_catalog,
toll text COLLATE "default".pg_catalog,
tourism text COLLATE "default".pg_catalog,
"tower:type" text COLLATE "default".pg_catalog,
tracktype text COLLATE "default".pg_catalog,
tunnel text COLLATE "default".pg_catalog,
water text COLLATE "default".pg_catalog,
waterway text COLLATE "default".pg_catalog,
wetland text COLLATE "default".pg_catalog,
width text COLLATE "default".pg_catalog,
wood text COLLATE "default".pg_catalog,
z_order integer,
way_area real,
tags "public.hstore",
**way** "public.geometry"(230633732)
)
WITH (
    OIDS = FALSE
)
TABLESPACE pg_default;

ALTER TABLE public.planet_osm_line
OWNER to osm;

GRANT ALL ON TABLE public.planet_osm_line TO osm;

GRANT SELECT ON TABLE public.planet_osm_line TO PUBLIC;

-- Index: planet_osm_line_index

-- DROP INDEX public.planet_osm_line_index;

CREATE INDEX planet_osm_line_index
   ON public.planet_osm_line USING gist
   (way)
TABLESPACE pg_default;

-- Index: planet_osm_line_pkey

-- DROP INDEX public.planet_osm_line_pkey;

CREATE INDEX planet_osm_line_pkey
   ON public.planet_osm_line USING btree
   (osm_id)
  TABLESPACE pg_default;


texts: Qgis 2.18.14 - rulebased and categorized style in atlas

texts:
I am currently generating an atlas.
I have four parts of a map, showed on each page. For the map I have a lot of polygons styled in different colours after category. Now I need to make a rulebased style, so I only get shown the relevant area of the map, on my atlaspage. So I use $id=@atlas_featureid. But when I use this rule, I can't get my categorized colours with me.

What is the right rule/expression to use?

This is my two options - I can't think of anything. Either type ind $id=@atlas_featureid on every label (which does not work) or do something in categorized - where no expressions work.


texts: Is there a data source/service for the USA where, if we provide a polygon, it provides the addresses of all houses contained within it? I just want to know if this type of functionality or similar to this exist?


texts: Python if, and, or to compare field values and assign new value

texts:
I have 3 fields in a table that i need to evaluate and return a new value based on the results using the field calculator (PYTHON)

They are:
SETSPAID (long)  This field must = 0
TYPEOFSERVICE (string)  This field must = 1 or 3
STATUS (double) This field can not be 5 or 6

Here is what I have so far:

Pre-logic Script Code:

def calc(f1,f2,f3,f4,f5,f6,f7,f8):

  if f4 == f5 and (f1 == f2 or f1 == f3) and (f6 != f7 or f6 != f8):
    return 1
  else:
    return f4

SETSPD =

calc(!TYPEOFSERVICE!, '1', '3', !SETSPAID!, 0, !STATUS!, 5, 6)

When I run this code, it still assigns a 1 when status is 6.
Not sure what im doing wrong.


texts:
I think QGIS Zonal Statistics algorithm does not handle No_data values correctly.

The expected behaviour is that if I set some raster cells to No_data (for example with the method suggested here, using gdal_translate), then Zonal Statistics will ignore those values.

But in fact it treats them as -3.4e+38, so all the statistics are wrong. See for example Antartica in this pictures, all 0 values in layer 1 have been set to No_data in the Converted layer, so Mean and Sum stats should be 0. But they are not.

I tried with SAGA's "raster statistics for polygons", and there is the same problem.

Is it worth filing a bug report? Or am I missing something?

Just for reference, layer 1 is N balance on landscape, taken from earthstat.

EDIT

I tested it all again after @user30184's answer. The problem actually arises if I apply a mask to the raster layer first, to change all values <= 0 to 0.

Using the raster calculator:

(layer1 > 0) * layer1

Then I convert 0 values to no_data with the method described above, and finally I run Zonal Statistics.

You can see the results in the picture below. Statistics with "_" as prefix are calculated without the mask layer step. Statistics with "t" as prefix are calculated with the mask layer. As you can see for Antartica, I get funny values in the "t" results.


texts: How can I convert these coordinates to decimal degrees

texts:
We have extracted the following coordinate set from a Microsoft SQL database, but are unable to convert it to a coordinate system that makes sense. We know that the coordinates should be in Cape Town, South Africa.

Actual_GPS_Latitude: -122146844
Actual_GPS_Longitude: 66350481


texts: GDAL/OGR Error: Cyclic VRT opening detected

texts:
GDAL 2.2.4 (64bit Windows) throws an error during opening of a cyclic OGRVRT file.

There was no problem with cyclic VRTs in GDAL 1.10.1 (32bit Windows).

Here is a sample VRT file, which I used to join an ORACLE table with a MSSQL table:

<!-- file: myJoin.ovf -->
<OGRVRTDataSource>
    <OGRVRTLayer name="mssql">
        <SrcDataSource relativeToVRT="1">mssql.ovf</SrcDataSource>
        <GeometryType>wkbNone</GeometryType>
        <SrcSQL>SELECT * from mssql</SrcSQL>
    </OGRVRTLayer>
    <OGRVRTLayer name="oracle">
        <SrcDataSource relativeToVRT="1">oracle.ovf</SrcDataSource>
        <GeometryType>wkbPoint</GeometryType>
        <SrcLayer>oracle</SrcLayer>
    </OGRVRTLayer>
    <OGRVRTLayer name="myJoin">
        <SrcDataSource relativeToVRT="1">myJoin.ovf</SrcDataSource>
        <GeometryType>wkbPoint</GeometryType>
        <SrcSQL dialect="sqlite">
        SELECT o.*,m.ui_status from oracle o left join mssql m on o.uwi = m.ui
        </SrcSQL>
    </OGRVRTLayer>
</OGRVRTDataSource>

ogrinfo (GDAL 2.2.4) throws an error:

D:\data>ogrinfo -ro myJoin.ovf
INFO: Open of `myJoin.ovf'
      using driver `OGR_VRT' successful.
1: MSSQL (None)
2: ORACLE (Point)
3: MYJOINERROR 1: Cyclic VRT opening detected !
 (None)

Is there any mechanism/flag, that prevents the "Cyclic VRT" detection and allows to use cyclic VRT files again?


texts: GDAL tiling DTED (dt2) dataset as gdal2tiles for 3D Maps

texts:
i am searching some webgl technologies to create 3d map with digital elevation data. for web tech. i have found ReadyMap SDK to create 3d map from TMS...

in ReadyMap for elevation data it uses sth below to create a json data from tile which consists of tifs.

map.addElevationLayer(new ReadyMap.TMSElevationLayer({
            name: "Elevation",
            url: "http://readymap.org/readymap/tiles/1.0.0/9",
            args: "json=true",
            tmsType: "google"
        }));

in TMS mechanism one tile scheme is sth like this:

tms scheme : 10/294/752.jpg

in google scheme : 10/294/271.jpg

and for elevation data ReadyMap uses tiles as below:

http://readymap.org/readymap/tiles/1.0.0/9/7/157/94.json?json=true

i think in above link in zoom 7, folder name 157 and tile name 94 is both jpg and json format . jpg formats for tiles is in other storage or server....

and my question is that for creating digital elevation how can i tile my dted files like TMS scheme for creating digital elevation data? can i tile dted 2 with gdal2tiles or sth?

thank you...


texts: Openlayers 3.10 can't display features added manually

texts:
I'm trying to add features manually to vector layer but with no luck.
This is my code:

cords[0] = {
[19.1820888104, 49.6835693017],
[19.1819108957, 49.6850423191],
[19.1846518426, 49.6853635871],
[19.1864287796, 49.6845787109],
[19.1864490975, 49.6839272706],
[19.1853396287, 49.6834588915],
[19.1835425444, 49.6834155484],
[19.182316043, 49.6832563996],
[19.1820888104, 49.6835693017]}

var featurething = new ol.Feature({
    geometry: new ol.geom.LineString(cords[0])
    });
var layerV = new ol.layer.Vector({
        source: new ol.source.Vector({
            features: featurething
        }),
        visible: true
    });
map.addLayer(layerV);

When I check layerV object in console it looks okay (it has feature with proper geometry) but it's not displaying on map. Any idea what's wrong?


texts: Are the public domain vehicle tracks available?

texts:
I'm looking for recorded vehicle tracks that can be replayed to (load) test my application. Is there such data available? Best would be a european data basis but everything else would do the job as well.

Or are there (free) tools available to generate tracks that can be used to simulate a vehicle driving on a road and sending a position every 10 seconds?


texts: I'm new with ArcGIS Online and I'm trying to create a survey kind of thing using Web AppBuilder and Smart Editor. I have a feature layer (hosted) but in smart editor I can't change the insert object name (shown on the picture with red). It's probably really simple fix but I'm little bit stuck.


texts: QGIS ERROR: invalid input syntax for type uuid: "uuid_generate_v4()"

texts:
I have a problem to get parent child relations to work properly in QGIS.
I have a parent table as polygon and two linked tables a non-spatial child_1 table and a second child_2 Point layer.
When I try to add child features to the parent layer I often get the followin error:
ERROR:  invalid input syntax for type uuid: "uuid_generate_v4()"
My tables look like this:
CREATE TABLE test.parent (
    gid serial NOT NULL,
    uid uuid NOT NULL DEFAULT uuid_generate_v4(),
    parent_txt text NULL,
    geom geometry(POLYGON, 3857) NULL,
    CONSTRAINT parent_pk PRIMARY KEY (uid)
);

CREATE TABLE test.child_1 (
    id serial NOT NULL,
    uid uuid NOT NULL,
    datum timestamp(0) NULL DEFAULT now()::timestamp without time zone,
    child_1_txt text NULL,
    CONSTRAINT child_1_pk PRIMARY KEY (id),
    CONSTRAINT child_1_fk FOREIGN KEY (uid) REFERENCES test.parent(uid) ON DELETE CASCADE ON UPDATE CASCADE
);

CREATE TABLE test.child_2 (
    id serial NOT NULL,
    uid uuid NOT NULL,
    datum timestamp(0) NULL DEFAULT now()::timestamp without time zone,
    child_2_txt text NULL,
    geom geometry(POINT, 3857) NULL,
    CONSTRAINT child_2_pk PRIMARY KEY (id),
    CONSTRAINT child_2_fk FOREIGN KEY (uid) REFERENCES test.parent(uid) ON DELETE CASCADE ON UPDATE CASCADE
);

In QGIS all tables are loaded and two relations are set in the project properties
using the uid field from the parent table to the uid (foreign key) of the child_1 or to the child_2 table.
In the autogenerated form to add or edit features, everything seems to be OK (see picture), but I still get the strange error about "uuid_generate_v4()" when trying to add new child features.
The strange thing is, that sometimes it works, but most of the time it fails.
It fails, when I'm digitizing a parent feature and try to add immediately the child features.
After saving the parent polygon and when I try to add child features it mostly fails with the mentioned error.

I followed the official documentation of QGIS to work with linked tables, but it seems, that I'm still missing something.


texts: Filtering vector tile layer in OpenLayers map?

texts:
I have GeoDjango application for the visualization of household data with around 10k features. So I have used the vector tile for the visualization of these data. Now I faced the problem with the proper way of filtering the datasets.
Though I get an idea of filtering datasets with style function it didn't help much and I don't think its best way approach, as data is not actually filtered in this scenario.
I have used following code for the visualization purpose:
  var urlFilter = '/api/v1/data/house.mvt?tile{z}/{x}/{y}';
  var vectorHouse = new ol.layer.VectorTile({
    declutter: true,
    // style:simpleStyle,
    source: new ol.source.VectorTile({
      // tilePixelRatio: 20, // oversampling when > 1
      tileGrid: ol.tilegrid.createXYZ({maxZoom: 24}),
      // projection: 'EPSG:3857',
      format: new ol.format.MVT(),
      url: urlFilter
    })
   });

  spatialMap.addLayer(vectorHouse);

Now I am looking for the client-side filter based upon the properties like houseID. I am using Django as backend and djangorestframework-mvt for vector tile generation.
Any suggestions?


texts:
When using pdal to either translate to ply file or split a ply file in smaller chunks, it appears to be truncating values so I end up with point clouds with stripping. This does not occur with other formats - but I need .ply in particular.
E.g. when splitting up a bigger file....
 pdal split --capacity 1000000 in.ply out.ply

... I end up with the result below for the subsets. Are there parameters that may stop this from happening? (See the below pic)


texts: Add/update shapefile to existing PostgreSQL database in QGIS

texts:
I've an exiting state level PostgreSQL database with some layer's and I need to update an additional data to the existing database.

Ex:

I've a layer called "Road_NW" need to add  additional feature's to this layer and the additional road created with the layer name as "Road_NW".


texts: Multiplication of two raster stack with R using multicore parallel processes

texts:
I am working with two global raster stacks, each containing 60 layers using the R Software. The layers are global raster files (in GTiff format) at a resolution of 5 min of arc. The first stack contains cultivated areas for 60 crops, while the second stack contains the grid-cell yield of the same 60 crops.

my objective is to multiply the two raster stacks, in order to obtain the production for the 60 crops for each grid-cell. I am running this calculation using the raster package and using its parallelizing function clusterR together with the fuction calc. I am running the process using 24 cores. The code looks like this:

rasters_production <- clusterR(rasters_land_use_hectars, calc, args=list(fun=function(x){x*rasters_yield}),
                        export="rasters_yield", exclude="parallel", filename=paste0("Script_generated_files/", "organic_rasters_production_1.tif"), format="GTiff", overwrite=T, cl=cluster)

When I run it, the code generate the following error:

Error in clusterR(rasters_land_use_hectars, calc, args = list(fun = function(x) { : cluster error

Nevertheless, if I run the same multiplication but multiplying a raster stack for a vector of 60 coefficient (and not for a second raster stack), the calculation works correctly?

Does somebody know why the calculation between the two raster stacks does not work instead?


texts: Is it possible to embed the GRASS map display to a C# application? I know that a PNG image can suffice but to make the application more interactive it could perhaps be integrated.  In essence I would just be re-skinning the GUI of grass and adding some simulation buttons etc.


texts: Removing one image from ImageCollection in Google Earth Engine

texts:
One image in an ImageCollection is giving me problems (2019030509) so I'd like to remove it. I am trying to use .filter.not() to remove by ID:

var dataset = ee.ImageCollection('HYCOM/sea_temp_salinity')
                   .filter(ee.Filter.date('2019-01-01', '2019-12-31'))
                   .filter(ee.Filter.inList('HYCOM/sea_temp_salinity/2019030509').not());
print(dataset)

var seaWaterTemperature = dataset.select('water_temp_0')

print(seaWaterTemperature)

var visParams = {   min: -20000.0,   max: 15000.0,   palette:
['000000', '005aff', '43c8c8', 'fff700', 'ff0000'], };
Map.setCenter(-76.55, 38.92, 8); Map.addLayer(seaWaterTemperature,
visParams, 'Sea Water Temperature');

But I am still getting an error saying
'Error in map(ID=2019030509): Image.select: Pattern 'water_temp_0' did not match any bands.' so I don't think it was removed.


texts: How to calculate TilesOrigin for WebGeoCache in OpenLayers

texts:
I'm using OpenLayers 5.2 to display tiles from Geoserver 2.14 with GeoWebCache.
For the GeoWebCache to work it is required to define tiled=true and tilesorigin parameters in the WMS requests.

How to I get the tilesorigin value in OpenLayers?


texts: Re-projecting raster in R: gives warning that projected point(s) not finite?

texts:
1. Question

I have encountered a warning using the projectRaster() function in the raster package in R. A full reproducible example is pasted below.

   Warning message:
   In rgdal::rawTransform(projto_int, projfrom, nrow(xy), xy[, 1],  :
   33940 projected point(s) not finite

My question is: Is this warning a problem I need to fix if I am working on terrestrial data? In other words is data "lost". This would be a major problem for me if it is. If that is the case, do you know if there a way I can fix it?

I have searched for a solution to this problem online and found some mention of it here, here & here but I think none offer a suitable answer to this problem.

2. Load the raster library

  library(raster)

3. First create a (long lat) map of the world, with a constant in each grid cell

I am putting a constant in each grid cell to see if I can diagnose the problem of where the warning is likely to affect the data, if at all.

 rastertest.longlat<-raster(ncol=360, nrow=180)
 values(rastertest.longlat)<-c(rep(1,n=180*360))

4. If you reproject the (long lat) map onto an equal area grid, it produces the warning message

   rastertest.eck4<-projectRaster(rastertest.longlat, res=c(100000,100000), crs="+proj=eck4",method="ngb", over=T)

Warning message:
 In rgdal::rawTransform(projto_int, projfrom, nrow(xy), xy[, 1],  :
33940 projected point(s) not finite

I think this message is basically is saying that the the re-projection failed for some of the grid cells.

5. But if you plot out the two maps, it doesn't look like this warning poses any problems for the data

That is you don't see any white gaps in the data plotted. My guess is that the lost cells are non terrestrial cells, at the top and the edge of the world extent. Any ideas?

par(mfrow=c(2,1))

plot(rastertest.longlat, col="blue")
data(wrld_simpl)
wrld <- spTransform(wrld_simpl, CRS('+proj=longlat'))
plot(wrld, add=TRUE)

plot(rastertest.eck4, col="blue")
wrld <- spTransform(wrld_simpl, CRS('+proj=eck4'))
plot(wrld, add=TRUE)


texts: ArcGIS Javascript Api - QueryTask and setDefinitionExpression

texts:
I've written some code to query a Feature Layer using either a QueryTask or using the setDefinitionExpression when adding the layer.

For testing I am using the ASP.Net Development Server.

I've noticed (via Fiddler) that when my "where" statement is large, my request automatically changes from a GET to a POST.  Occasionally however my request fails with an "esri.config.defaults.io.proxyUrl is not set." error.

In researching this error I have found that it may be due to the length of the URL exceeded the maximum length, and that to workaround this issue I should use a proxy, in order to perform a POST.  I am however confused by this because I am already seeing my requests change from using a GET to a POST.

When performing a query using a large where clause,does the request in fact get changed from a GET to a POST when necessary?  If so, is the use of a proxy still necessary in this case.


texts:
I am working on a project and recently I received a set of files that include a .xml file (.tif.aux), a TIF and a shapefile.
When I open the shape file the color of the blocks is uniform and does not show much information (image 1). I was trying to look for possibilities and a recommendation was to load the .xml file as a style manager in the layer of the shape file, but the error I get is INCORRECT ROOT TAG IN STYLE: PAMDataset (image 2).
I loaded the tif into QGIS and it is well georeferenced, should I try to add the .xml here?
I don't seem to find a way to add it as a style because the type of file does not correspond.


texts:
How to pull crs information from a world file when reading an image using python GDAL or Rasterio?
The images I am reading to not have in built metadata, it is stored in the projection file (.prj) and world files (.tfw or .jpw for tiff and jpg files, respectively). When I read these images using python GDAL or Rasterio, it ignores these metadata files and therefore does not read any coordinate metadata.

How would I go about reading these files?

Edit 1.
Code example:
Using python 2 (Anaconda distribution).
I want to read an image file and get it's bound box.

image1.prj
image1.jgw
image1.jpg

import rasterio
img = rasterio.open('image1.jpg')

bounds = img.bounds
crs = img.crs
transform = img.transform

When the code is run, the following warning appears:

C:\Anaconda2\lib\site-packages\rasterio\__init__.py:193: UserWarning: Dataset has no geotransform set.  Default transform will be applied (Affine.identity())


texts: How to implent a "maketrans" python function on field calculator

texts:
i'm traying to implent python string translate function at field calculatore
http://www.tutorialspoint.com/python/string_translate.htm
in order to fix hebrew imported from cad. here is the code -

def Ttxt (RefName):
  from string import maketrans
  intab = "asdfghjkl"
  outtab = "שדגכעיחלך"
  return trantab = maketrans(intab, outtab)

Ttxt( !RefName! )

Any sugestion about how to right this function ?


texts: Adding features to ArcGIS Feature Service in QGIS?

texts:
I use Collector for ArcGIS to collect data in the field, and I'd like to have collaborators w/o ESRI logins be able to contribute data to my project GIS using QField. I was hoping it would be as simple as adding the ArcGIS Feature Server url in QGIS; but after doing that, I can only view existing features in the feature service, not add new features (Add Point Feature is greyed out).

Any ideas on if it is possible to add new features to ArcGIS feature service using QField as a client instead of Collector?


texts:
I merged the shape file of the Los Angeles county ("LA_shp") with a cross-section cvs containing a certain number of variables and their respective values for the different areas of the county (each one identified by its own id):
LA <- merge(LA_shp, cross_section_LA, by='id')

and then I constructed a spatial polygon dataframe, "spdf". When I want to visualize on a choropleth map the variable "crime.rate" (my dependent variable) belonging to the cvs dataset, I simply write:
spplot(LA, col.regions = pal, cuts = 8 , colorkey=TRUE, "crime.rate", main = "crime.rate")

Then, I run a geographically weighted regression and created a dataframe, "D", of the coefficients for each area for the three independent variables ("X", "Y", "Z"). I then modified the values of the coefficients of the three independent variables (for methodological reasons) and subsequently converted the dataframe D into a matrix, "M", (which always consists of the three vectors denoting the independent variables "X", "Y", "Z", with their corresponding values for each area). I have two questions. How can I plot the values of the vector "X" on the LA shapefile?
I tried:
spplot(M$SDF, c("X"), col.regions = pal, cuts = 8 , colorkey=TRUE, main = "X")

but it doesn't work.
The second question is: how can I plot the values of the vector "X" on the LA shapefile but only belonging to a certain range? (the values of "X" are positive integer and I want a map which only displays the values of X < 10).


texts: Ubuntu 16.04 and 18.04 won't install Version 3

texts:
sudo apt install qgis

installs 2.8 (on 16.04) or 2.18 (on 18.04), but I would like to install version 3 (especially the 3.10 ltr) so I've tried:

sudo add-apt-repository https://qgis.org/ubuntu-ltr

which works as at the bottom of /etc/apt/sources.list there is:

deb https://qgis.org/ubuntu-ltr xenial main
# deb-src https://qgis.org/ubuntu-ltr xenial main

But this doesn't change what's installed - apparently that repository can't be used - I'm told by apt update:

Get:16 https://qgis.org/ubuntu-ltr buster InRelease [3,687 B]
rr:16 https://qgis.org/ubuntu-ltr buster InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51F523511C7028C3
Reading package lists... Done
W: GPG error: https://qgis.org/ubuntu-ltr buster InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 51F523511C7028C3
E: The repository 'https://qgis.org/ubuntu-ltr buster InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.

I'm also told:

N: See apt-secure(8) manpage for repository creation and user configuration details.

So apparently I need a key to securely acquire 3.10 from the ltr repository

Following the debian ubuntu instructions, I entered:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key
51F523511C7028C3

and while that stopped update complaints, I still can't install qgis because it complains about broken packages.

Set up a 16.04 image and did sudo apt update then upgrade then and autoremove.

Following the suggestion from Eric Gagné, I added the update command as well.

I tried 3 different of these

First

By just adding update:

$ sudo add-apt-repository https://qgis.org/ubuntu-ltr
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key 51F523511C7028C3
$ sudo apt update
$ sudo apt install qgis
$ qgis &

It runs but it's version 2.18.

Second

I added $ sudo apt upgrade after the update command.
It runs but it's also version 2.18.

Third

I changed to remove the ltr so as to try to get 3.12

$ sudo add-apt-repository https://qgis.org/ubuntu

I didn't use $ sudo apt upgrade this time.
It runs but it's version 2.18.

So adding the extra update lets it run - but I don't get version 3???


texts: Creating a data store from a GetCapabilities WFS URL

texts:
I'm coding a geoserver manager with geoserver rest api (version 1.7) and I'm looking for a function that can create a data store from a GetCapabilities WFS URL.

Inside Geoserver, I go to "Store - Add new store - Web Feature Server", but I'm not sure if I can do that programmatically.

I don't want the code done, of course, but only the class I can use to get there.

I've looked for a function inside every data store related class here http://demo.geo-solutions.it/share/github/gsman/apidocs/index.html?it/geosolutions/geoserver/rest/GeoServerRESTPublisher.html but I wasn't succeeded.

Is it possible to code?


texts: Syntax error when switching basemaps using Esri Leaflet?

texts:
I'm kind of new at using Leaflet and have a question for an issue that keeps popping up.

I'm using the code from the example here:

https://esri.github.io/esri-leaflet/examples/switching-basemaps.html

Everything works fine using this code, however I want only the Streets and Imagery options in my drop-down with Streets as default.  Therefore I have:

        <select name="basemaps" id="basemaps" onchange="changeBasemap(basemaps)">
            <option value="Streets">Streets</option>
            <option value="Imagery">Imagery</option>
        </select>

When I load the page like this, I receive the following error:

JavaScript critical error at line 1, column 66683 in https://static.arcgis.com/attribution/World_Street_Map?callback=window._EsriLeafletCallbacks.c0&f=json\n\nSCRIPT1002: Syntax error

Any thoughts?  I can simply continue and the page loads normally, but why is this happening?

Using Visual Studio and IE11.


texts: adding a Color Picker to the Configurable Map Viewer (CMV) Draw tool

texts: how can i add a color picker to the CMV Draw tool like the one in the flex app?


texts: Adding column in attribute table with values sampled from raster using QGIS

texts:
I am working with QGIS. I have a file with many points, and I would like to sample their values from a raster.

How can I add a column in the points' attribute table and fill it with the raster values?


texts: Is it possible to join points to a polygon in MapInfo Professional v10.0?

texts:
This is what I have...

... and I would like to assign the points to the polygons that they belong to. In ArcGIS this is accomplished fairly easy through using Spatial Join, but I have no clue how to do this task in MapInfo Professional v10.0.


texts: How to use a SLD file from the QGIS console?

texts:
How to apply a SLD file to a layer in QGIS from the QGIS console?

I tried this but it didn't work:

# selecting the layer
layer = iface.activeLayer()
# Apply SLD on the layer
layer.loadSldStyle("mystyle.sld")

It doesn't give a error. But I also don't get a result.


texts: How to use iterators in ModelBuilder to create new feature?

texts:
I am attempting to use ModelBuilder to automate the process of plotting parcels of land that are related to mineral leases.

The existing lease feature class contains information related to reference document information, such as volume and page.

I am using a database populated with information pertaining to new leases, containing lease ID and reference deed volume and page.

Many of the new leases I plot refer to polygons that have already been plotted and refer to the same deed volume and page.

What I would like to do is create a model that will select features from the existing lease feature class based on the VOLUME and PAGE attributes in my database, copy/paste that feature into a separate feature class (editing layer from which features are loaded into the lease dataset), and populate the fields of the newly copied feature with the lease ID from my database.

I believe iterate row selection could be the best first step, but I am unsure where to go from there.

This is the most complicated ModelBuilder project I have worked on so any information or suggestions would be a huge help.


texts: measure tool and layer search overlap -qgis2web

texts: why is it that when I activate measure tool and layer search in Ol3 qgis2web, they overlap on each other. Any solution please


texts: Reprojecting CORINE raster to MGI Balkan 7 in QGIS

texts: I can not save raster from CORINE land cover 2012 land use in different coordinate reference system. I want to change it to MGI Balkan 7 but I get the following error:


texts: Calculating volume of several TINs in ArcGIS Desktop

texts:
I am trying to calculate the volume of several TINs using the 3D Analyst of ArcGIS 10.5.
My data can be found here: https://drive.google.com/open?id=1ERFdsqDGLH1a_FbxwawE_gPm0Au0Q9vT

For a start, I clipped the TIN data set to just one TIN and calculated the volume with reference plane = "BELOW" and height field = "None", which in my understanding means that ArcGIS takes the highest point of the TIN. The calculated volume seemed to check out.

However, when I take my whole data set (with about 300 TINs) through the same process the calculated volume for each TIN gets unreasonably large while the area only slightly differs.

Do I have to provide an input to the height field?

If I understand correctly, it would have to come from the attribute table of the input feature class. But I haven't figured out a way to extract the highest point of a TIN let alone save it as a new column in the attribute table of my shapefile.

Am I on the right track or do I need to do something completely different?


texts: Why are ArcGIS 10.2.1 for Server services stuck in perpetual Stopping... state?

texts: Running into a problem repeatedly with our ArcGIS Server installation where all services are in a perpetual state of "Stopping..." whenever we do an upgrade (just upgraded from 10.2 to 10.2.1). The same thing occurred when we changed the ArcGIS Server account from a local account to a domain account. The services cannot be stopped and started manually. Restarting the ArcGIS Server service does not seem to help either. Rebooting the server that ArcGIS Server is running on does not help with this issue either.


texts: How to change field length with ArcObject?

texts:
I want to change some string field in sdegeodatabse with bellow code. The code are running without any problem. but after running, filed length return to default length. What am i missing?

static void writetablecode(IDataset dataset)
        {
            ITable table = dataset as ITable;

            IFieldsEdit fields = table.Fields as IFieldsEdit;
            for (int i = 0; i < fields.FieldCount; i++)
            {
                IFieldEdit field = fields.Field[i] as IFieldEdit;
                if (field.Type==esriFieldType.esriFieldTypeString & field.Length<30 )
                {
                    field.Length_2  = 30;
                }

            }
        }


texts: QGIS Heatmap plugin how to convert resulting raster values to meaningful values for legend

texts:
I am using QGIS and heatmap plugin and I need help with finding the meaning of the resulting raster values. I know there have been some questions, but none of them helped. This is my point layer input

This is a print screen of the settings of the heatmap plugin

And finally this is the resulting raster with minimum and maximum values. I need to convert these values to some meaningful values to get a reasonable legend. Do you know how the raster values are calculated?


texts: Is there an easy way to refresh / update a raster tif file in GIS?

texts:
Apologies for the newbie / basic question, but it seems to be a fairly simple concept which I can't get to work properly, and I'd be really grateful for a pointer or two!

I have a load of different georeferenced raster tif maps loaded into ArcGIS (9.2). If I update the content of one of these maps in a program outside of GIS, (i.e. photoshop or equivalent,) I want the most up to date map to show in ArcMap the next time I open it. It's linking to the file in windows, so surely it's straightforward enough to refresh the link?

Right now, I don't know how to do this without either removing the map from the GIS file and re-adding it, or navigating to the file in windows and deleting the .aux and .rrd files, which is annoying. Surely there is a setting or an easy function I can use to do this? (Please say yes?!)

I would be much obliged if anyone could offer any advice.

Thanks,

Lisa

P.S. I am just learning to GIS, and have no Python experience as yet, so please be gentle!


texts: Calculating area between two line shapes using QGIS?

texts:
I'm new to using QGIS (2.0).

I'm trying to calculate the sidewalk area of a city.

For that I have some shapes, extracted from Bentley Microstation, with the topology (facades, fords, fences, etc...), but they are in line shapes.

I have merged them in only two shapes: exterior line and interior line limits.

I've tried to convert them to polygon, with the idea to use the "difference" tool after that, but I wasn't able to do it.

I tried to use:
"Geometry tools --> Lines to polygon" but it doesn't work, causing lots of holes and mistakes.
"Geoprocessing tools --> Convex hull(s)" is not the way because I will need to do so many polygons and it will be an incredible waste of time.

Any ideas?


texts: ArcGIS Pro 2.5.0: Trouble with using new deep learning tools for object detection - Failed to execute (TrainDeepLearningModel)

texts:
I am new to deep learning and convolutional neural networks, and I am trying to classify weeds in a sorghum field using the new deep learning tools in ArcGIS Pro 2.5.0. I am trying to use object detection to detect two classes, crops and weeds. In the following photo, you will see that I have labeled the orthomosaic photo for deep learning (1000 samples within the crop and weed classes, respectively):

Red boxes indicate samples of crops, whereas black boxes indicate samples of weeds.
After labeling the data, I exported the data to the directory ArcGIS\Projects\dl\LabeledObjects\dl_correct_clip_tif\202009021522294116687, with the Meta Data Format as KITTI Labels.

Having exported the training samples, I then tried to train the deep learning model using the Train Deep Learning Model tool, with the following parameters. The Input Training Data parameter was the name of the file that was saved.

However, running the model gives the following error:
 Traceback (most recent call last):
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\TrainDeepLearningModel.py", line 145, in <module>
    execute()
  File "c:\program files\arcgis\pro\Resources\ArcToolbox\Scripts\TrainDeepLearningModel.py", line 110, in execute
    data_bunch = prepare_data(in_folder, **prepare_data_kwargs)
  File "C:\Local\ESRI\conda\envs\deeplearning\Lib\site-packages\arcgis\learn\_data.py", line 574, in prepare_data
    raise NotImplementedError('Unknown dataset_type="{}".'.format(dataset_type))
NotImplementedError: Unknown dataset_type="KITTI_rectangles".
 Failed to execute (TrainDeepLearningModel).

What could be causing this, and how is it fixed? I went back and exported the training samples using a Meta Data Format of Classified Tiles, but then I was unable to perform an object classification, as only "pixel-based" classification algorithms were present.
Any help would be wonderful!


texts: QGIS Madeira does not connect to WMTS service

texts:
Working with a new laptop HP zbook and Windows 10.
QGIS Madeira doesn't connect to any WMS service.

  Error: 2019-03-14T09:57:34     CRITICAL    Ongeldige Laag : Raster
  layer Provider is ongeldig (provider: wms, URI:
  tileMatrixSet=EPSG:28992&crs=EPSG:28992&layers=2016_ortho25&styles=default&format=image/jpeg&url=https://geodata.nationaalgeoregister.nl/luchtfoto/rgb/wmts?request%3DGetCapabilities%26service%3DWMTS)

  2019-03-19T10:26:05     WARNING    Downloaden van capabilities
  mislukt: Error creating SSL context (unsupported protocol)

Up to now I worked with Windows 7 without any problem.

Does anyone recognise this problem?


texts: How to change position of legend in levelplot of rasterVis in R?

texts:
By default legend is plot right side and I want to change it to bottom of plot.

levelplot(CHL1, xlim=c(30,130), ylim=c(-20,30),
          xlab="", ylab="", margin=FALSE, col.regions=pal,
          at=seq_along(brks), colorkey=ckey) +
    layer(sp.polygons(msk, fill='black', col='transparent'))


texts: Calculating distances from one reference point to multiple points in one shp file

texts:
I am a total novice to GIS; I read some of the answers to similar posts, still have difficulties to do it. I am not that familiar with GIS or QGIS and am looking for a step by step approach.

Here is what I am asking to be clearer:
I have individual animals with ID, date of observation, and location of observation in decimal degrees in a xl sheet. Some individuals have been observed several times. I would like to get distances in km between the first observation location and all subsequent observations (for example, an animal was seen in 2005 at point xy, and then again in 2006 at x1y1, and in 2015 at x2y2. I am trying to find the distance between xy and x1y1, and xy and x2y2 for all individuals where I have >2 observation locations). I made shapefiles from the xl sheet by using the xy coordinate function, so the shapefile works, just do not know how to calculate the distance, if I can do it from one shapefile, or if I need 2 files (original location as file 1 and all subsequent locations in a separate shapefile?). I hope this is clearer.

My file (1 shp file) consists of 100s of individuals (they have IDs) and observation locations. So an individual has been seen at point a, b, c, d. I am interested in getting all distance values for each individual's observations from a reference point (usually the first observation point) (i.e., ind 1 was seen at a, b, c, d, so I would like to get distances for a-b, a-c, a-d.

I have created 2 new shape files now; one with the first location, the second with all subsequent locations of the individuals. When I use the point distance tool and use the original location layer as first layer and the subsequent locations as the second layer no table with distances is calculated. I tried also to use the OD matrix and used the original file with all locations but this file was not accepted into the tool window. Do the attribute tables have to have a specific format with date and time, locations, etc? I really need somebody who can guide me through this step by step or if there is a tutorial youtube that would help. All the other answers are already too technical for me especially when they go ito the code-writing.

How do I go about this?


texts: Raster and shapefiles are not overlapping in matplotlib?

texts:
I plotted a raster map using matplotlib. When I overlay a shapefile, the raster seems to be shifted a bit.

The same raster and shapefile overlap each other perfectly in ArcGIS.

Here is what I am trying,

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
from matplotlib.pyplot import *
from osgeo import gdal
from numpy import linspace
from numpy import meshgrid
import numpy as np

ds = gdal.Open('Path\\\To\\Raster.tif')
data = ds.ReadAsArray()

gt = ds.GetGeoTransform()
proj = ds.GetProjection()

xres = gt[1]
yres = gt[5]

xmin = gt[0] + xres * 0.5
xmax = gt[0] + (xres * ds.RasterXSize) - xres * 0.5
ymin = gt[3] + (yres * ds.RasterYSize) + yres * 0.5
ymax = gt[3] - yres * 0.5

x_center=(xmin+xmax)/2
y_center=(ymin+ymax)/2

fig = plt.figure(figsize=(18, 10))
ax = fig.add_subplot(111, axisbg='w', frame_on=True)

m = Basemap(llcrnrlon=xmin,llcrnrlat=ymin,urcrnrlon=xmax,urcrnrlat=ymax,
             projection='merc', lat_0 = y_center, lon_0 = x_center)
m.readshapefile('Path\\To\\Shapefile.shp','units', color='#444444', linewidth=0.5)

parallels = np.arange(15.,30.,0.25)
m.drawparallels(parallels,labels=[1,0,0,0],fontsize=12, linewidth=0.4)

meridians = np.arange(70.,90.,0.25)
m.drawmeridians(meridians,labels=[0,0,0,1],fontsize=12, linewidth=0.4)

x = linspace(0, m.urcrnrx, data.shape[1])
y = linspace(0, m.urcrnry, data.shape[0])

xx, yy = meshgrid(x, y)
p=m.pcolormesh(xx, yy, data)

plt.show()

How to adjust this shift?


texts:
For context I am working with a .tif file that I have warped and changed all nodata values to -9999.

Is there any way with GDAL to take all values from this .tif file that are greater than -9999 and convert them to another value?

I have tired to do this with ogr2ogr but I don't know enough SQL to make that work.


texts: How to set the font size of ITextElement if only know Height of the text?

texts:
When I read text elements from a .dgn file. I only can get the "height", "length" attribute of the text (it doesn't have a "size" attribute) (example: total height = 0.9; total length = 8.6).

I need to add these text elements into a PageLayout of Arcgis. I used the IFontDisp to identify font attributes for text. It requires to identify the "size" attribute. How can I know that ?

ITextElement pTextElement = new TextElementClass();
IFontDisp pFont = new StdFontClass() as IFontDisp;
pColor = new RgbColorClass();
pColor.Red = 0;
pFont.Name = fontName;
pFont.Size =  **???**
pFont.Weight = weight;


texts:
I want to compute the fewest turns and fewest accumulative angle change from a single origin to a set of destinations.

The origin and destinations are shown on this map. The flag is the origin, all the other points labelled with a number are the destinations.

As the origin and destinations are not located on the link, firstly, I find the nearest link ID of each origin and destinations. Secondly, I want to use Integral Analysis to compute the fewest turns(and fewest accumulative angle change respectively) from the origin to each destination and get a new field in the shapefile recording the number of turns from the origin to each destination.

Or record the fewest accumulative angle change from the origin to each destination.

The roads are two ways.

In routing and analysis metric, I choose ANGULAR.

Radii: n

Radial metric:ANGULAR

Weighting: Link

Is my selection right?

I am confused between Routing and analysis metric and Radial metric, and weighting, Origin weight, Destination weight, Custom metric field, Intermediate link filter, Advanced config

How to fill in the other sections:

Using @Sideshow Bob 's answer, I tried the accumulative angle change using Specific Origin Accessibility Maps.The setting is as follows:

And the output shapefile's attribute table is as follows:


texts:
I'am using a Clipper transformer in my workbench with ~30.000 features of clippers an ~20 clippees and running it takes a lot of time.

So I was wondering if there is any possibility to accelerate the clipper transformer, espacially beacause I'm using it more than once in my workbench.

I already had a look at this: https://knowledge.safe.com/articles/579/performance-tuning-fme.html
So I removed all Attributes before, feature caching is disabled.

I thought, maybe some preprocessing might help like usinge an Aggregator or dissolver, but it didn't seem to.


texts: Extract x-, y- an- z-coordinates to a table using QGIS

texts:
I try to measure specific points and extract the x-, y-, and z-coordinates to a table which I later can export. Further I want to give each point an automatically generated id. By creating a new vector layer for the points, it is no problem to add the x- any y- coordinates to the attribute table using the field calculator ($x and $y), but I can't find a way to extract z-coordinates from a dtm into that list. I converted it to a shapefile but still wasn't able to get the data.

Yes I tried that, but it only seemed to measure when I clicked at one of the generated points. Furthermore my Attribute table is quite huge due to the big DEM I use, which results in a Long loading time. In this case I would need a new table to generate the data in. Next question is what code is needed in the field calculator, because just $z isn't working...


texts: Inputting Multiple XY Data from a .csv file in ArcMap to Create Flow Lines

texts:
I am doing a project where I need to create a flow map in ArcMap 10.4.1.

I have imported the data from an Excel spreadsheet that I put together. The problem I am having is that when I Create A Feature Class from XY data, it only allows me to input one set of XY data. I have two sets of XY data in the spreadsheet (SiteUTMs and SourceUTMs), and need both in order to create the flow map. I cannot figure out how to get Arc to recognize the other set of XY data as coordinates to be an option in the dropdown menu in the XY to a Line tool. I tried reordering the columns in the spreadsheet to have the second set of XY data to be first in the spreadsheet, but Arc still only recognized the first set of XY data (the SiteUTMs), not the ones that I needed to add (the SourceUTMs.

I do have two other layers (one point and one polygon) that contain the information of the other XY data I need (the SouceUTMs), but there are two issues I am having with that. First, I cannot get Arc to join the layers and attribute tables with a join or relate. Secondly, in the XY to a Line tool, it only lets you input one layer source, so I cannot input both layers into the tool to have both sets of XY data that the flow lines need.

Here is a screenshot of the excel spreadsheet:


texts:
My project currently uses GeoServer 2.6.2 to serve out a few WFS and WMS layers to our application.
The results of some penetration testing raised the fact that GeoServer can be called with GetCapabilities which will then give out some juicy information that could be used against us.
Is there a way, specifically from within GeoServer, that you can disable the GetCapabilities requests or block them?
There is currently no need for the operation as we only use it ourselves.


texts: geopandas - How to spatially join based on maximally overlapping feature

texts:
I have a gdf of climate zones in CA and one of counties. Multiple climate zones often overlap a county, but I want to assign a county to be the climate zone that takes up the most area in a county.

Below is my code thus far, but it oddly says only climate zone 16 overlaps any counties, so there is a big problem.

import geopandas as gpd

counties = gpd.read_file('tl_2017_us_county/tl_2017_us_county.shp')
counties = counties[counties['STATEFP'] == '06']

climate_zones = gpd.read_file('BuildingClimateZonesMap/CA_Building_Standards_Climate_Zones.shp')
counties.crs = climate_zones.crs
test = gpd.sjoin(climate_zones, counties, how='left', op='intersects')

Here are the links to the data:
http://www.energy.ca.gov/maps/renewable/building_climate_zones.html
https://www.census.gov/cgi-bin/geo/shapefiles/index.php?year=2017&layergroup=Counties+%28and+equivalent%29


texts: How to overlay country map on Google world map in OpenLayers?

texts: I am creating one map. So I want to overlay country map on Google world map. I am trying with the OpenLayers.Layer.wfs() function, but I am not getting perfect solution. If anybody knows the solution please give me reply.


texts: Fixing performance problem in PostGIS ST_Intersects

texts:
I am new to PostGIS and I have a problem in query performance.

This my query:

SELECT DISTINCT ON (userid) userid ,ST_AsText(position), timestamp
FROM table1
WHERE ST_Intersects ( ST_GeomFromText('a multiypolygon geom goes here',4326),position)
ORDER BY userid, timestamp desc

and the problem is my multipolygon include VERY large polygons (600 pages long in word doc!) and it took more than 2 hours to execute!

Is there a way to optimize my query or use another way?


texts: Buffer (for 8 points) is set at 1 kilometer but is bigger than village polygons

texts:
Other details

This is in the Philippines and I'm using WGS_1984_UTM_Zone_51N
The buffer is 1km long so it must be the map layer that is wrong
I tried the Geodesic method instead of Planar but still got the same problem
Posted on r/gis and r/arcgis and am still lost on what I'm doing wrong so I posted here

Is the extent perhaps wrong?


texts: QGIS2web Export open layers map as PDF, PNG or JPEG

texts:
I want to have an option to export my map as the PDF
I would like to use the example from here:
https://openlayers.org/en/latest/examples/export-pdf.html
but it doesn't work unfortunately. All the issues have been described here:
https://github.com/tomchadwin/qgis2web/issues/934
it looks like I need to set the server for this.
Here is also the solution:
https://talk.observablehq.com/t/save-a-map-openlayers/2598
which I don't really understand
I think everything is related to the issue here:
https://github.com/openlayers/openlayers/issues/10593
In all the cases I can't use the stuff
 import 'ol/ol.css';
 import Map from 'ol/Map';

and so on, because I am getting an error:
because the console says:
Cannot use import statement outside a module
related to this query:
https://stackoverflow.com/questions/58211880/uncaught-syntaxerror-cannot-use-import-statement-outside-a-module-when-import
https://github.com/TypeStrong/ts-node/issues/922
https://github.com/vercel/next.js/discussions/15957
I found another hint here:
Export map with legend using OpenLayers 6
but seems to be not suitable for my case
In the other side, the code presented here:
https://stackoverflow.com/questions/64823306/save-openlayers-map-as-pdf
returns the blank PDF document.

The final question is - does anyone know how to export map from Openlayers to PDF, PNG or JPEG without any import operator and additional server requirements?
I could need something like this:
https://codepen.io/barbalex/pen/raagKq


texts: Extract values by matching points in ImageCollection

texts:
I am trying to extract pixel values by points and convert to a table in Google Earth Engine. I'd like to extract pixel values by lat,lon points I upload from a csv for each S2 image with a matching date. Before using the entire csv (3000+ points), I created two random points and am following the code in this post to extract points. However, the table it output looks like this. I'm not sure why only MSK_CLDPRB, MSK_SNWPRB, QA10, QA20, and QA60 are showing. I'd like all bands to be present. Can anyone steer me in the right direction?

// random points to create a FeatureCollection
var p1 = ee.Geometry.Point([-76.353, 39.094])
var p2 = ee.Geometry.Point([-76.133, 38.03])
var pts = ee.FeatureCollection(ee.List([ee.Feature(p1),ee.Feature(p2)]))
print(pts)

// Cloud Mask function
function maskS2clouds(image) {
  var qa = image.select('QA60');

  // Bits 10 and 11 are clouds and cirrus, respectively.
  var cloudBitMask = 1 << 10;
  var cirrusBitMask = 1 << 11;

  // Both flags should be set to zero, indicating clear conditions.
  var mask = qa.bitwiseAnd(cloudBitMask).eq(0)
      .and(qa.bitwiseAnd(cirrusBitMask).eq(0));

  //apply scaling factor and add prevent loss of timestamp
  return image.updateMask(mask).divide(10000)
    .copyProperties(image, image.propertyNames());
}

// Load Sentinel-2 TOA reflectance data.
var S2 = ee.ImageCollection('COPERNICUS/S2_SR')
           //.filterDate('2017-03-28', '2020-05-20')
           .filterDate('2020-05-01', '2020-05-20')
           .filterBounds(ee.Geometry.Point(-77, 39))
           .map(maskS2clouds);

print(S2);

// Empty Collection to fill
var ft = ee.FeatureCollection(ee.List([]))

var fill = function(img, ini) {
  // type cast
  var inift = ee.FeatureCollection(ini)

  // gets the values for the points in the current img
  var ft2 = img.reduceRegions(pts, ee.Reducer.first(),30)

  // gets the date of the img
  var date = img.date().format()

  // writes the date in each feature
  var ft3 = ft2.map(function(f){return f.set("date", date)})

  // merges the FeatureCollections
  return inift.merge(ft3)
}

// Iterates over the ImageCollection
var newft = ee.FeatureCollection(S2.iterate(fill, ft))
print(newft)

// Export
Export.table.toDrive(newft,"extract_test");

Link to code


texts: Is it possible to see which Landsat bands were used most, when creating kmeans clusters?

texts:
I am using kmeans clustering (ee.Clusterer.wekaKMeans) to classify a Landsat8 image using all 11 bands. I was wondering if it is possible to see what bands are relied on most to create the clusters (i.e., in what bands are the greatest differences, that have been used to differentiate clusters?) Because I am using unsupervised classification, I want to give the kmeans clusterer all the information possible (all 11 bands), but I also would like to be able to dig into the clustering process to see how those bands were used to create the resultant clusters.

Specifically, I want to identify water. Water is often identified using the NDWI ratio (green and NIR bands), but kmeans using these two bands produces a different result than kmeans using all 11 bands. So I want to know which other bands are influencing the clustering!

Is this possible using GEE's clusterer tool?


texts: How to attribute lines with IDs of touching polygons?

texts:
I have two shapefiles: one contains streets of a city and one contains blocks (i.e. polygons bounded by the streets). I would like to have the streets attributed with the IDs of the left and right polygons.

Is there a way to do that in ArcGIS?


texts:
I have an OSM map on which I display a GeoJSON file (point).  I'd like to create a popup on click for each point to show attributes.

I can't find a sort of very basic step by step tutorial to do that, even on OpenLayers 3 examples.

Does anyone have some useful links?


texts: GDAL 3.0.4, Proj 7.0.0. ogr2ogr says "Unable to open EPSG support file gcs.csv"

texts:
I am building GDAL 3.0.4 on Windows. GDAL 3.0.4 depends on PROJ. I have chosen PROJ 7.0.0, which depends on Curl, Libtiff, and Sqlite.

I have successfully built all of the dependencies as shared libraries from source. The final output is a GDAL devinstall Release build, which I install to ...\gdal_304_devinstall.

I am able to call GDAL executables in gdal_304_devinstall\bin (ogrinfo.exe, gdalinfo.exe, etc.), and I am also able to call the C++ API using files in gdal_304_devinstall\lib and gdal_304_devinstall\include.

As a test of functionality, I am doing a transformation of a shapefile from EPSG 4326 to EPSG 3857. This task succeeds when I do it through the C++ API. However, it fails when I try to use the command line:

D:\shapefiles>PATH=%PATH%;C:\Users\[USER]\bin\gdal\gdal_304_devinstall\bin
D:\shapefiles>set GDAL_DATA=C:\Users\[USER]\bin\gdal\gdal_304_devinstall\data
D:\shapefiles>set PROJ_LIB=C:\Users\[USER]\bin\proj\proj-7.0.0\inst\share\proj # (contains proj.db)
D:\shapefiles>ogr2ogr -s_srs EPSG:4326 -t_srs EPSG:3857 foobar.shp input.shp
ERROR 4: Unable to open EPSG support file gcs.csv.  Try setting the GDAL_DATA environment variable to point to the directory containing EPSG csv files.
ERROR 1: Failed to process SRS definition: EPSG:3857

I am pretty confused by this. First, I did not expect GDAL to look for a .csv. I thought these were deprecated when GDAL took PROJ as a build dependency. https://github.com/OSGeo/gdal/blob/v3.0.4/gdal/NEWS, "Implement RFC 73".

Second, I am not sure how the transformation succeeds when using the C++ API but not when using the command line. I have informed my C++ program about the location of proj_7_0.dll, but not about the location of proj.db, so I am not sure how it knows how to do the transform. Does it have something to do with the INCLUDE_OGR_FRMTS flag in makefile.vc? I have built GDAL with that both on and off, doesn't seem to fix command line.

Third, and this is odd, if I point GDAL_DATA to the data dir for a much older version of GDAL (2.0.4, which I downloaded precompiled), the command line works! I assume this is some kind of backwards compatibility kicking in.

Finally, as a last resort, I redid the build process using PROJ 6.3.1, but got exactly the same behavior.

Any clues? I don't have a good sense for how the EPSG transform data should be propagated in a modern GDAL build.


texts: Alternative to Spatial Query on large data

texts:
I have around 110000 points data spread around the world. the shapefile size is 116 Mb. I want to select points which are inside asia.

I have been using qgis but this time qgis is not being able to process it (It gives a not responding message, and even after waiting for 10 min, it does not respond). I have tried it with qgis version 1.8 and 2.2.

Is there a method to perform this kind of large operation successfully?


texts: I have more than >100 shp files (each one contain points). I would like to make polygon around particular shp (scale is not necessary, should be zoomed). I have already printed them but it would be great to make one illustrative map where they are located. So as a result one map allow to recognize where thea are located (if proper labelled of course). Is there any tool (arcgis) which will automate generate polygons around each one?