texts: How to merge/cluster smaller contiguous polygons to form larger ones?

texts:
Any help you can give an inexperienced college GIS user would be greatly appreciated.

I am using both ArcGIS ArcMap 9.3 and 10 on desktop (i.e. not online), and the only info I can find on License Type on college computers is 'ArcInfo'.

I have a set of forestry data that maps forestry type (species/age class etc) for a small country. With this data I am attempting to evaluate suitable habitat by identifying woodlands over a certain size (>200ha) with particular make up of tree species (mostly coniferous/broadleaf).

The problem I am having is that the shapefile has polygons made according to individual tree species. Is there a way to cluster the individual tree species, so I can attain one larger polygon for the entire woodland, and thereby have an area value for the woodland as a whole, instead of the individual parts (both due to seperate species, or division due to a fence, for example).

There are thousands of polygons in the dataset, so it is not feasible to get the sum individual ones, with the time I have available to me.


texts: Incorrect placement of a MrSid file in QGIS

texts: I have a map saved as MrSid file which when loaded in QGIS displays as a southern hemisphere location despite being in the UK.  When looking at the .sdw file the northing is positive but in QGIS it shows as negative.  Adding a minus sign to the northing in Notepad and resaving still displays it as a negative value. How can I correct this?


texts: QGIS symbology: How to apply outer glow to just one side of a line?

texts:
At 3.10.3, I can successfully apply an outer glow to a line, as with the orange example here:

I would like to have the glow on just one side of the line but I cannot find a way to do that.  Thanks in advance.

EDIT:

Following ahmadhanb's instructions, here are my before and after screenshots, with the basemap removed for clarity:

Before:

After:

The glow is shifted to the lower-right.  Unfortunately it does not stay "locked" to just one side of the lines.  I also adjusted some of the other Transform properties, but did not find a suitable way to solve my original question.


texts: How to avoid self-intersections in geometry created by GDAL Polygonize in Python

texts:
I am creating geometry from a raster using GDAL Polygonize in Python. My issue is that doing this creates a lot of self intersection errors. This seems to occur due to the nature of the pixel grid.

I have noticed that this occurs mostly at edges, but can sometimes occur inside the geometry as well, as shown below.

This is part of an automated pipeline so I don't want to manually fix self-intersections in QGIS or the like; the solution needs to be able to be implemented in Python code.

Is there a way to either stop the self intersections being created in the first place, or a way to clean the generated geometry in Python?

I have tried to use shapely to clean the self intersections but the result is very poor.


texts: Changing field values with ArcPy cursor?

texts:
I would like to change the value of one field in the table base on the value from another table

This syntax does not work.

  Parsing error SyntaxError: invalid syntax (line 6)

fc = 'Dudley_vehicles'
fields = ['Location', 'Location_E']

with arcpy.UpdateCursor(fc, fields) as cursor:
    for row in cursor:
        if row[0]=1:
            row[1]=392713
    cursor.updateRow(row)

CODE

fc = 'Dudley_vehicles'
fields = ['Location', 'Location_E']

with arcpy.da.UpdateCursor(fc, fields) as cursor:
    for row in cursor:
       if row[0] == 1:
           row[1] = 392713
        cursor.updateRow(row)

IS GIVING ME:

  Parsing error IndentationError: unindent does not match any outer indentation level (line 8)


texts:
For QGIS there is already a method to measure loading times of plugins ( qgis.utils.plugin_times):

How to tell which QGIS plugins are slow to load?

Is there something similar to measure loading times of the parts of q QGIS-project (layers, composer ...)?

I found something in the cpp part (qgsbench.cpp)
https://github.com/qgis/QGIS/blob/530397c1683cc787ef90bc27e2d958779ed0d754/tests/bench/qgsbench.cpp
so perhaps there is also a way to get things measured with python/pyqgis.


texts: Matching Census Block Groups from different decades to show percent change?

texts: I know for Census Tracts and Blocks there are relationship files, but what is the best way to match Census Block Groups from different decades to compare change?


texts: Why isn't my select by attributes query working?

texts:
I'm running ArcMap 10.1.

I have a point feature class joined to a table and am trying to query a field.

If I do [field] = 'TEST', it selects all the fields.

But if I do [field] LIKE 'TES%', it doesn't work.

Any idea why the LIKE command isn't working?


texts: qgis2web 3.7(qgis 3.4.5), cannot replace search box text, cannot see basemap

texts:
I have qgis2web 3.7 with qgis 3.4.5. There were two problems that I had.

Whenever I tried to export web map through qgis2web, the basemap was always missing. So, I had to add manually in html.
I wanted to change the default text in search box from "Search" to something link"Input an address to search" by changing code in index.html but it didn't show change on the page at all:

var osmGeocoder = new L.Control.Geocoder({
        collapsed: false,
        position: 'topleft',
        text: 'Search',
        title: 'Testing'
    }).addTo(map);


texts: Making ModelBuilder "Read only" for another user in ArcGIS?

texts: I created my model In ArcGIS and use it to run as a tool in ModelBuilder in ArcGIS and I want to give them my model to other people in my company to run it. As they are not into GIS and they don't know how to use it , I would like somehow to lock the model that they just could run it but they have no access to the model itself.


texts: Center OpenStreetMap at Location defined in specific Projection

texts:
I have: a location in the projection EPSG:31466 (new OpenLayers.LonLat(363273.29099999997,5770864.300999998), this is somewhere in Germany close to the dutch Border.

I want: to open OpenStreetMap and to center it at the respective Location.

I get: OpenStreetMap centered in eastern Greenland
If I uncomment maxExtent: config.maxExtent OpenStreetMap centered somewhere in the sea close to Ecuador.

What can I do / What is wrong?


texts: How to fill column with several conditions using QGIS field calculator?

texts:
I know the synthax in order to fill one field with only one condition  (field calculator):

case

When "attribut" = 'value'  then value

End

But how to do populate automatically one field with two or three or more conditions?

I tried the following command but it does not work :

case

When "attribut" = 'value" and "attribut number2" = 'value'  then value

End

Could you throw light for me?


texts: Find all Shorthest Paths between 262 Points

texts: Is there anyway to find all shortest paths between 262 points in ArcMap ? I have tried to use new route analysis in ArcMap, but it did not work. I could not understand what is the problem. I am getting unlocated error for some CSD coordinates.


texts: Calculating points in the USDA's Cropland Data Layer coordinate system

texts:
I need to integrate against the USDA's cropland data layer. They've got a demo and some API docs.

The important query I need to run is this, given an (x, y) of say (1551459.363, 1909201.537):

 http://nassgeodata.gmu.edu:8080/axis2/services/CDLService/GetCDLValue?year=2010&x=1551459.363&y=1909201.537

But coordinates are only useful if you know what coordinate system they belong to.  The documentation is rather sparse, but I found this information:

  The CDL is processed using the Albers Equal-Area Conic Projection with a spheroid of GRS 1980 and datum of NAD83. The downloadable zip files from the SARS website and CropScape are offered in the native Albers projection.

  In order to conform to Geospatial Data Gateway technical specifications, any CDL data downloaded through the Geospatial Data Gateway is reprojected from Albers to the dominant Universal Transverse Mercator (UTM) zone with a spheroid and datum of WGS84. The one exception to the UTM projection is for Wisconsin. Wisconsin is projected using the Wisconsin Transverse Mercator (WTM) projection. This WTM projection is based on the 1991 adjustment to NAD83, and is called WTM83/91.

So I headed over to PostGIS to look for a match (hopefully this wasn't too narrow):

SELECT * FROM spatial_ref_sys WHERE srtext ILIKE '%DATUM%83%SPHEROID%80%' AND srtext ILIKE '%albers%';

I found 17 matches, but the projections are all regional like "Texas Centric Albers Equal Area".

How do I boil this information down to the correct SRID?


texts: How to create pgrouting network from line and point layer data

texts:
I'm a beginner working with QGIS and PostGIS/pgRouting. The network I want to create consists of a multilinestring layer for the network itself and a point layer for the nodes of this network. The network layer has 2204 features/rows and the point layer has 2455 points. For the point layer, I also have data which allows to create the edge relationships together with costs for consideration later on and other attributes I want to combine and consider as criteria for routing.

I want to be able to create shortest paths between the points using the network layer.

This was the first script I tried to join the network and points,

select st_line_interpolate_point(st_linemerge(net.geom), (st_line_locate_point(st_linemerge(net.geom), pnt.geom)))
from net,pnt;

I ran into trouble due to the multilinestring property of the network layer, so I used the MMQGIS plugin to convert the multilinestring to linestring. But even then, I had to use st_linemerge with the network data. The conversion resulted in the linestring data consisting of 2240 features (versus the previous 2204)

Using this I thought I'll get 2455 rows (one per point), but ended up getting 5,499,200 points/rows (which is 2455 x 2240).

I can find many tutorials for pgrouting with road networks etc, but not one for my scenario where I have a network with the nodes separate.

Could someone please point me in the right direction how I can combine these two layers and set them up for pgrouting?


texts: Changing the color ramp in arcgis javascript

texts: Using the arcgis javascript api, I am displaying geotiffs. What I want to do is change the color ramp in these images. I've looked through the api and I have not seen anything. Does anyone know where I can get some examples of this?


texts: How to add GeoJSON info using HTML inner

texts:
I would like to add information about my GeoJSON file after "click". When I am using example from OpenLayers 3.14 it doesn't work. How should I do it?

When I click on the GeoJSON, below I see "undefined". My script is:

<!doctype html>

    <link rel='stylesheet' href='css/ol.css'>

    <title>OpenLayers 3 example</title>

My Map


texts: some shp to dxf converted lines don't show in Autocad

texts:
I have a group of vector files that I intend to convert to "DXF" format. But after the conversion, only contour lines(white lines in the red polygon) are not displayed in Autocad. I read some related Q&As in this site but could not get a satisfactory answer. Does the problem stem from the elevation data or intersection with polygon or something different?

Regards


texts: Problem with unicode Characters (arabic) in josm

texts: I'm using josm for converting a shapefile to .osm format. When I import the shapefile to josm the arabic characters do not show correctly (see the image below). The dbf of the shapefile shows the characters correctly . How can I solve the problem?


texts:
I'm having difficulty in converting shapefiles to cad file. I'm currently using the ArcGIS 9.3.1 version and I tried to convert it using the toolbox> conversion tool> to cad> export to cad route... the conversion was partly successful but then it doesn't have any attributes when I tried to open it in ArcMap.

When I try to open it in Autocad I can't see a thing...

How can I resolve this?


texts: Python GDALwarp cut a raster with a shapefile polygon

texts:
I am trying to create a program that cuts multiple rasters in different folders with gdalwarp, the program works for square shapefiles but when I enter one with a polygon the program does not cut anything or create any image. How can I make this work?

from osgeo import gdal
import os
import shutil

carpetas=r'.../Pruebas/imagenes'
carpeta=os.listdir(carpetas)

output=r'.../Pruebas/output'
shp=r'.../Limite_ZE/nuevolim.shp'

for i in carpeta:

    archivos=os.listdir(carpetas+'/'+i)
    dato_salida=os.mkdir(output+'/'+i+'_cut')

    for x in archivos:

        if '_B8' in x:
            continue

        elif x.endswith('.TIF'):

            options=gdal.WarpOptions(dstAlpha=True,multithread=True,cutlineDSName=shp,cropToCutline=True)

            outimage=gdal.Warp(srcDSOrSrcDSTab=carpetas+'/'+i+'/'+x,
                           destNameOrDestDS=output+'/'+i+'_cut'+'/'+x,
                           options=options)

            outimage=None

        elif x.endswith('.txt'):
            shutil.copy(carpetas+'/'+i+'/'+x, output+'/'+i+'_cut'+'/'+x)

print('Ya termine =)')


texts: Using Value from Iterate Feature Selection to create new files per feature value

texts:
I am attempting to use Model Builder to export a file per value in a feature. The intent is to create a file per school, listing the students that attend. We currently have a single large file with all students and the school they attend is entered as a number.
Here are the steps I have so far.

I am iterating through the field WSCHOOLNUM, an Int.
I am sending to the Copy Features which is exporting to StdntsBySchl1415.gdb\Stds_%Value%
I get the following error message:

"_WSCHOOLNUM ""WSCHOOLNUM" = 4" # #
Start Time: Fri Jul 10 12:42:31 2015
ERROR 000354: The name contains invalid characters
Item not found in this collection.
Failed to execute (Make Feature Layer).
Failed at Fri Jul 10 12:42:31 2015 (Elapsed Time: 0.29 seconds)
Failed to execute (Iterate Feature Selection).
Failed at Fri Jul 10 12:42:31 2015 (Elapsed Time: 3.51 seconds)"

I understand tables can't start with a number, but I thought my naming scheme would take care of that.
EDIT: As suggested below I renamed my origin shapefile to eliminate the hyphen. That did not resolve the issue. I then created a new text field, Field Calculated the integer field to it, and it ran fine, so I guess the issue was with the integers.


texts:
Am having an issue with the QGIS Georeferencer - I start with a fresh canvas but for some reason, the points always end up shifting a great amount (see screenshot).

I've double checked my points, and they are all correct - but you can see in the background, the referenced map image is upside down, and mirrored. Is there something I'm doing wrong? I'm converting a project from ArcMap and never experienced an issue like this there so I'm not sure as to where to go to with this problem.

It seems my error starts with 4 or more points, 3 or less and technically the points work but QGIS georeferencer gives out an error stating that it is "not solvable". BUT the points are exactly where they need to be (see below)

Whereas, when I click to include the fourth point, which is in no means drastically different or wrong (as I've tried three different locations just to test the 4+ error theory), the georeferencer calculates that the points need to shift thousands of points away (see below)

Below is my transformation settings window. One thing to note, after picking the same exact points, with the same exact transformation settings... it all of a sudden works. Not sure why, or how, but I'll take what I can get. Maybe it is something in my settings? (But again, I didn't change anything).


texts: Satisfying the 'Contribution to the Profession' requirement of the GISP-AP Certification, does GIS SE make the cut?

texts:
Does participation in moderated online communities such as GIS SE count towards satisfying the 'Contribution to the Profession' requirement of the GISP-AP Certification issued by the Survey and Spatial Sciences Institute (AU/NZ)?

If participation does count, how is it translated into a point score using the Contributions Point Schedule (pages 31 to 38 of this document)?

I have emailed this question to SSSI. No response as yet.
I've also seen a similar question and response here about the GISCI Certification program.


texts: ImportError: cannot import name GEOSGeometry Django 1.7

texts:
I am a heroku newbie and I keep getting the said error whenever I try to sync db on heroku. I am using a hobby Dev instance which from this link shows that their is no support for PostGIS on the free database.

I believe the problem is the missing geolibraries however me being new to heroku, could be I missed a step in installing them.

Below is my stacktrace:

Running `python manage.py dbshell` attached to terminal... up, run.7391
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
    django.setup()
  File "/app/.heroku/python/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
    app_config.ready()
  File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/apps.py", line 22, in ready
    self.module.autodiscover()
  File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 23, in autodiscover
    autodiscover_modules('admin', register_to=site)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/utils/module_loading.py", line 74, in autodiscover_modules
    import_module('%s.%s' % (app_config.name, module_to_search))
  File "/app/.heroku/python/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib/gis/admin/__init__.py", line 7, in <module>
    from django.contrib.gis.admin.options import GeoModelAdmin      # NOQA
  File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib/gis/admin/options.py", line 2, in <module>
    from django.contrib.gis.admin.widgets import OpenLayersWidget
  File "/app/.heroku/python/lib/python2.7/site-packages/django/contrib/gis/admin/widgets.py", line 9, in <module>
    from django.contrib.gis.geos import GEOSGeometry, GEOSException
ImportError: cannot import name GEOSGeometry

I am using the following tutorial


texts:
I have a table with 50 million test points. The points are stored as latitude / longitude with SRID = 4326. The create script for the table:

CREATE TABLE points
(
  name character varying,
  point geometry(Geometry,4326)
)
WITH (
  OIDS=FALSE
);
ALTER TABLE points
  OWNER TO postgres;

CREATE INDEX idxpointspoint
  ON points
  USING gist
  (point);

When I run the SQL included below, the resultset includes 500 rows and takes 47 seconds. The time is consistent whether or not I have an index on the geometry column.

SELECT name, point FROM points WHERE ST_Distance(ST_Transform(ST_GeomFromText('POINT(LONG LAT)',4326),XXXX), ST_Transform(point,XXXX)) <= 1000.0;

I ran VACUUM ANALYZE points; but no results were returned and it took 1400 ms.

When I prefix the SQL query with EXPLAIN, I get the following:

"Seq Scan on points  (cost=0.00..15020113.70 rows=17596460 width=56)"
"  Filter: (st_distance('0101000020FF0B0000B47EAC032D6621412086FD5737A81141'::geometry, st_transform(point, XXXX)) <= 1000::double precision)"

How do I troubleshoot this and get the spatial index to work?


texts: Switching Between GCS & PCS in a Data Frame For Accurate Acreage/Distance Measurements

texts:
I'm working with a data frame that contains multiple layers; data frame and layers all use a GCS (WGS_1984).  On one layer in particular, I want to be able to draw and measure the acreage of polygons.  I know I can't measure acreage in a GCS, I would need to use a Projected coordinate system.
What would be my solution?  Project the desired .shp file into a PCS and then do a data frame transformation into the same PCS...?  Is the project on the fly function alone enough to allow me to be able to accurately measure acreage and distance off of a GCS layer in a PCS data frame?

[I'm working at a VERY close-up scale, mapping out crop plantings at the feet/inches level, on a small city/county (Kauai, HI) scale. I'm using the NAD_1983_HARN Hawaii state plane for my PCS when applicable.]


texts: Pixel-based NDVI time series - Google Earth Engine

texts: I am a newcomer using GEE and now I want to do a NDVI time series. The condition is that it must be based on the result of the pixel, and it need to displayed on the map. I just made the NDVI time series, but there is no ideas as a pixel based.


texts: why does my script not save a layer when it encounters a " \" character in the string

texts:
i have some code that takes a field and finds every unique value in that field. it then creates a layer for each unique value.

The code is working ok , but it is failing when there are \ characters within the value , for example "london\bridge".

If i were to do a manual defination query and save a layer it would work . So why does it not work here ? Anyone have any ideas
My code uses the search curosor to get the unique values and iterates through this one at a time saving out a layer .

import arcpy
from arcpy import env
## This is where the file that is to be processed is saved
arcpy.env.workspace = "S:\\AppsData\\GIS\\PROJECT\\COMPANIES\\SHAPEFILES\\"
# The file to be processed
Source_File = "SDE_COMPANY_LIST.shp"
# The attribute that is being looked at in this case is "COMPANY" , the company bulk list accesses all the values within the given feild in this case it is company
Company_Bulk_Company_List = [row[0] for row in arcpy.da.SearchCursor(Source_File,"COMPANY")]
#the UniqueCompany variable takes all the values from the field and returns a unique set , which gives the basis for every layer to be write
UniqueCompany = set(Company_Bulk_Company_List)
print UniqueCompany

# Getting the list out

for company_query in UniqueCompany:

env.workspace = "S:\\AppsData\\GIS\\PROJECT\\COMPANIES\\SHAPEFILES\\"

out_layer0 = str(company_query)+"lyr"
in_layer = out_layer0
out_layer = in_layer +"lyr"

#MakeFeatureLayer variables
in_features = "SDE_COMPANY_LIST.shp"
# The attribute that is being looked at is repeated here
where_clause = '"COMPANY" = ' + "'" + company_query + "'"
print where_clause
workspace = "S:\\AppsData\\GIS\\PROJECT\\COMPANIES\\SHAPEFILES\\"

try:
    # Execute MakeFeatureLayer
    arcpy.MakeFeatureLayer_management(in_features, out_layer0, where_clause, workspace)

    # Execute SaveToLayerFile
    arcpy.SaveToLayerFile_management(in_layer, out_layer, "ABSOLUTE")
except:
     print arcpy.GetMessages()


texts: Retrieving heights of buildings using remotely sensed data (except lidar)

texts:
How can I get the height values of buildings from a certain sector a city without going into the field to collect data? Is there anyway to do via satellite imagery, SRTM, ASTER GDEM or any DEM for that matter?

One mention, this is not an US city or a city that has free LIDAR data (it is in Romania).


texts: Calculating an "overarching" slope and aspect for each polygon of a feature class

texts: I have a feature class containing polygons and an associated raster with elevation data. I'm looking to calculate a single slope and aspect for each polygon within the feature class. I don't want a slope that represents an average of the raster cells. Rather, I ask you to picture a plane that is fitted to the topography of each polygon. I don't know the specific mathematics involved, but I can imagine it involves finding a plane that minimizes the aggregate difference, across all raster cells, between the actual elevation and the fitted elevation of the plane. I've attached a rather crude two dimensional view of alternative scenarios for the topography. For each scenario, there is a black shape to represent topography and a blue line to represent slope and aspect. Note that an average slope will not fit the bill, because I can envision many polygons with the same fitted plane, yet very different levels of ruggedness (average slope between adjacent raster cells). I am decent enough at ArcGIS to find my way to tools and sequences of tools to get things done, but I have not done programming or python scripts or whatever the more sophisticated users do to devise custom "tools".


texts: Is there a tool for automated quality assurance for vector data captured on raster data?

texts:
I wonder whether is any tool(or script) in ArcGIS or QGIS which allows to make an automated quality assurance for vector data captured on raster data?
vector data on binary raster:


texts:
I was running a gdal slope calculation on DEM I had

gdaldem slope B:/data.tif G:/slope.tif -of GTiff -b 1 -s 1.0

and I need to find the concert documentation on how the slope is calculated.
https://gdal.org/programs/gdaldem.html I do not see it on the GDAL documentation.

I am looking for technical documentation on how each cell receives a slope value. Something like this for ESRI http://desktop.arcgis.com/en/arcmap/10.3/tools/spatial-analyst-toolbox/how-slope-works.htm has very detailed explanation on how slope is calculated


texts: Combining Several "Blocks" in ModelBuilder?

texts:
I have a model in three blocks.

Block 1 iterates through feature classes in a DB clips them based on an extent boundary and stores into a folder.

Block 2 takes input folder and check through shapefiles for empty features and removes if any.

Block 3 removes unrequired attribute fields from Attribute Table.

What I want is that "Remove empty shapes" script runs only after "Clip" tool is completely done with all iterations (feature classes) and shape files are stored into folder!

What I tried is make precondition after "%Name%" but still after each itaration runs "Remove empty shapes" what makes process slower!

the same, I want that "Remove unnecessary Att. Fields" runs only after "Remove empty shapes" is done but for some reason these 2 last Blocks I cant set precondition at all!


texts:
I have a raster that needs to be split into tiles (each tile a new raster).  I have a Shapefile with multiple polygons (these polygons are how I want the raster split).

How do I do this using GDAL?


texts:
I have ArcGIS 10.2 installed on my machine which shows service pack 0 (build 0), i want to upgrade my service pack to 3 or higher possibly 5. I downloaded service pack 5 for ArcGIS 10 because i did not find service packs for 10.2. Whie i install the service pack 5, it shows " The service patch cannot be installed by the windows Installer service because program to be upgraded may be missing. or the upgrade patch may update a different version of the program. Verify that the proram to be be upgraded exists on your computer and that you have the correct upgrade patch."
Is there any service pack available for 10.2?


texts: How to get map to parse input bounds as degrees?

texts:
I just started to learn Open Map and I am having some difficulty working with the API. This may look trivial, but please bear with me. I am trying to get Open Map to display a region of the map bounded by the bounds variable. Having specified the unit as degrees, I would expect that the bounds shown would also be in degrees. But it seems to me that it is in a different unit which is much smaller than degrees:

var options = {
 projection: 'EPSG:4326'
 ,units: 'degrees'
};
var map = new OpenLayers.Map('map',options);
var bounds = new OpenLayers.Bounds(-100, -90, 100, 90);
var osm = new OpenLayers.Layer.OSM();
var gmap = new OpenLayers.Layer.Google("Google Streets");
map.addLayers([osm, gmap]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.zoomToExtent(bounds, true);

My question is, how do I get open map to parse the input bounds as degrees?


texts: Viewing LiDAR data in QGIS or Google Earth

texts: I'm determining tree heights from LiDAR point cloud data in Cloud Compare, but I'd like to import the data into QGIS or Google Earth. Simply saving the rasterized cloud as a .shp file in Cloud Compare then uploading into QGIS produces this error "Cloud.shp is not a valid or recognized data source." Does anyone have any (preferably open-source) solutions to do this correctly?


texts:
Has anyone every had any issues with ArcGIS not loading the labels that are set via  ArcPy? I've only inserted the code that labels two created layers that are made earlier in the script.

# uses the mxd that is running this code
mxd = arcpy.mapping.MapDocument("CURRENT")
# df is the dataframe, Layers is used to run through all the layers within the mxd. Leave Layers as is
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
# lyr sets the layer, needs to be spelt exactly as the layer sits in ArcMap
lyr = arcpy.mapping.ListLayers(mxd, "PARCELS_OWNER", df)[0]
arcpy.env.overwriteOutput = True

for lyr1 in arcpy.mapping.ListLayers(mxd, "Comps"):
    print lyr1.name
    if lyr1.supports("SHOWLABELS"):
        print lyr1.name + " supports label classes"
        for lblClass in lyr1.labelClasses:
            print lblClass.className
            lblClass.expression = lblClass.expression = '"{}" + "Parcel #:" + [AccountNo] + \n + [StrNum] + " " + [Street] + "{}"'.format("<FNT size = '18'>","</FNT>")
            if lblClass.showClassLabels:
                print "    Class Name:  " + lblClass.className
                print "    Expression:  " + lblClass.expression

        lyr1.showLabels = True

for lyr2 in arcpy.mapping.ListLayers(mxd, "Subject"):
     print lyr2.name
     if lyr2.supports("SHOWLABELS"):
        print lyr2.name + " supports label classes"
        for lblClass in lyr2.labelClasses:
             print lblClass.className
             lblClass.expression = lblClass.expression = '"{}" + "Subject #:" + [AccountNo] + \n + [StrNum] + " " + [Street] + "{}"'.format("<FNT size = '18'>","</FNT>")
             if lblClass.showClassLabels:
                print "    Class Name:  " + lblClass.className
                print "    Expression:  " + lblClass.expression

        lyr2.showLabels = True
del mxd
arcpy.RefreshActiveView()

I don't get any errors in my code, but the labels are never displayed. The box within properties is checked to display labels, but nothing.


texts:
I'm trying to use GDAL in python to get only the temperature band from this GRIB file that has 2 bands. I can't just do temp_band = ds.GetRasterBand(1) because sometimes, but not always, the grib files contain the temp error data in band 1 and the temp data in band 2.

When I open the GRIB file using the DEGRIB viewer (tkdegrib) it says the bands have Short Names TMP and TMPERR. But when I use GDAL to list the band metadata, this information seems to get lost as GRIB_SHORT_NAME = 2-HTGL for both bands. I'm not sure if this is a bug in GDAL or if I'm doing something wrong. How can I reliably figure out which band is which?

Below I pasted what info GDAL gives for each band using GetMetadata() on each of the bands.

  BAND 1:
  __len__ = {int} 13 'GRIB_COMMENT' (84646000) = {str} 'Temperature [C]' 'GRIB_ELEMENT' (84646128) = {str} 'TMP' 'GRIB_FORECAST_SECONDS'
  (84524608) = {str} '0 sec' 'GRIB_PDS_PDTN' (84646256) = {str} '0'
  'GRIB_PDS_TEMPLATE_NUMBERS' (75911216) = {str} '0 0 7 0 109 0 0 0 1 0
  0 0 0 103 0 0 0 0 2 255 0 0 0 0 0' 'GRIB_REF_TIME' (84646320) = {str}
  '1445904000 sec UTC' 'GRIB_SHORT_NAME' (84646384) = {str} '2-HTGL'
  'GRIB_UNIT' (84646448) = {str} '[C]' 'GRIB_VALID_TIME' (84646512) =
  {str} '1445904000 sec UTC' 'STATISTICS_MAXIMUM' (84636416) = {str}
  '-271.77999999523' 'STATISTICS_MEAN' (84646576) = {str}
  '-271.84386028282' 'STATISTICS_MINIMUM' (84636632) = {str}
  '-272.64000000954' 'STATISTICS_STDDEV' (84636776) = {str}
  '0.078593326710491'

  BAND 2:
  __len__ = {int} 11 'GRIB_COMMENT' (84646640) = {str} 'Temperature [C]' 'GRIB_ELEMENT' (84646768) = {str} 'TMP' 'GRIB_FORECAST_SECONDS'
  (84636920) = {str} '0 sec' 'GRIB_REF_TIME' (84646832) = {str}
  '1445904000 sec UTC' 'GRIB_SHORT_NAME' (84646896) = {str} '2-HTGL'
  'GRIB_UNIT' (84646960) = {str} '[C]' 'GRIB_VALID_TIME' (84647024) =
  {str} '1445904000 sec UTC' 'STATISTICS_MAXIMUM' (84637136) = {str}
  '34.129998779297' 'STATISTICS_MEAN' (84647152) = {str}
  '14.876380973386' 'STATISTICS_MINIMUM' (84637208) = {str}
  '-9.1300109863281' 'STATISTICS_STDDEV' (84637352) = {str}
  '9.028231730951'


texts: problem with SelectLayerByAttribute management in script

texts:
My problem is that this tool works perfectly in IDLE or PyScripter programs, but if I use in the script in ArcGIS desktop this problem occurs: arcgisscripting.ExecuteError:ERROR 000582...

Why does it not execute in ArcGIS script but works in the programs?

The tool SelectLayerByAttribute management is inside the arcpy.da.UpdateCursor

This is my code:

import arcpy
import datetime
arcpy.env.overwriteOutput = True

territory= arcpy.GetParameterAsText(0)
path= arcpy.GetParameterAsText(1)
territory_lyr=  path+ "territorios_lyr"

arcpy.MakeFeatureLayer_management(territory,territory_lyr)
fields= ("FID", "avg_mindis", "I_conc", "Max_lenght","TamanoTerr")
with arcpy.da.UpdateCursor(territory,  fields) as cursor:
    for row in cursor:
        currentID= row[0]
        where= "FID="+str(currentID)
        arcpy.SelectLayerByAttribute_management(territory_lyr, "NEW_SELECTION",where)


texts: How can I modify the layer panel of my export of qgis2web in my website?

texts:
I export my qgis project with 4 layers and I want put it in my website.
I don't like the style of qgis2web and I want to edit the code. I putted in my text editor but I understood that is not easy to modify the panel layer.

How do I overwrite it with my code?


texts: SyntaxError with custom function using QgsFeatureRequest.setFilterExpression

texts:
def get_subsel(layer,filter):
    layers = iface.mapCanvas().layers()
    for lyr in layers:
        if lyr.name() == layer:
            request = QgsFeatureRequest().setFilterExpression(filter)

            iter = lyr.getFeatures(request)
            ids = [i.id() for i in iter]
            lyr.setSelectedFeatures(ids)

            selected_feats = lyr.selectedFeatures()

    new_layer = QgsVectorLayer("Point?crs=epsg:277000", "acc_subselection", "memory")
    data_prov = new_layer.dataProvider()
    data_prov.addFeatures(selected_feats)
    QgsMapLayerRegistry().instance().addMapLayer(new_layer)

I'm trying to use the code above with filter = ("\"accdate\" >= '1990-01-01' AND \"accdate\" <= '1992-12-31'"). If I type this in to the python console line for line (i.e. without using the function) it works fine. But typing the filter as defined above in to the function I get an error in the first line (so the code hasn't executed yet):

get_subsel("accident", "("\"accdate\" >= '1990-01-01' AND \"accdate\" <= '1992-12-31'") SyntaxError: unexpected character after line continuation character with the ^ pointing at '1990-01-01' (where bold).

It looks like it's getting confused with the \ escape-character...but like I said it works when typed in to the console. I'm more experienced in MapBasic programming (MapInfo GIS), where I would build filter by concatenating strings and e.g. CHR$(34) or CHR$(92), which at runtime are interpreted as " and \, respectively. Hopefully that's clear enough

So do I need to do something similar in order for python to interpret the various quotes and backslashes correctly at runtime?

the layer is from a Postgres database


texts: QGIS CadTools: changing parallel line fixed length from degrees to meters

texts: I'm new to QGIS and want to create a parallel line. I'm using the CadTools plugin to do so. When I add a parallel line, the fixed length is in degrees not meters. How do I change this so that the fixed length is in meters and not degrees.


texts: Link Source Directory to Map Layout in QGIS

texts:
I've seen it done before in MapInfo layouts where the directory of a saved workspace has been linked to and displayed in the map layout window. Does anyone know if this is possible in QGIS? If yes, how?
Thanks in advance!


texts: Summarised Inside Join with Attribute Criteria using ArcGIS Desktop?

texts:
I have a situation in which I need to find how many points lie within a polygon, this would be quite simple with a summarized inside join from points to polygons except for the fact that the points have a time field and I only need to know only when the "point time" is in-between the "polygon start time field" and the "polygon end time field". Then I need the sum of all those points that meet that criteria and place into a new field of the polygon layer. I have around 3000 points and 2500 polygons (polygons overlap, thus needing the time constraint)

Logic:
SUMofPoints (IF Point is over polygon AND IF Polygon Start Time < Point Time < Polygon End time)

All Point and polygon times are stored in a attribute field inside a geodatabase. If it helps the times are formatted as "yyyymmddhhmm"

I have a feeling that this requires python (or maybe even model builder?) but I have no formal experience in python although I have resources to friends and professors who do. So as simple as possible would be nice, but I know these things aren't really that simple.


texts: How to staple layers in a view using ArcGIS Desktop?

texts:
How is it possible to staple layers, like in the picture below?

Preferably using ArcGIS 10.2 for Desktop.


texts: I am studying glacier mass balance and have ASTER and SRTM DEMs. I want to make an elevation/volume change image such that it graphically represents changes in elevation difference in various parts of the glacier. If anyone can suggest an outline for how to perform it in ArcGIS 9.3, I would be highly beneficial for my project


texts: Statistical difference in DEM-height compared to a specific point(feature)

texts:
Recently I've been struggling when trying to compare surrounding points of a DEM to a specific one (a feature in my case. A castle to be precise). I want to find out how steep a slope in an area around the castle is, compared to the castle/point itself.
I've tried with a buffer for the area and using zonal statistics afterwards, but this has proven to be unsatisfying for my research question.
Anyone got a smart approach for this?


texts: How to join multiple lines (branches of a large stream network)

texts:
I've generated a channel/stream network based on a DEM, but each branch of the network is split into very small lines. I'd like to have the network divided into as few separate lines as possible, so that each branch will be a single line up until where it meets another branch.

I've found some tools that will allow me to manually join lines by selecting the ones to be joined, but I'm looking for a solution to do this across a large stream network consisting of hundreds of tiny lines. In the end I want to export this as a GPX file, if that makes any difference; the GPX format doesn't allow for branching lines.


texts: Specifying FID column name in shp2pgsql?

texts:
In ogr2ogr I can specify the name of FID column using the option -lco FID={columnname} when importing a spatial data in PostGIS database. I am using shp2pgsql in case of shapefile and cannot find a way to specify FID column (searched here).

Is there an easy way to achieve this or do I have to do some workaround?

Note: A ticket has been created on this issue.


texts: ArcGIS Javascript, add headarrow in the end of line?

texts:
Ok so I'm planning to add arrow in the last coordinate point.

 var line = new Polyline(wgs84);
          var b = 0;
          var a = 0;
             // console.log(hasilarray);
          arrayUtils.forEach(hasilarray, function(ple){
            // console.log();
            if(a==0){
              var jumlah = akhir.length;
              for(c=0;c<jumlah;c++){
                var load = JSON.stringify(hasilarray[0][c]);
                console.log(load +" jalur "+c);
                var jumlah_k = hasilarray[0][c].length;
                for(d=0;d<jumlah_k;d++){
                  // array_koordinat.push(hasilarray[0][c][d]);
                  var koor_x_p = hasilarray[1][d][0].toString();
                  var koor_y_p = hasilarray[1][d][1].toString();
                  var x_ = Number(koor_x_p);
                  var y_ = Number(koor_y_p);
                  array_koordinat.push(x_,y_);
                  koordinat_a.push(array_koordinat);
                  array_koordinat=[];
                }
                line.addPath(hasilarray[0][c]);
              }
            }else{
              var load = JSON.stringify(hasilarray[1]);
              // console.log(JSON.stringify(hasilarray[1]));
              //console.log(load +" jalur terakhir");
              var jumlah_k = hasilarray[1].length;
              for(e=0;e<jumlah_k;e++){
                  var koor_x_p = hasilarray[1][e][0].toString();
                  var koor_y_p = hasilarray[1][e][1].toString();
                  var x_ = Number(koor_x_p);
                  var y_ = Number(koor_y_p);
                  array_koordinat.push(x_,y_);
                  koordinat_a.push(array_koordinat);
                  array_koordinat=[];
                }
              // array_koordinat.push(hasilarray[1]);
              line.addPath(hasilarray[1]);

            }
            a++;
            b++;
          }) ;

You can get the coordinate by get koordinat_a array (example: koordinat_a[0], you'll get the value of x and y coordinate.

I'm not so familiar with javascript and arcgis, but I'll try everything.

How could I add some arrow to last point? I've been looking couple days but all of them is dekstop GIS.

Edit: I've found it, take a look to my answer, maybe someone need it.


texts: Adding input field to field map using ArcPy gives RuntimeError

texts:
I'm a Python beginner and I would like to export a csv from a feature class, including only some fields. I'm trying to do it using the field mapping control, but I'm doing something wrong because I have the following error: RuntimeError: FieldMap: Error in adding input field to field map
here the code:
outPathTable = r"output_path"       #get parameter as text
myFc = r'myFc_path'                 #get parameter as text

outName = myFc + "_dataQualityFc.csv"

# List of fields to keep
outputFields = ['MemberID_target',
                         'PersonalID_target',
                         'Latitude',
                         'Longitude',
                         'dataQualityRisk_sameCH',
                          'dataQualityRisk_diffCH']

fieldMappings = arcpy.FieldMappings()

# Create the field mappings from the outputField list
# only fields in the list will be inlcuded in the exported file

for field in outputFields:
    fieldMap = arcpy.FieldMap()
    fieldMap.addInputField(myFc, field)
    fieldMappings.addFieldMap(fieldMap)

# Create a csv for Data Quality Risk using the field mapping
arcpy.TableToTable_conversion(myFc, outPathTable, outName, "", fieldMappings)


texts: Is there a standard data model for storing traffic volumes, layout, lanes, timing and phasing information?

texts:
I am at a crossroads where I want to store more than a scenarios worth of project data from a Synchro study, but do not want to keep this data in a series of text files. The data output by Synchro is standardized to a tab delimeted text file. The raw text files are useless when organizing a GIS analysis or visualizing (map) the study area. They require much more then some simple manipulation.

I want to know if there exists a spatial data model for storing traffic volumes, layout, lanes, timing and phasing information that is included in the UTDF specification used by many traffic analysis software.

By storing data in a spatial database, I would be able to hold many time periods worth of data, visualize subsets of said data, and perform temporal analysis. However, most beneficial would be the ability to export a selection of data at any given intersection(s) into a UTDF that can be consumed by Synchro or any other traffic analysis software.

Typically:

Traffic Analysis Software (e.g. Synchro) <--> UTDF

What I want to do:

Spatial Database <--UTDF--> Synchro

Essentially, the UTDF becomes the standard format in which data is transferred between the spatial database and traffic analysis software.

Does the Spatial Database <--UTDF part already exist?


texts: Specify directories for use with gdaltindex

texts:
I'd like to use gdaltindex to create a polygon shapefile of thousands of georeferenced .tif documents.  I've found this incredibly easy to accomplish in a single directory on Linux
(e.g. gdaltindex indexoutput.shp *.tif) but I'll also need to index several hundred sub directories on a windows drive.  I do have FWTools installed on the windows machine.

The majority of these files are Tiff's with a world file and have not yet been converted to geoTiffs.  I work in a few different coordinate systems, so ideally I'd like to go through and make a single pass at each coordinate system.

It looks like I can use -skip_different_projection to take care of the projection issue, but my search hasn't turned up any parameters of gdaltindex to specify directories, so any help is much appreciated.


texts: How to move features up and down, inside the layer (after initialization)?

texts:
I want to move features up and down inside a vector layer, with OpenLayers 3.

I have two features: red & blue.

As you can see im the first image, blue is over the red feature.

Moving red up would mean that it would be pulled to the front, thus showing the whole red feature, and hiding part of blue. See the second image.

So, now, red would have been moved up!

I have noticed that the uppermost feature blue is at the top because it is created after red. So, there is probably some kind of order option inside the feature itself. I have searched but I haven't found it, yet.

I want to change the order AFTER initialization. For example, by doing vector.moveFeatureUp(red);

Could you please help me understand how to move features up and down?

I POSTED A SOLUTION AS AN ANSWER!


texts: Creating route (by hand) over a road shape in QGIS?

texts:
Is it possible to create a route placing some waypoints by hand? I mean, I don't want the program (QGIS) to link consecutive points with a simple line. I want it to link the points following the road shape of a city layer, so that with a few clicks I can recreate a large path. Any idea of how to do it?

And, once the entire route is generated, is it possible to interpolate its waypoints? And what would be the format of the new file?


texts: Should I build pyramids/overviews for the source files or for the virtual raster?

texts:
I have a virtual raster comprised of a lot of raster tiles of high-res aerial imagery. I wish to build pyramids/overviews to speed up the rendering in QGIS.

Should I build them for the source files and then create a virtual raster, or should I create a virtual raster and then create them for that? Or do something else entirely?


texts:
I've read the User Guide, I've tried Google searches with every term I can think of, but I cannot figure out how to make MapInfo 11.5 save a new symbol style without saving a copy of the table! I've chosen my new symbol style (from the plain old MapInfo 3.0 Compatible set) in the Layer Display tab of Layer Properties and the map updates properly, but the Save Table option is not available. Neither is the Revert Table button, implying I haven't made any changes to the table at all. I don't understand!

How do I save a new symbol style for a table?


texts: Layer cannot be enabled in GeoServer after restarting computer?

texts:
I use PostGIS database, mapserver is GeoServer. Every time I create a workspace to upload layers into GeoServer, I can see the layers be enabled. I can see them in "Layer preview". When I restart my computer, the layers disappear.  I checked in "Layers" of "Data", the layers all were not enabled, I had to upload again. I don't understand what is happening! I installed GeoServer as a service, and the webserver as Apache.

How can I figure out what I did wrong?


texts: ArcGIS 10 3 Label features with numeric field which has null values and another text field, showing both fields even when there's null values

texts:
I'm labelling features with an simple expression to show [Number] + [Code], however, I have some null values in "Number".

When I use this expression it only labels the features with both number and code, however, I need it to display both, columns even if there is no value.

i.e. if there's no number display only display the code, if there's a number and a code, display both.

Can I do this in advanced? I assumed this would be something that Arc would do automatically?


texts: Automatically coloring a large number of polygons in CartoDB

texts:
I see that I can use the CartoDB wizard to color polygons I have based on a column value. This works great except that it only colors 6 or so polygons and the rest are lumped as “others”.

I see that I can edit the CSS and add the other polygons one at a time. My map has about 250 of these, so doing it one at a time isn’t practical. Is there a more automated way to, say, randomly assign a color from the palette to all the polygons based on a value in the table? It’s fine if there are duplicate colors.


texts: Extracting data from ArcGIS Onlines' World Traffic layer

texts:
I'm trying to find a dataset on road traffic flow in the Middle East.

I found ArcGIS' Online map which shows the traffic in any part of the world.  I'm very new to it and I'm trying to extract traffic data from the World Traffic Service. I was wondering if the software allows to extract traffic flow data as CSV file, that was from a few months back, and that is other than traffic incidents data?

I applied the World Traffic layer to my map, however, I was only able to extract data on the traffic incidents data (incident type, location or road name, date of start, end date, etc).

What I'm looking for is these features (density of traffic, location or road name, time, date). Which is in fact shown on the map under Traffic content, but it doesn't have an option to filter data or view them in a table like traffic incidents content mentioned above.

Am I missing something. Is there another option to extract the Traffic data as a CSV file?

This is a screenshot of the content I found using world traffic layer


texts: QGIS crashes when iterating twice on a layer?

texts:
I am facing an issue for the first time and can not manage to find out what's wrong?

I am trying to write a function that takes in input the line ID, finds the node at the end of the line. Then looks for the lines at the origin of the found node.

Def find(id):
    canvas = qgis.utils.iface.mapCanvas()

    lyrs = dict((k.name(), i) for (i, k) in enumerate(canvas.layers()))
    LayerC = canvas.layer(lyrs['Lines'])
    LayerB = canvas.layer(lyrs['Nodes'])
    list=[]
    for line in LayerC.getFeatures():
       if line.id() == id:
          geom1 = line.geometry()
          xy_line = geom1.asPolyline()
          xy_O = xy_line[0]
          xy_E = xy_line[len(xy_line) - 1]

          listnodes = LayerB.getFeatures()
          for featN in listnodes:
            geomN = featN.geometry()
            xy_N = geomN.asPoint()

            if xy_N == xy_E:
                for line2 in LayerC.getFeatures():
                     geom2 = line2.geometry()
                     xy_line2 = geom2.asPolyline()
                     xy_O2 = xy_line2[0]
                     xy_E2 = xy_line2[len(xy_line2) - 1]

                     if xy_N == xy_O2:
                          list.append(line2.id())
        return list

The code crashes when iterating for the second time on LayerC.
I am running this on Windows x64 with the version 2.14.3

Any suggestions ?


texts: Editing classified image raster in ArcGIS Desktop?

texts:
I have an unsupervised classification dataset of a SPOT 6 image created in ERDAS IMAGINE and I now want to edit the class names in ArcGIS Desktop 10.2.

I have done this successfully for a number of unsupervised classification datasets already, however the one I am currently working on will not allow me to edit.

When I click Start editing, I just get the following error:

The file is an unsigned integer 8-bit raster TIFF file created in ERDAS IMAGINE.


texts:
I'm currently working on a QGIS plugin which uses the selected items of a vector layer containing only points. Using the current selection is quite easy but I need to react in real time to a change in the selection.

How can i do that without creating a custom selection tool. I haven't found anything in the developper cookbook or on google.


texts: Centering custom control horizontally in OpenLayers 3?

texts:
This is more like a CSS question than a GIS one. But I don't have any clue how to center an element that has an absolute position.

Here's some relevant markup for my icon category selector that I create using ol.control.defaults().extend( new myCustomControlFunction() ); (it's used within a Wordpress plugin that I'm writing and the category buttons are created dynamically based upon the Wordpress categories):

`

        <button class="category-name" name="catid" onclick="iconSelectCat(this)">Category Name</button>

    <button class="mobiletoggle"></button>

`

I want to center the horizontal category select bar at the bottom of the map. In ol.css, ".ol-button" is set to position:absolute so that I can position it left, right, top, bottom. But how do I center an element that has position:absolute and a variable width?

It's more a general CSS question but with the code you can see where I want to apply it.


texts: Extract/export Attribute Table of pixel information from Classified Raster in Python?

texts:
I am at beginner level in image processing with python.

I have classified satellite image with python in 10 classes. I am able to write the image in geotiff format. However, I do not know how extract the attribute table of the classified raster from Python.

For now I am using ArcGIS by adding the classified raster which I have saved from Python processing and again reclassifying the raster and then only I got to export the attribute table which is easy but time consuming.

But I want to do this Python environment.  Should I create Geopandas dataframe?


texts: Incorrect address mapping in Google Maps and Google Earth?

texts:
We were issued a 911 address when we built our building approximately 3 years ago.

When you go to google maps and google earth and put our address it incorrectly pulls up in town.  The correct placement for our address is gps point: 39.006197, -89.149019.  The frustrating thing is that I have updated our address through google business and when you physically make the map go to our location and do a right here and select whats here - Our correct address of 544 IL 185 Vandalia, IL 62471 as well as our business came comes up.

Is there anyway that you can get the search connected so that it will come up correctly when someone needs to use a gps to find us?


texts: Overlapping lines, separate feature classes, get information out

texts:
I have a series of feature classes that represent trail systems with hiking times.  They are straight lines between two known points.  I generated these classes by interviewing various people on their hiking times between the two points.  The end result is a series of classes with overlapping lines between points that are represented in another class separate from the lines.

I.e.:
One feature class for known locations - point file.
One feature class for Hiker A - polyline file.
One feature class for Hiker B - polyline file.
etc...

They are all contained within a single feature dataset.

I need to run various statistical analyses on the times that people reported - i.e. I need to find the mean and median of the times people reported for that distance.

So my question, is what is the best way to get this information in a format that can be analyzed with Excel or R?

I've tried working with the Network Analyst and Topology, but I can't seem to export data from either of them.  Any ideas?


texts: How to change default Measured Grid letters (e.g. to E, N) in ArcGIS for Desktop?

texts:
I want put the letter N and letter E and the end the number of coordinate, for example:

  105608.00 E


texts:
I would like to Run/execute a model within ArcMap 9.3.1 vba. I can run it in vba by exporting out the VBS script and importing it into vba, however I'm wondering if there is an easier way to just call the model by where it is located instead of using the VBS script (e.g. see below).

Run "C:\Data\New File Geodatabase.gdb\Toolbox\Model"


texts:
i have to derive NDVI from Landsat 8 image..
I used the following equation from landsat website with band 5 and band 4 using ArcGIS 10.1
 Conversion to TOA Radiance
OLI and TIRS band data can be converted to TOA spectral radiance using the radiance rescaling factors provided in the metadata file:

Lλ = MLQcal + AL

where:

Lλ          = TOA spectral radiance (Watts/( m2 * srad * μm))
ML         = Band-specific multiplicative rescaling factor from the metadata (RADIANCE_MULT_BAND_x, where x is the band number)
AL          = Band-specific additive rescaling factor from the metadata (RADIANCE_ADD_BAND_x, where x is the band number)
Qcal        = Quantized and calibrated standard product pixel values (DN)

Conversion to TOA Reflectance

ρλ' = MρQcal + Aρ

where:

ρλ'          = TOA planetary reflectance, without correction for solar angle.  Note that ρλ' does not contain a correction for the sun angle.
Mρ         = Band-specific multiplicative rescaling factor from the metadata (REFLECTANCE_MULT_BAND_x, where x is the band number)
Aρ          = Band-specific additive rescaling factor from the metadata (REFLECTANCE_ADD_BAND_x, where x is the band number)
Qcal        = Quantized and calibrated standard product pixel values (DN)

But the final result have negative values in both sides.
Can any one tell how to solve this problem?


texts: How to obtain data to create average precipitation in 2012?

texts:
I am currently doing a final project, which I have to create a map of 2012 average precipitation of lower 48 states by using natural neighbour interpolation. The problem is that how can I get the data? I already have the data of 2012 from NOAA website in .CSV format. There are more than 80000 geographical locations in the file (http://www1.ncdc.noaa.gov/pub/orders/cdo/434898.csv) Would it be possible for me to use them to create the map and if anyone has any idea for
me about getting a data please help.


texts: Equation solving by using Python or model builder in ArcMap 9.3

texts:
I want to solve one formula in ArcMap 9.3 by using Python or Model builder. I have one shapefile, in that there is in attribute table for field A & B

Solve the formula: A*B/Sum(A). where Sum(A) is total of Field A.


texts: Understanding Landsat 7 Layer Properties

texts:
I have a Landstat 7 band 1 layer and am trying to understand exactly what it is showing. Specifically, if I go to the  layer properties, under source there is an "Extent" section which shows 4 numbers, (Top, Left, Right, Bottom).

What exactly do these mean in the context of remote sensing?


texts:
qgis version: 3.4.9-Madeira

I am editing a shapefile.

I want merge two adjacent polygon.

Then, I run merge tool, and it comes like below picture.

You can see some gap(?) or tail shape line between two polygon.

Why is this happening?


texts:
While creating a ESRI-Shapefile using GDAL, it keeps truncating/normalizing my field names. Any reason why it does this? If the Field name is more than 10 characters it seems to do this.

For example

OGRFieldDefn("More than 10 chars", OFTString). Becomes More Than_1 instead of More Than 10 Chars.


texts: Avoiding Esri basemap (Bing imagery) to update?

texts:
In my ongoing research, I intend to map transformations. That implies that, based on the ESRI basemap from Bing imagery, I draw certain features (in different layers) as they are today and as they are (meaning will be) in two years time.

I am concerned that Esri or Bing, whoever it is, will update the imagery and I will loose the starting moment of transformation (the present time).

In other words I would need to avoid my basemap from updating. I haven´t seen it happen yet, but I suppose it will update.

Or does it freeze at the date that I added it to my .mxd?

Any suggestions?

I am trying to avoid downloading the imagery and creating the tiles.


texts:
In ArcMap, I have a basemap that a couple people use at once and since I tend to make a lot of changes I've just copied the basemap but the layers are the same.

As I am changing the symbology of my basemap and their respective layers, will the changes be reflected in their maps?


texts: Understanding U.S. Census MSA to place relationships?

texts:
I need to aggregate place-level data by MSA (metropolitan statistical area).
I'm referring to U.S, Census "places" and MSAs ("places" might be townships, boroughs, villages, etc. they're the level under counties).

The U.S. Census provides several types of relationships (https://www.census.gov/geo/maps-data/data/ua_rel_download.html):

Urban area to MSA
Urban area to place
MSA to principal city (principal cities are places, but not the only
places in MSAs)

The DOL provides MSA to county relationships (https://www.dol.gov/owcp/regs/feeschedule/fee/fs04ctst.xls).

My understanding of MSAs may be off, but I expect MSAs are not made up of only whole counties. Some counties might fall partly into an MSA and partly out of it. Assuming that is correct, I am looking at the next level under counties, which are places, for a more granular/precise definition of MSAs. As it happens, even some places might fall partly into an MSA, but my data's definition doesn't go that far. I also have zip codes, but some zip codes are multi-place, so place is more precise than zip code for my purpose.

I am unable to find MSA to place relationships specifically.

Is there a direct source for these relationships?

If not, can they be derived from other data?

Or am I going about this the wrong way?

EDIT: I have 100,000s of records of business establishments. I aim to aggregate business establishment data by MSA and conduct regression analysis by MSA. The address data is not clean and I guess it would take too much work to normalise it enough that it becomes acceptable for geocoding into long-lat. So my strategy has been working with R to at least normalise "places" (in the Census meaning of the term) within addresses. (I realise some of my places straddle multiple counties, but counties are generally not specified in addresses.) Unfortunately (after months of part-time data-cleansing), I have only just realised that there is no relationship table for MSA-place. (I had mistakenly thought there was till now.) So I'm now wondering whether I can reconstruct such a table based on other available Census data, or whether I have to change my strategy for aggregation, for example by zipcode (though zip codes are less precise, for my purpose, than places) or by aiming for full geocoding in spite of the difficulty I perceive.


texts: Problems with some gdal functions in Mac version of QGIS3.4?

texts:
This morning I have been trying to clip, extract, do anything with a DEM in V3.4 on a mac10.14.3 (it works fine on linux Debian).

I receive an error message in the dialog box - attached and the log messages indicates '/bin/sh: gdal_translate: command not found'

I installed Madeira (3.4) from the main site, not through Kyngchaos, and using python 3.6.x as instructed in the dmg file.


texts: Python PostGIS script add new field on polygons layers

texts:
I have create a Python script where use PostGIS queries to automate some intersection tasks using PostGIS database.

In my database I have polygons, points and lines.

Here's a snippet of my script :

 try:
        if str(geomtype) == 'point':
            geomtype = 1
        elif str(geomtype) == 'linestring':
            geomtype = 2
        elif str(geomtype) == 'polygon':
            geomtype = 3
        else:
            raise TypeError()
    sql = "\nDROP TABLE IF EXISTS {0}.{1};\nCREATE TABLE {0}.{1} AS (SELECT {4},\n(st_dump(ST_CollectionExtract(st_intersection(dbgis.{2}.shape,dbgis.{3}.shape)::GEOMETRY(GEOMETRY,2345),{5}))).geom AS shape\nFROM  dbgis.{2}, dbgis.{3} WHERE st_intersects(dbgis.{2}.shape,dbgis.{3}.shape) AND {5}=3);\nCREATE INDEX idx_{2}_{3}_{6} ON {0}.{1} USING GIST (shape);\nALTER TABLE {0}.{1} ADD COLUMN id SERIAL;\nALTER TABLE {0}.{1} ADD COLUMN my_area double precision;\nUPDATE {0}.{1} SET my_area = ST_AREA(shape::GEOMETRY);\nALTER TABLE {0}.{1} ADD PRIMARY KEY (id);\nSELECT pop_g_col('{0}.{1}'::REGCLASS);\nGRANT ALL ON {0}.{1} TO GROUP u_cl;\nGRANT ALL ON {0}.{1} TO GROUP my_user;\n-- VACUUM ANALYZE {0}.{1};\n".format(schema, table, tablea, tableb, selects, geomtype, id_gen())
    return sql

This PostGIS SQL query works nice, but I need the new field where I want to add my_area to create only for polygons layers.

That code create for all layers (lines, points, polygons) that field my_area if layer is point or line then take value 0 I don't like that I don't need it.

How to change this code to create my_area only in polygons ?


texts: QGIS - label placement in print composer

texts: I have managed to do manual placement of labels in QGIS 2.18 so that they are all showing without overlapping.  However, when I create the map in print composer the labels do not stay in their same positions as the main screen and end up potentially overlapping again in places.  The only way I can seem to resolve this is by going back to the main screen and moving them there before trying print composer again and this something requires toggling back and forth until it is correct.  Surely they must be an easier way?  What am I missing?


texts: Determining whether raster pixels in or out of zone

texts: I am running ArcGIS 10.2.2 and often use the Zonal Statistics and Tabulate Area Tools. I wanted to confirm that the area of a pixel will only be included in the tabulated area if the pixel centroid is in the zone and that the whole pixel area will be included, even if part of the pixel is outside of the zone. Vice versa, if the pixel centroid is outside of the zone, the area will not be included even if part of the pixel is inside the zone.


texts:
I have this selected rectangular polygon in yellow on a layer with hundreds of polygons:

I need to split the selected polygon in 4 vertical columns (Y axis) and 8 horizontal rows (X axis), so that I get 32 final same-sized polygons. Something like this should be the output:

I have tested these plugins with no success so far:

Polygon Divider
Polygon Splitter
Split Polygon
Split Features on steroids

EDITED 19.12.2018:

Well in fact I have a layer with hundreds of polygons. It is my town's graveyard and it is divided in zones:

I need to split some of them in smaller tiles (real graves, pantheons, etc) so that I can locate each buried person in his parcel (tile).

In the above image I showed three zones.
Polygon 1: has to be split in 1(columns)x 40(rows) so there would be finally 40 polygons (graves).

Polygon 2: has to be split in 2(columns)x 50(rows) so there would be finally 100 polygons (graves).

Polygon 3: has to be split in 2(columns)x 3(rows) so there would be finally 6 polygons (graves).

All the polygons that need to be split have square-rectangle shape; only 4 sides.

EDIT 20.12.2018:

Array of offset (parallel) lines tool is not working well in my case. Seems that rectangles are not perfect (horizontal sides do not have exact same length, same with vertical). See image below:


texts: Layer sets not enabled after change style via REST.

texts:
I changing layer's style via REST api:

curl.exe -v -u new_user:123456 -XPUT -H "Content-type: text/xml"
-d "<layer><defaultStyle><name>poi</name></defaultStyle></layer>"
http://localhost:8080/geoserver/rest/layers/cite:point

Style changing, but in layer's Publishing tab i see that layer sets not enabled.

How can i fix it?


texts: How to do stereographic projection conversion (w.r.t. changing point of projection)?

texts:
Given a stereographic point P1 projected from point P, and given another point Q, I would like to know how to transform P1's coordinates to that of a stereographic point Q1 projected from point Q.

The Q I'm using is pretty close to P, and the points on the sphere/earth to be projected are pretty near the antipode of P/Q, possibly clustered together, and having a high accuracy on each point in order to differentiate them is important. I'm wondering if a simple adding of an offset value to P1 will provide a good approximation? I need to preserve conformality and relative distances of projected points (since distance is not preserved in a stereographic projection, but I think that relative distances of points are preserved?). P's and Q's latitude and longitude will be known.

Do let me know if this question is better posted at math.stackexchange.com


texts:
I have a WFS for addresses where geometry is a line with 2 points.
Is it possible to have an SLD that draws a text (i.e. house number) along the line using the line as vector defining the text direction?


texts: "Zonal statistics" for two polygon layers using ArcMap

texts:
I have 2 polygon layers:

one is a vector grid with attribute values for each "polygon cell"
the other including administrative boundaries

I would like to calculate the mean value of all attribute values within each polygon of the administrative boundaries.
I know that ArcGIS offers the Zonal Statistics tool, but I would have to convert everything to raster.
I know of the GME extension which includes a polygon in polygon analysis.
But I was wondering if there is any built-in function within ArcMap?


texts: How fix lengthen tile created by geo tools?

texts:
I use gdal2tiles.py for creating tiles from a tif with EPSG:4326. The geotiff information in qgis is as follow:

For zoom=0, x=0 and y=0 it create a tile as follow:

I followed this tutorial to creating tiles with geotools(with Bbox: [-180, -90, 180, 90]), but the output is as follow:

I want to show the tiles in openlayers. But tiles are long in y direction.
What's the problem? Why is the tile long? What is there that I have not considered?


texts: Filtering a value relation selection box with an expresion when one column has string LIKE the other Column

texts:
Oke I have setup two value relations between one polygon layer and two tables, this is to make the selection of multiple values possible. The first value relation is not really that important you just have a multiple selection of value's that is being the main-code. Note xy are placeholders, because of privacy reasons I cannot just post these codes publicly.

For example:

Main code: xy1, xy2, xy3, xy4

Edit: 22/05/2020

New added detail:
These are part of a multiple selection list. So one Object can have xy1 and xy2 for example.

The second value relation is that basically that you have the main code, a subcode and a completed code that is composed of a merger of the main code and the subcode.
For example :

Maincode: xy1
Subcode : f
Completed code: xy1f

This completed code is the one that is being selected but of course I want this selection to be filtered based on the main code. You may just ask ""why not just use another column being the subcode and then go futher from there?". That is because the subcode does not always appear in every main code.

Edit 22/05/2020:
The selection of the subcode is also multiple choice.
For example xy1 has subcodes a & b, but xy4 does not have subcode b.

The problem is I do not exactly know how to refer to the polygon layer itself in the field calculator. Not to mention since you have multiple value's being selected in that column so I kind of know you have to a LIKE 'maincode polygon layer' command but so far I can only refer to the table not the polygon layer table.


texts:
I'm trying to apply seperate equations for different land types.  I have created a raster containing only the land type I'm interested in.  I then reclassed the values to '0'.  My plan was to use the raster calculator with the equation and add + "reclassed raster", which would be +0, thus only returning values that are within the area I'm interested in.  However, when I try the calculation, it doesn't work properly, giving me something like values from -3e20 to +3e20 but there are no values or points actually there.  If I do the raster calculator without the "+ reclassed raster", it works perfectly, so the equation itself (or other data layers) is not the problem.  If I look at the reclassed raster, there is no attribute table, and every time I try to build one it fails.  Any ideas on what's going wrong or a better way to do this?  Thanks!!!

Yes, it's ArcGIS 10.1 with Spatial Analyst.  The reclassify doesn't give me an empty raster (only no attribute table), it's only when I use the raster calculator.


texts: Rotating photos to show images in landscape with QGIS Importphoto Plugin?

texts: I am working in QGIS to build a database of historical photos. Using the importphotos plugin I have the images in my map but when displaying I have to rotate those taken in portrait view (Dims: 2448 width x 3264 height) when all other shots taken in landscape (3264 width x 2448 height) stay rotated correctly. Is there an adjustment to the base code or some fix to ensure all images are rotated correctly?


texts: Seeking crosswalk of census tract to town instead of CDP?

texts: I'm trying to match towns from a dataset to Census tracts in the year 2000, with FIPS code as a place identifier. I'm aware of http://mcdc2.missouri.edu/websas/geocorr2k.html#GFOPTS, the GeoCorr service provided by U Missouri, but this crosswalk only has places at the CDP (Census designated place) and borough level for many municipalities in New England. The data I am trying to match has places at the town and township level. For example, in GeoCorr, only Adams CDP MA, with FIPS code 590, is listed, whereas my dataset lists Adams Town MA, with FIPS code 555. Google maps indicates they occupy approximately the same location, but Census Bureau Quickfacts suggests these two places are in fact different.


texts: Map text is truncated when tiles are created in tilecache

texts:
I'm using TileCache between our corporate WMS (Cadcorp Geognosis in this case) and an openlayers map, serving Ordnance Survey data at all levels from OS MiniScale right down to MasterMap Topo.

It's all working fine with the Raster tiles, but I get down to the Topo layer (stored in a SQL Server database if that makes a difference) map text is truncated if it goes over the edge of a tile.

I know WHY this is happening, when the tile is requested from the WMS, it doesn't have the text point in its bounds, so no text is rendered. Is there a way of fixing this? Can I tell TileCache to pull off a 768x768 tile from the WMS and return the middle 256x256? Is it an issue with my WMS? Should that be handling it better?


texts: GRASS init error: GRASS was not found in '/Applications/GRASS-7.2.app' (GISBASE), provider and plugin will not work

texts:
I get this same error even though my GRASS app is in '/Applications/GRASS-7.2.app' has anyone found a solution to this problem?

Plugins / GRASS / GRASS options / General / custom / browse: then I choose '/Applications/GRASS-7.2.app'

Then in the modules tab I leave the default.

I have a MAC, everything updated, and QGIS is the most recent 2.18.14.


texts:
under photoshop, I have different layers, each representing a region and a background which the country.
I would like to make an animated map for the web, that is when the mousse is over a region, it is highlighted and when a region is clicked, the user is redirected to another web page (concerning the region).
I gess the way to do this is to use flash, however I am opened to other suggestions.

So how would you deal with this problem?

ps: I have no knowledge of flash yet


texts: Working with 2 rasters, having different extents but same resolution, in ArcGIS raster calculator?

texts:
I am working with 2 rasters, having different extents but same coordinate system and resolution,  in Arcgis 10.5. The larger raster has 0 and smaller raster has 1 values. I want to make a new raster such that smaller raster boundary has 1 value and rest of the boundary in larger raster has 0. I have set the null values as 0.

raster 1 (larger extent) + raster 2 (smaller extent) results in raster 2 (smaller extent). I set extent as raster 1 in settings.

Could you suggest me what's wrong?


texts: Why a range in area for catchments even if stream definition is set at a single size?

texts: Using ArcHydro, I set stream definition at 5000, 20x20 cells (approx. 50 acres).  I placed points at origins of each subsequent stream with batch point generation tool. Then used batch watershed generation, which gave me 23 watersheds ranging in size from approx. 50 acres to 82 acres.  Why the range in watershed sizes?


texts: Create largest circle (maximum radius) inside a polygon in ArcGIS for Desktop?

texts:
I am trying to create the largest possible circle inside a polygon including its perimeter and area size. I created via minimum boundary geometry the smallest possible circle outside a polygon (see image) and want to do some calculation with its largest circle inside the polygon. I have a shapefile of 25 polygons. Each has to have its own largest circle. This circle can be anywhere in the polygon, not necesserily at the centre since my polygons are uneven.

I tried looking at Find maximum radius of circle that will fit within an irregular polygon? but it was no success. I have the same problem as the OP.


texts: Referring to NaN or ±∞ (special floating point values) in ArcMap definition queries?

texts:
I have by chance discovered how ArcMap displays special floating point values to the user.

+∞ (positive infinity) is displayed as 1.#INF
–∞ (negative infinity) would supposedly be displayed as -1.#INF — I haven't verified this one.
NaN (not a number) is displayed as a right-aligned <Null> — not to be confused with left-aligned <Null>, which denotes NULL (missing values):

(Get unique values in the field calculator does not list NaN at all, by the way.)

But I haven't discovered how to write layer definition queries to select rows based on these special values:

ColumnName IS NULL will only select regular NULL values, but non NaN.
ColumnName = 1.#INF is rejected as having invalid syntax.

Does anyone know how to do this?

C# ArcObjects code snippet for storing a 1.#INF value to a table field (basic concept):

As requested. Since I'm no longer at work, the following is not the real code I used and I cannot test it right now, but it should produce the effect shown in the screenshot above:

ITable table = …;
int doubleFieldIndex = table.FindField(…);
IRow row = table.CreateRow();
row.Value[doubleFieldIndex] = double.PositiveInfinity;
row.Store();


texts: Raster formats that support colormaps for floating-point data in GDAL?

texts:
I am writing a program to overlay a raster image over a map in a KDE Marble project.  I am using a combination of QGIS and GDAL to convert non-standard NetCDF data to a raster file.  I began using GeoTIFF as there is wide support for reading and writing in the format; however, the data cannot be assigned a colormap because it is floating point.  Any way around this?  I tried one workaround which was to do:
gdaldem color-relief myfile.tif mycolorfile.clr output.tif

but the metadata returned all zeros for each colorband.


texts: Using 'updateMask().not()' in Google Earth Engine

texts:
I am trying to mask out part of an image(tiff) with another image(tiff) using the 'updateMask' in google earth engine but I keep getting an empty output. The '.not()' is supposed to give the opposite of the output. I want the cleanup to be masked out from the ndviFinal
Map.setCenter(-2.063,6.088,12)

//Importing SENTINEL-2 collection
var St2 = ee.ImageCollection('COPERNICUS/S2')
    .filterDate('2015-01-01','2020-07-15')
    .filterBounds(galamsey_aoi)
    .select(['B1','B2','B3','B4','B8','B9','B11','B12'])
      .filter(ee.Filter.lt('CLOUDY_PIXEL_PERCENTAGE',5))
      .median()
      .clip(galamsey_aoi);

//Display SENTINEL-2 image
var s2_palette = {bands: ['B11', 'B8', 'B4'], min:300, max: 4550}; // specify false color palette
Map.addLayer(St2,s2_palette,'Sentinel 2 (2015-2020)', false);

// NDVI Composite
var ndvi = St2.normalizedDifference(['B8','B4']);

var ndvi1 = ndvi.gt(0.3).not().selfMask();

var ndvi2 = ndvi.lte(0.018).and(ndvi.gt(-0.07));

var ndviFinal = ndvi2.blend(ndvi1).selfMask();

//Preparing masking

//Adding an ID to a feature collection
var addID = function(feature) {
  return feature.set({id: 1});
};

// Map the ID function over the FeatureCollection and converting to Image (osm settlement).
var osm_settlement = osm_settlement.map(addID)
                    .reduceToImage({
                    properties:['id'],reducer:ee.Reducer.first()
                    }
                    );

//Clipping osm_settlement to project area
var mask1 = osm_settlement.clip(galamsey_aoi)

//Creating a buffer of 40m
var buffer = function(feature) {
  return feature.buffer(40);
};
var road_buffer = table.map(buffer)

var road = road_buffer.map(addID)
                    .reduceToImage({
                    properties:['id'],reducer:ee.Reducer.first()
                    }
                    );

//Merging or combining all the mask
var cleanup = mask1.blend(builtup).blend(road).mask().clip(galamsey_aoi).selfMask();
Map.addLayer(cleanup,{min:0 , max:1, palette:['yellow']},'cleanup', false)
Map.addLayer(builtup,{min:0 , max:1, palette:['yellow']},'builtup', false)

print(builtup)
print(ndviFinal,"ndviFinal")

// Creating of final mask
var maskComposite = ndviFinal.updateMask(cleanup.not()).selfMask()

//Display of NDVI composite
Map.addLayer(ndviFinal, {min:0, max:1,  palette:['green']},'ndviFinal', false)
Map.addLayer(maskComposite, {min:0, max:1,  palette:['red']},'maskComposite', false)

https://code.earthengine.google.com/60f9cc570c405145c1e572ce8efd9384


texts: Error message when correcting collected GPS data in Pathfinder office

texts:
I am new to this forum, but I need some help. I am not getting any help from our tech support that sold us our units.

I am post correcting the data, and I am getting two errors all the time, No carrer data, and Baseline exceeded the maximum lenght.

I had no problems before postcoreeceting data, and i am doing it the same way this time to. Is there something I am missing, or Is there a problem here.

Error Messages.

Carrier processing...

Maximum allowed baseline length exceeded.

Corrected 0 positions

Code processing...

Corrected 0 positions

Filtered out 2412 uncorrected positions

(only "Corrected" positions selected for output)

Processing rover file, BCTSC3KB1029A.SSF ...

...to output file, C:\Current Projects\BMO_Project\GPS\BCTSC3KB1029A_2.cor

Carrier processing...

No carrier processing performed as file has no carrier data

Corrected 0 positions

Code processing...

Corrected 0 positions

Filtered out 2412 uncorrected positions

(only "Corrected" positions selected for output)


texts:
I want to find the shortest route connecting three points on a map.
I built up a road network, I snapped three points on the road.

I got this error:

Warning: No route from location "Location 1" to location "Location 2".
Error: No solution found.

I can find the road between point 1 and 3 (of the first map), but I got that error  for the road between 3 and 2 and 1 and 2. The road between 1 and 3 does not even look like it is the shortest path (see below).

Is it possible that can depend on some routes feature that does not me allow me to drive through those? so I can't reach the point 2 and I don't take
the shortest roads.

The procedure I followed:

1) I snapped the points to the road as described here: https://gis.stackexchange.com/a/1433/73176

2) I created the network from the road polyline similarly to this tutorial: http://desktop.arcgis.com/en/arcmap/latest/extensions/network-analyst/exercise-1-creating-a-network-dataset.htm

3) "Network Analyst" --> "New Route"

4) Right click on "Stops", "Add locations.." I added the three points

5) "Solve"


texts: Concatenating fields with label expressions using Python

texts:
I am trying to combine three numeric fields together for a feature's label. I only want to label the feature if it is over 0. The labeled numbers need to be separated a dash ("-"). This is what I attempted to use as the label expression in ArcMap 10.2:

def FindLabel ( [a1], [a2], [a3] ):
    if ([a3]) == 0 and int([a2]) == 0 and ([a1]) == 0:
        label = " "
    elif ([a3]) == 0 and int([a2]) == 0
        label = [a1]
    elif ([a3]) == 0
        label = [a1] + "-" + [a2]
    else:
        label = [a1] + "-" + [a2] + "-" + [a3]
    return label


texts: How can I geocode American rural routes and box numbers?

texts:
I am working on a project where users fill out an online form with address information and a Google Map centered at that address is displayed.  It works fine for traditional addresses (e.g. 123 Main Street, New York, NY) but I have no idea where to start with geocoding rural information.

How can I get map information for rural routes, preferably via Google Maps?  In my form, a user enters a rural route descriptor, a rural route number, a box number, a city, a state, and a zip code.


texts: Given a C# ArcMap custom toolbar with engine source files in a folder is there a way to install the toolbar and engine without going through VS?

texts: I was given ArcMap toolbar and tool engine files without instructions on how to install but the code was done by someone else and it should work. How do I install it in ArcMap 10? I attempted to add the tool by going to customize->toolbar->customize->new and add files, but it wouldn't take the dll files in my directory. Is there another file type it is supposed to take? Or do I need to go through some kind of workaround in VS? I haven't installed ArcMap dev on my version of VS.


texts: Creating multiple line grid frames in QGIS Print Composer?

texts:
I've found an older map with a nice-looking grid frame.

How can I create this with the QGIS Print Composer (also programmatically with Python)? I didn't found anything to control the line style of the grid frame.

*Update

There is the possibility to duplicate the grid frame style of the topographic map (see the comment to LaughUs answer). Logically you can't use "Move item content" with another map and a rectangle on top. You have to uncheck these two elements first to move within your map and then you have to adapt the extents.

I'm wondering why there is an option to change the line style of the grid and not for the frame. Until now I've never used a special line style for the grid lines (multiple lines, etc.) for my GIS work.


texts: How to trigger a Graphic's click event when it gets added to map?

texts:
I'm using Esri Javascript API 4.5
When the map loads, I'm fetching point coordinates from external source and then plotting it on the map using Graphic class and assigning a PopupTemplate to that graphic.
The Case
The graphic is successfully plotted on the map. But in order to view to the popup template, I'm required to click on the graphic.
The Issue
Is there way where I can trigger the graphic's click event when it gets added to the map so that the popup template shows up automatically?
The Code
require([
"esri/PopupTemplate",
"esri/Graphic",
.
.
.
.
"dojo/domReady!"
],
function (
    PopupTemplate, Graphic, ....) {

var point = {
    type: "point",
    x: <some x>,
    y: <some y>
 };

var symbol = {
   type: "picture-marker",
   url: "/euf/assets/nl/images/red-pin.png",
   width: "30px",
   height: "30px"
};

var template = new PopupTemplate({
    title: "New Title",
    content: "New Content"
});

var graphic = new Graphic({
    geometry: point,
    symbol: symbol,
    popupTemplate: template
});
view.graphics.add(graphic); // this works as I can see the marker on page

// now, how do I trigger its click event here?
});


texts: enabling scrolling hstore key/value field

texts:
The key/value widget applied on a Postgres hstore field conveniently shows, for a record, a sub-table containing the various keys and values. If there isn't enough space in the form, this sub-table is resized and some key/values are not visible.

How can one scroll this sub-table? I am currently using QGIS 3.4.15 LTR.

Hstore field using the key/value widget:

Sub-table shows an elevator but is not scrollable:

Long enough form allows showing more fields in the sub-table

edit

Let's note that the scrolling works if the layer is being edited and is editable (i.e. it does not work with a read-only user)


texts: Importing Spatialite database to Postgres on OSX: driver not found?

texts:
I'm trying to import a table called applications from a Spatialite database (called mytable.db) to Postgres (v9.6.5) on OSX.

I have Googled and tried the following:

ogr2ogr -f "PostgreSQL" PG:"dbname=planning" spatialitedb applications

But I get a "driver not available" error:

FAILURE: Unable to open datasource `spatialitedb' with the following drivers.

I've installed gdal with the --complete option:

brew install --env=std --complete --with-postgres gdal

How can I import Spatialite to Postgres?

I'm a bit confused by the above command because I don't know how it indicates that it should used mytable.db as the source of the data. So it's possible that it isn't actually a driver error at all!


texts: Troubleshooting Packaging Error of General function failure?

texts:
Have some problems with sharing my map on ArcGIS Online:

As a student, I am now working with my master thesis and I use ArcGIS Online as a workflow based sharing network. I work locally on my computer and share my work with my supervisor via ArcGIS Online. My supervisor downloads the .mpk file and gives me feedback on my work.

This has worked fine until now. Today I was going to send my updated work and I get the error message:

  Error Packaging - General function failure.

I do exactly the same as before, as follows: log in with my ArcGIS Online account (in arcmap), click File --> Share As, Map Package, overwrite my previous file and hit Share. The analyze process reports no problems. After a while I get the message

  Packaging Error - General function failure.

What to do?

I'm running ArcGIS 10.1 SP1 for Desktop.


texts: Using way-points to create pathway - MATLAB

texts:
I'm currently working on a map routing system and am not sure if anyone has done this before. I have collected various way-point coordinates on the map using Google map.

How can I create a pathway using the way-points to generate the shortest path?


texts: Unable to print using ArcGIS javascript under IE9

texts:
I am trying to print a web map using ArcGIS javascript 3.10 under IE9 but got RequestError: Unable to load /proxy?http://myserver:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task/execute status: 404. However, the same map printed without any problem for IE11, Chorme and Firefox. This seems to me is because of proxy error but only specific to IE9.

The codes as follow:esriConfig.defaults.io.proxyUrl = "/proxy";
function createPrintDijit() {
  var layoutTemplate, templateNames, mapOnlyIndex, templates;
  var path = document.getElementById("path").value;
  var printTitle = document.getElementById("printTitle").value;
  var legendLayers = [];
  var legendLayer = new LegendLayer();
  legendLayer.layerId = "countryParks"
  legendLayers.push(legendLayer);
  legendLayer = new LegendLayer();
  legendLayer.layerId = "amphibianGridMap"
  legendLayers.push(legendLayer);
  var layouts = [{
    name: "Letter ANSI A Landscape",
    label: "Landscape (PDF)",
    format: "pdf",
    options: {
      legendLayers: legendLayers, // empty array means no legend
      scalebarUnit: "Kilometers",
      titleText: printTitle
    }
  }];
  var templates = arrayUtils.map(layouts, function (lo) {
    var t = new PrintTemplate();
    t.layout = lo.name;
    t.label = lo.label;
    t.format = lo.format;
    t.layoutOptions = lo.options;
    return t;
  });
  app.printer = new Print({
    map: app.map,
    templates: templates,
    url: "http://myserver/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
  }, dom.byId("printButton"));
  app.printer.startup();
}


texts: Adding spaces in string using Python parser of ArcMap field calculator

texts:
I am using ArcGIS Desktop 10.6.

I have a integer field [no_lot] which contains values in the following format:
'3 546 777' I need to transfer the data into a text field for joining purposes.

I created a text field named [lot_text]. I ran the field calculator for the field [lot_text] with the following expression:

[lot_text]=[no_lot]

which returned values in this format '3546777', so the space thousand separators have been removed.

How can I calculate the field while keeping the thousand separators using Python or else?


texts: Current logged on user does not have administrative access to Web server of ArcGIS for Server?

texts:
I am using ArcGIS Server Manager to create Web Applications.

I cannot access the applications and the error is:

  The current logged on user does not have administrative access to the
  Web server. Administrative access is required for creating and editing
  Web applications. Please contact your system administrator for further
  assistance.


texts: How to find: 1) Pixels in a raster which distance between them is maximized; and 2) have also the maximum value from all the pixels

texts:
I am not sure if this is possible, at least I could not find the solution.
I have a raster and each pixel has a value. What I try to do is to write a function that finds:

The 5 pixels the distance between those is maximized. Say the 5 pixels most far away from each other.
And, at the same time, the value of those pixels is the maximum possible while satisfying the first condition.

The raster looks like below, yet this question is general and may be applied to any sort of rasters. Particularly this raster has values on solar radiation (W/m2).
http://www.mediafire.com/download/t7xl9adxz3764f3/solar_dni_20130102_00UT.txt

setwd("/Users/mercel/Documents/Australia")
library(SDMTools)
library(raster)
file.rename("solar_dni_20130102_11UT.txt",
        "solar_dni_20130102_11UT.asc")
dat <- read.asc("solar_dni_20130102_11UT.asc")
str(dat)
r <- raster.from.asc(dat)
...

The version I am using is ArcMap 10.2. And I have Python 27 and Python 35 installed.
I have tried to do it applying 'Euclidean Distance' and other functions per default in Desktop, yet I believe this may required some sort of optimization coding, which I do not have previous experience with. Hence I cannot provide an example of the code developed so far, because really I don't know even where to start from. Therefore someone with more experience than I, may know how to approach this problem.

Error found by executing the code of FelixIP below, in the Python window of ArcMap 10.2:

Runtime error
Traceback (most recent call last):
  File "<string>", line 24, in <module>
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\__init__.py", line 202, in SetProgressor
    return gp.setProgressor(type, message, min_range, max_range, step_value)
  File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\geoprocessing\_base.py", line 83, in setProgressor
    self._gp.SetProgressor(*gp_fixargs(args, True)))
AttributeError: Object: Error in parsing arguments for SetProgressor

Error when copying the .py into C:\Python27\ArcGIS10.2\Lib\site-packages\pythonwin, and try to run it from PythonWin 2.7.5 (32):

File "C:\Python27\ArcGIS10.2\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 323, in RunScript
debugger.run(codeObject, __main__.__dict__, start_stepping=0)
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\pythonwin\pywin\debugger\__init__.py", line 60, in run
_GetCurrentDebugger().run(cmd, globals,locals, start_stepping)
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\pythonwin\pywin\debugger\debugger.py", line 654, in run
exec cmd in globals, locals
  File "C:\Python27\ArcGIS10.2\Lib\site-packages\pythonwin\Script.py", line 1, in <module>
try: arcpy
NameError: name 'time' is not defined`


texts: Why input layers do not have the same grid extent in the processing, hydrological analysis?

texts:
I'm trying to generate the hydrological analysis using processing and I have already done some terrain processing using the DEM.

In this moment, I'm working in he channel network but, when I assign in the elevation (the DEM) and in the Initiation Grid (the catchment area) the program gives me error.

Here are the screen shots of what has been generated:


texts: NHD Utilities (National Hydrography Dataset) for newer versions of ArcGIS

texts:
Applied GIS ArcGIS utility question here that maybe somebody stumbles across.  I am using the United States Geological Survey National Hydrography Dataset dataset - rivers, lakes, flow directions, watersheds, etc.  It is designed for ArcGIS 10.5.1 but suggests that it is designed for compatibility with future versions of Arc.  (https://www.usgs.gov/core-science-systems/ngp/national-hydrography/tools) *No need to read this, just in case someone was interested...
If anybody has experience using these utilities on different ArcGIS versions please let me know HOW.  I did e-mail the USGS so I will update this post if intel is ever delivered.


texts:
I'm working with MapServer/PostGIS using OpenLayers to display map.  I'm trying setCenter map but it is not working!

My code:

var bounds = new OpenLayers.Bounds(107.567139, 12.326586, 108.258591,
        12.890796);
var options = {
    controls : [],
    maxExtent : bounds,
    maxResolution : 0.0010217594533836,
    projection : "EPSG:4326",
    units : 'degrees',
    allOverlays : true
};

map = new OpenLayers.Map('map', options);
.....
//Declare some layers wms
.....
map.addLayer(wms_RanhGioi);
map.addLayer(wms_GiaoThong);
map.addLayer(wms_ATM);
map.addLayer(wms_Cafe);
map.addLayer(wms_KhachSan);
map.addLayer(wms_NhaHang);
map.addLayer(wms_TramXang);

map.addControl(new OpenLayers.Control.LayerSwitcher({
    'ascending' : false
}));
map.addControl(new OpenLayers.Control.PanZoomBar({
    position : new OpenLayers.Pixel(2, 15)
}));
map.addControl(new OpenLayers.Control.Navigation());
map.addControl(new OpenLayers.Control.Scale($('scale')));
map.addControl(new OpenLayers.Control.MousePosition({
    element : $('location')
}));
map.zoomToExtent(bounds);
map.setCenter(new OpenLayers.LonLat(12.67812, 108.04401), 5);

Can somebody help me?