texts: issues with incorporating sub model which includes iterating featureclasses as output

texts:
Does anyone know why my model builder does not work when I tried to incorporate a sub-model into my main model?

This is my problem:

I created a sub model in which copies featureclasses within a folder to another folder. I used the iterator featureclass to copy all of it and used $name% as my output name for each feature classes. I've set the input workspace and output it as my model parameters.

I then added the sub model into my main model which shows up with model parameters. It is connected to my merge process as the input.

I ran the model as a whole and it gave me error 000229: Cannot open ...\%Name%.shp warning. Failed to execute (Merge ALL feature classes in processing Folder)

This seems like the issue in which ArcGIS can not locate my featureclasses as it seems to interpret %name% as a shapefile name when it is the output from iterators?


texts: ArcMap sql server query not working in labeling

texts:
We have a computer that just upgraded to windows ten. This is the only computer on windows 10. The arcmap version and drivers for ODBC and sql seem to all match up. We are dynamically segmenting to tables on multiple sql servers. On one particular sql server using the sql query in the labels tab doesn't seem to work on one of our sql servers. Can't seem to figure this out. Any ideas?

These are the steps to the sql query options for those who haven't used it.

right click on layer > layer properties > labels tab > method: define classes and label each class > sql query

arcmap version 10.3.0.4322
the data is coming from a sql server
It is being accessed by route event layer (dynamic segmentation).
example query. (Status = 2  AND Type = 'AA'  AND current = 1)

this works on one sql server but not on another.


texts: Preventing webkitMovementX is deprecated error?

texts:
I am developing a webpage using JSAPI for ArcGIS server. I keep on getting this error on console :

  'webkitMovementX' is deprecated. Please use 'movementX' instead

what dose this error message mean, and is there a way to prevent the error?

I am calling map services of ArcGIS 10.3 server and this is what I reference for code:

  rel="stylesheet"
  href="http://js.arcgis.com/3.13/dijit/themes/nihilo/nihilo.css"

  rel="stylesheet" href="http://js.arcgis.com/3.13/esri/css/esri.css"

  rel="stylesheet" href="inc/layout.css"

  script src="http://js.arcgis.com/3.13/"

I am using Chrome Version 45.0.2454.101 m


texts: Tiles from gdal2tiles won't appear on leaflet map

texts:
I added the OSM tiles and my tiles(193ortho) which I am serving from the same folder that html file is in, but the tiles I made won't appear. The tiled images appear fine in the webviewer that is created when you tile out an image.
I followed this tutorial:
http://build-failed.blogspot.com/2012/11/zoomable-image-with-leaflet.html

<link rel="stylesheet"
     href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />


texts: How can I label feature using sld file in geoserver for symbols?

texts:
I generate the sld file from Qgis and upload it to the geoserver. My sld file looks like following,

<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" version="1.0.0" xmlns:sld="http://www.opengis.net/sld" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc">
  <UserLayer>
    <sld:LayerFeatureConstraints>
      <sld:FeatureTypeConstraint/>
    </sld:LayerFeatureConstraints>
    <sld:UserStyle>
      <sld:Name>PGA_100_reclass</sld:Name>
      <sld:FeatureTypeStyle>
        <sld:Rule>
          <sld:RasterSymbolizer>
            <sld:ChannelSelection>
              <sld:GrayChannel>
                <sld:SourceChannelName>1</sld:SourceChannelName>
              </sld:GrayChannel>
            </sld:ChannelSelection>
            <sld:ColorMap type="values">
              <sld:ColorMapEntry quantity="1" label="Low: PGA < 0.015, MMI < 5" color="#00b04f"/>
              <sld:ColorMapEntry quantity="2" label="Moderate: PGA 0.015 - 0.047, MMI 6 - 7" color="#ffbf00"/>
              <sld:ColorMapEntry quantity="3" label="High: PGA 0.047 - 0.149, MMI 8 - 9" color="#ff0000"/>
              <sld:ColorMapEntry quantity="4" label="Very high: PGA > 0.149, MMI > 10" color="#a80000"/>
            </sld:ColorMap>
          </sld:RasterSymbolizer>
        </sld:Rule>
      </sld:FeatureTypeStyle>
    </sld:UserStyle>
  </UserLayer>
</StyledLayerDescriptor>

The layer working fine until I updated my sld file. While I tried to validate this sld, it popup with  following error,

org.xml.sax.SAXParseException; lineNumber: 18; columnNumber: 63; The value of attribute "label" associated with an element type "sld:ColorMapEntry" must not contain the '<' character.

I know this mean I can't use "<" and ">" sign in sld:ColorMapEntry. But is there any possible way to add these symbol in label?


texts: Using If Then Else statement in ArcMap ModelBuilder?

texts:
I have a model that adds several fields, two which are manual inputs (County Name and User). I am manipulating several parcel layers (approx 90 counties).

In my model, one field takes the state and county ID's and (FIPS) calcs them together. The next field is a manual input of the county name (Which I enter). I want to write a if then statement in a calc value of this field from another feature.

Essentially in my parcel layer, I want the county name to automatically calculated based off the FIPS column in my parcel layer and in my county layer. So If FIPS = FIPS (From my county layer), then calc county name (in my parcel layer). Is this possible?


texts: How to run ogrinfo for files listed in a CSV?

texts:
I am using this code to extract info's of all the tab files in a folder. We have a csv list which has, say 100 file names out of 500 files in that folder. How to modify the code only to do ogrinfo's on those particular 100 files listed in a csv ?

for /R .\ %%f IN ("*.tab") DO ogrinfo -al -so "%%f" >>U:\QAQC_131.csv

Edit: This code works fine for me, even the file path has spaces in it

for /F "delims=" %%i IN (D:\QAQC\Open_multi.csv) DO ogrinfo -al -so "%%i" >>U:\QAQC_131.txt


texts: GeoServer behind a reverse proxy with CORS problems using buttons

texts:
I've set up a simple GeoServer on a Ubuntu server, behind an NGINX reverse proxy. The proxy is at map.mydomain.com and passes incoming port 80 requests on a subdomain to another internal port.
I can access the web interface all no problems, log in etc. But whenever I try to use most buttons (save/apply/etc) I get a CORS error: "Origin does not correspond to request".
This is a snapshot of the request on clicking one of these buttons:

I have followed the below to enable CORS, but no luck. This is the default GeoServer 2.18.0 install, so it is using Jetty.
Enabling CORS in GeoServer (jetty)?
All I can figure is somewhere, some bits of Jetty may be expecting 127.0.0.1 rather than maps.ourdomain.com but for the life of me I can't figure out how or why it's only on button clicks!
proxy config:
    proxy_pass http://127.0.0.1:3201/$1$is_args$args;
    proxy_http_version 1.1;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;


texts: What is name of dataset in GEE to estimate level of urbanization for each county (district) in a country /region?

texts:
I am epidemiologist, not remote sensing expert.   I am interested to find association between disease incidence /reported cases with urbanization (hypothesis " more bigger cities , more incidence".
Is there any dataset in GEE CATALOG from which to extract the extent of urbanization?
I did calculated urban index with Landsat and then estimated mean for each county but I am getting negative values. I do not why.


texts: For my web map application http://ian01.geog.psu.edu/geoserver/www/pa/pa3.html I have three levels of background imagery as the user zooms in. At small scales I'm using NASA Blue Marble and a large scale I have 1ft USGS orthos which are both great. However at medium scales I'm using Landsat imagery and it looks poor (to say the least), so can anyone suggest a good source of free imagery for the US (this case is PA but I need to do other states too). Preferably WMS servers.


texts: How to get the overlap parts of polygon features in a same layer by QGIS?

texts:
I have a polygon layer, some features are overlapped.
I want to get the overlapped part(s) and save them to another feature.
For example,
1 polygon(0 0, 2 0, 2 2, 0 2, 0 0)
and
2 polygon(1 1, 3 1, 3 3, 1 3, 1 1)
the result of 1 and 2
is polygon (1 1, 2 1, 2 2, 1 2, 1 1)


texts: Selecting polygons which contain at least one point with spatial index using PyQGIS

texts:
I have a points shapefile and a polygon shapefile. I would like to select all the polygons which have at least one point in them.
The problem I'm running into is how long this takes. I have 1 million points and about 320,000 polygons, so using spatial query takes far too long. I've heard that I'd need to write a Python script with spatial indexing to get a feasibly quick result, but I have no idea how to approach this.
I don't mind if it's a little inaccurate if it runs significantly quicker.
What I've tried to cobble together from other stack overflow questions is:
pointProvider = self.pointLayer.dataProvider()
all_point = pointProvider.getFeatures()
delta = 0.1

for point in all_point:

    searchRectangle = QgsRectangle(point.x() - delta, point.y()  - delta, point.x() + delta, point.y() + delta)

    candidateIDs = line_index.intesects(searchRectangle)

    for candidateID in candidateIDs:
        candFeature == rotateProvider.getFeatures(QgsFeatureRequest(candidateID)).next()
        if candFeature.geometry().contains(point):

            break

This throws up a NameError:

name 'self' is not defined


texts: Merging layers with preferences or ranks using ArcGIS Desktop?

texts:
I want to make a "Mosaic" or a "Compilation" of 20  shp. layers which some of them are overlap. The layers has a field named "Year" and I want the newest be on top and delete the overlap older shps data "under" it.
I didn't find Union or Merge tools helpful because the union do not delete overlap data, (I ranked it) and the merge tool make it random.

Is there any option to merge the layer but with ranks or preferences?


texts: How can I write texts with different colors per text in the same window message using  MapBasic?


texts: Best place to download or purchase shapefiles for Louisiana Parish?

texts: I am looking for shapefiles to either download or purchase for the BEAUREGARD Parish in Louisiana. I have been able to find files for the Townships and Sections but I am in desperate need of a shapefile with TRACTS. If anyone know where I could obtain something like this it would be greatly appreciated.


texts: How to close multipart polyline gaps in ArcMap

texts:
I have a multiple multipart contour lines that originally came from CAD drawing. I converted these into a polyline shapefile in ArcGIS. The issue I have is with gap in each contour lines that are direct result of CAD text annotations for contour value. These gaps differ in size.

Is there a way to snap multiple lines to their closest nodes at once in ArcMap (or using any other tools)? I attach a screenshot of the contours from ArcMap:

Many thanks in advance,
Magda


texts: Adding GeoTIFF image to GeoServer: failed to create reader from file

texts:
I'm trying to add a GeoTiff-file to GeoServer through adding a raster data source, but whenever I try to add my file, I get the error 'Could not list layers for this store, an error occurred retrieving them: Failed to create reader from file:///mnt/hgfs/VMSharedData/newmaps/download.tiff and hints null'.
I suspect it's something with the information of the file, but I can't find out what. I've ran gdalinfo on it and this was the output:

http://pastebin.com/DQqremJt

To confirm that the problem is within the file, I've tried downloading another GeoTiff file from TrueMarble, and that file did indeed upload correctly.
This is the gdalinfo output from the TrueMarble file:

http://pastebin.com/23pajuri

Does anyone know what the error might be? Does my file lack any data?
I'm afraid I don't know much about GIS in general, so any help people here could provide me would be very valuable.

UPDATE -- EXTRA INFORMATION:
I couldn't open the incorrect file with GIMP, but it opened just fine with QGIS.
The GeoServer log says "Projection not supported" when I try to upload the incorrect GeoTIFF-file.


texts:
I am trying to find the nearest centerline segment to an address point. I was hoping that I would be able to use the ShortestLineTo method, but it is not working. I have tested with Microsoft's examples and they work. I am unable to get the method to work.

Here is Microsoft's Example:

DECLARE @Shape1 geometry = 'POLYGON ((-20 -30, -3 -26, 14 -28, 20 -40, -20 -30))'

DECLARE @Shape2 geometry = 'POLYGON ((-18 -20, 0 -10, 4 -12, 10 -20, 2 -22, -18 -20))'

SELECT @Shape1

UNION ALL

SELECT @Shape2

UNION ALL

SELECT @Shape1.ShortestLineTo(@Shape2).STBuffer(.25)

GO

My Sample:

Select l.ADDRESSPOINT_TAX.shape from l.ADDRESSPOINT_TAX where OBJECTID = '1'

union all

select l.CADCENTERLINE.SHAPE from l.CADCENTERLINE where OBJECTID = '1'

union all

select l.ADDRESSPOINT_TAX.Shape.ShortestLineTo(l.CADCENTERLINE.SHAPE)

This is the error that I am getting back.

Remote function reference 'l.ADDRESSPOINT_TAX.Shape.ShortestLineTo' is not allowed, and the column name 'l' could not be found or is ambiguous.

Msg 4121, Level 16, State 1, Line 1

Cannot find either column "ADDRESSPOINT_TAX" or the user-defined function or aggregate "ADDRESSPOINT_TAX.Shape.ShortestLineTo", or the name is ambiguous.

Thanks!


texts: Why does python.exe stop working in pyqgis standalone script?

texts:
I want to create a simple standalone pyqgis script but I have some unexpected errors.

Here is my .bat file :

@echo off
SET OSGEO4W_ROOT=C:\OSGeo4W
call "%OSGEO4W_ROOT%"\bin\o4w_env.bat
call "%OSGEO4W_ROOT%"\apps\grass\grass-7.2.1\etc\env.bat
@echo off
path %PATH%;%OSGEO4W_ROOT%\apps\qgis\bin;%OSGEO4W_ROOT%\apps\grass\grass-7.2.1\lib
set QGIS_PREFIX_PATH=%OSGEO4W_ROOT:\=/%/apps/qgis
SET PYCHARM="C:\Program Files\JetBrains\PyCharm 2017.1.4\bin\pycharm.exe"

set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\qgis\python;
set PYTHONPATH=%PYTHONPATH%;%OSGEO4W_ROOT%\apps\Python27\Lib\site-packages;

set QGISPATH=%OSGEO4W_ROOT%\apps\qgis

start "PyCharm aware of QGIS" /B %PYCHARM% %*

First I try to see if the processing tool works.

Here that code :

def test1():
    qgs = QgsApplication([],True)
    QgsApplication.setPrefixPath("C:/OSGeo4W/apps/qgis", True)
    qgs.initQgis()
    sys.path.append('C:/OSGeo4W/apps/qgis/python/plugins')
    import processing
    from processing.core.Processing import Processing
    Processing.initialize()
    print processing.alglist()
    qgs.exitQgis()
test1()

Work fine I take the list correct

After I try to see if work algorithm where I want

Here the code :

def slope():
    qgs = QgsApplication([],True)
    QgsApplication.setPrefixPath("C:/OSGeo4W/apps/qgis", True)
    qgs.initQgis()
    sys.path.append('C:/OSGeo4W/apps/qgis/python/plugins')
    import processing
    from processing.core.Processing import Processing
    Processing.initialize()
    print processing.alghelp('gdalogr:slope')
    qgs.exitQgis()

slope()

and I get this message :

C:\OSGeo4W\bin\python.exe C:/Users/username/PycharmProjects/untitled/test.py
ALGORITHM: Slope
    INPUT <ParameterRaster>
    BAND <ParameterNumber>
    COMPUTE_EDGES <ParameterBoolean>
    ZEVENBERGEN <ParameterBoolean>
    AS_PERCENT <ParameterBoolean>
    SCALE <ParameterNumber>
    OUTPUT <OutputRaster>

None

Process finished with exit code 0

But anytime to try to run some script with complete code like this :

from qgis.core import QgsApplication
import sys
from qgis.core import QgsRasterLayer
from PyQt4.QtCore import QFileInfo

def slope(raster_path,slope_path):
    qgs = QgsApplication([],True)
    QgsApplication.setPrefixPath("C:/OSGeo4W/apps/qgis", True)
    qgs.initQgis()
    sys.path.append('C:/OSGeo4W/apps/qgis/python/plugins')
    import processing
    from processing.core.Processing import Processing
    Processing.initialize()
    fileInfo=QFileInfo(raster_path)
    baseName=fileInfo.baseName()
    rLayer = QgsRasterLayer(fileInfo.filePath(), baseName)
    processing.runalg('gdalogr:slope',rLayer,1.0,True,True,False,1.0,slope_path)
    qgs.exitQgis()

raster_path="C:/Users/username/Desktop/dem.tif"
slope_path="C:/Users/username/Desktop/slope.tif"
slope(raster_path,slope_path)

Then before script finishest the python.exe stops running:

and I get this message in pycharm :

C:\OSGeo4W\bin\python.exe C:/Users/username/PycharmProjects/untitled/test1.py

Process finished with exit code -1073741819 (0xC0000005)

I get that message for all scripts with different Python code and specific  different algorithms if I want to run it standalone using pycharm editor.

Any idea why python.exe stops working?


texts: Synching QField to my desktop QGIS project

texts: I have created a project in QGIS on a desktop and transferred to a mobile device before digitising features using QField. How do I then synch the changes I have made on my mobile device back to my desktop QGIS project so that the new changes appear?


texts: Separate isolated polygons using PostGIS

texts:
I am new to PostgreSQL and have been trying to separate polygon features in a PostGIS Table into 2 different Tables based on a condition. All polygons which touch or overlap with one another needs to be added to one table; this I have achieved with the following query:

CREATE TABLE public.table_touches AS
(SELECT a.gid
     , a.geom
  FROM public.sample_data a
  JOIN public.sample_data b ON a.geom && b.geom AND ST_Touches(a.geom, b.geom) or ST_Overlaps(a.geom,b.geom)
WHERE a.gid <> b.gid )
;

The initial sample data looks like this:

The output table is as follows:

This all seems to work well and efficient enough for me.

However, what I now need to do is to add the "removed" polygons to a separate table. My desired output for this sample data should look like this:

I have tried the following query with no luck:

CREATE TABLE public.table_isolated AS
(SELECT a.gid
     , a.geom
  FROM public.sample_data a
  JOIN public.sample_data b ON a.geom && b.geom AND NOT (ST_Touches(a.geom, b.geom) OR ST_Overlaps(a.geom,b.geom) OR ST_Intersects(a.geom,b.geom))
 WHERE a.gid <> b.gid )
 ;

Any ideas on how I can create this "table_isolated" Table?

The input table contains around 600 000 polygons, I suspect approximately 5-10% of these will be "isolated". I am also using a spatial index on the input Table.


texts: How arcMap tool run in async mode with arcpy?

texts:
I am using python in arcmap 10.0 to execute "Topo To Raster" tool. I am successful to execute this in blocking/sync mode. but I want to execute this tool with python in async mode.

workspacePath = sys.argv[1]
input = sys.argv[2]
output = sys.argv[3]
arcpy.TopoToRaster_3d(input,output)


texts: How fix Error: This method has been removed in JSZip 3.0, please check the upgrade guide

texts:
I want to use shp-write for creating shp from geojson with pure javascript. I use it as follow:

var options = {
    folder: 'myshapes',
    types: {
        point: 'mypoints',
        polygon: 'mypolygons',
        line: 'mylines'
    }
}
// a GeoJSON bridge for features
shpwrite.download({
    type: 'FeatureCollection',
    features: [
        {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [103.0078125,47.39834920035926],
            [53.61328124999999,47.39834920035926],
            [94.921875,28.613459424004414],
            [103.0078125,47.39834920035926]
          ]
        ]
      }
    }
    ]
}, options);

but this occur an error as follow:

Where is problem? How do I fix it?


texts: What is the difference between these two CRS and why affects the hillshade rendering?

texts:
I am working with a 2m rater files which are in the Swedish SWEREF99 18 00 (EPSG:3011)

The Proj4 information when selecting the CRS with the EPSG code inQGIS is:

+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs

but when I get the files with a .prj file with the text inside

PROJCS["SWEREF99_18_00",GEOGCS["GCS_SWEREF99",DATUM["D_SWEREF99",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",18],PARAMETER["scale_factor",1],PARAMETER["false_easting",150000],PARAMETER["false_northing",0],UNIT["Meter",1]]

produces a Proj4 text like this:

+proj=tmerc +lat_0=0 +lon_0=18 +k=1 +x_0=150000 +y_0=0 +ellps=GRS80 +units=m +no_defs

So, the text +towgs84=0,0,0,0,0,0,0 is missing.

My first thought was that the standard EPGS code should be my choice, but the hillshade view does not look nice, below the view when the EPSG 3011 is selected (also as the CRS of the project):

And here when I do not force the selection of the EPSG code (no +towgs84=0,0,0,0,0,0,0 in the CRS description)


texts:
I have a requirement to create a layer on map, Client have provided me only the shape files(.shp). As i am very new to GIS, i was reading about it and found we need to convert the shapefile into GeoJson and load the co-ordinates on map.

Continued further to convert the .shp file to .geojson.

I used ogr2ogr to convert it from terminal, here is the command which i used

ogr2ogr -f GeoJSON -t_srs EPSG:4283 data.json data.shp

Was giving me an error

Unable to open datasource `/home/Gourav/Shape File/2_files/proj1.shp' with the following drivers.
  -> PCIDSK
  -> PDF
  -> ESRI Shapefile
  -> MapInfo File
  -> UK .NTF
  -> OGR_SDTS
  -> S57
  -> DGN
  -> OGR_VRT
  -> REC
  -> Memory
  -> BNA
  -> CSV
  -> GML
  -> GPX
  -> KML
  -> GeoJSON
  -> OGR_GMT
  -> GPKG
  -> SQLite
  -> WAsP
  -> PostgreSQL
  -> OpenFileGDB
  -> XPlane
  -> DXF
  -> Geoconcept
  -> GeoRSS
  -> GPSTrackMaker
  -> VFK
  -> PGDUMP
  -> OSM
  -> GPSBabel
  -> SUA
  -> OpenAir
  -> OGR_PDS
  -> HTF
  -> AeronavFAA
  -> EDIGEO
  -> SVG
  -> Idrisi
  -> ARCGEN
  -> SEGUKOOA
  -> SEGY
  -> SXF
  -> Selafin
  -> TIGER
  -> AVCBin
  -> AVCE00

I even tried with online tool got the same error in json format.

Does it need any other files like .dbf or .shx or is there any other way to load shapefiles on map, i am coming from rubyonrails (Ruby version is 2.0.0) so could not even make use of rgeo-shapefile gem

Please some one tell the meaning of following syntax

ogr2ogr -f GeoJSON -t_srs WGS84 data.geojson data.shp

-f gives the datasource of destination?

Asking first time please excuse me if i could not frame my question properly


texts: How to create a buffer from points and a base map with different coordinate system on QGis?

texts:
I've added some points from a CSV file by their coordinates using the WGS84. It fits perfectly with the shapefile i'm using as a basemap (Sirgas 2000). However, when I try to create a buffer zone around the points (to later intersect with the original shapefile), if I use the WGS projection it occupies all the screen and if I use the Sirgas 2000 it appears as a single circle in what I think to be a random place.

I've been doing this for quite a while on ArcMap, but I didn't have the need to use different coordinate systems. Perhaps I'm just missing something. Can someone bring a light into my problem?


texts: QGIS Attribute Table Format (columns and rows)

texts:
I am having a Data Format problem with Qgis using the timemanager.
I loaded a layer with timecodes and values for 1 point and finally made it work.
Now i dont have one point, but 250.
Those 250 points get some values which you can see below and i want them all to blink if they are over some value.

My problem is, that i cannot join a table to my layer with those 250 points as the IDs (1,2...) are in a row, not in a column.
Using the time as attribute to to connect the table to the shp points wouldnt make too much sence, as they dont have fix time periods, i get about 8 entrys per seconds but those are not fix.

I also tried to transpose the whole thing and have IDs in the column but the time now in a row. But it doesnt seem as timemanager could read the time in a row, also only as column.

So how do i connect all these toghether?

250 Fix points which cointain coordinates, a timeline and values for each of those points for every timepoint.

Time___________1___________2 ___________3________4....

06:58:00.034    0,004508623 0,004181163 0,003086222 0,004710124

06:58:00.175    0,004592869 0,003782109 0,003253361 0,00379351

06:58:00.317    0,003992671 0,004261207 0,003144101 0,001365082

06:58:00.458    0,000380066 0,002662365 0,003144101 0,00379351

06:58:00.594    0,002403072 0,002318961 0,003431217 0,002363509


texts: Creating map label in ArcMap with information from 3 fields

texts:
How do I create a map label in ArcMap 8 with information from 3 fields?
I want a label to contains information from the following fields: Label, Land_Use, Acres.  I want 3 line label.
Top line has the word "Field" followed by the data from the [label] field.
Line 2 will just have the data from the [land_use] field.
Line 3 will have the data from the [Acres] field followed by the word "acres".
Example:
Field 01
Pasture
10 acres
I think I need a "SQL" statement to put in the label manager.


texts:
Is there a plugin or function in QGIS that allows for RGB raster color adjustments to enhance visibility of specific features captured on a map?

Example:

I'd like to enhance contrast and saturation of high resolution orthomosaic to make drainage system (below the soil) more visible and easier to vectorize. Output raster is less saturated (but better color balanced) than original photos from which was made so it makes harder to spot all lines.

It can be obviously done in i.e. Photoshop but due to file size limitations and potential loss of georeferencing I prefer to use QGIS for that.


texts: What is the DNSC08 Mean sea surface model ellipsoid based on?

texts:
Does anyone know what Danish Space centre DNSC08 mean sea surface model uses as the reference ellipsoid?  there is no meta data on the web site:

http://www.space.dtu.dk/English/Research/Scientific_data_and_models/Global_Mean_sea_surface.aspx

There are several publications.
50% state TOPEX (the data comes from the IceSat missions)
50% state WGS84.

The difference between TOPEX and WGS is ~0.7m  which is very significant.


texts: Using da.SearchCursor to get count of unique values in a field

texts:
Is it possible to use arcpy.da.SearchCursor() to get a count of unique features in a field without a dictionary?

So, by this I mean if I have a field called TEXT which contains 10,000 rows populated with either A or B. Can I use the da.SearchCursor to quickly give me the count for the total amount of A in TEXT and B in the TEXT?

I know it is possible to use Summary Statistics or the Get Count tool but these involve having to make a feature layer and then selecting features or kicking out a table. I looking to have a few steps as possible in my script :-)


texts: Network Analysis: Finding fastest route through an area

texts:
I'm working on a project where drivers have to remove snow from the sidewalk of streets.

the drivers will start at the facility go through a certain neighborhood(area) of streets and return to the same facility. My question is there a way to find the fastest route through that area and just return to the facility.

My question does sound similar to other questions posted as I have read questions that sound close to mines, but based on the wording I am not if it fully answers my question. At the moment I am not near the ArcGIS software to test some of the responses.

If anyone has any answers or can point me in the right direction that would be helpful.


texts: How to filter out/in from GroupLayer (hide/show)

texts:
Assuming I have the following groupLayer:
var myGroupLayer = new L.layerGroup();

and I add it to my map:
myGroupLayer.addTo(map);

somewhere in my app I add some layer to myGroupLayer like:
myOptions= {

          "dashArray": [
            10,
            20
          ],
          "weight": 2,
          "pulseColor": "#FFFFFF",
          "paused": false,
          "reverse": false,
          "id":id,
          "show_on_map":true
        }

var flight= L.polyline.antPath(coords, myOptions);
myGroupLayer.addLayer(flight);

Now, at some point I change the show_on_map field to false and I wish not to show them on the map. How can I fiter them out? I have tried to initially set the myGroupLayer with
myGroupLayer .setFilter(f=>{
    return f.properties['options']['show_on_map'] === true;
});

but it didnt work out.


texts: Trying to import a CSV file with polygons to PostGIS

texts:
I have a CSV file with polygons.
I have created table 'sinikia' like this:

CREATE TABLE askisi.sinikia (
    sinikia_id SERIAL PRIMARY KEY,
    name VARCHAR(50),
    area NUMERIC NOT NULL,
    perimeter NUMERIC NOT NULL,
    geom geometry(polygon, 2100));

and tried to import my CSV file, which looks like this:

and I got a PARSE ERROR. I have also tried to put brackets (single and double) to the geometry column, taking the same error.

Afterwards I created another table and instead of geometry I set column 'geom' as a TEXT.

CREATE TABLE askisi.sinikia (
    sinikia_id SERIAL PRIMARY KEY,
    name VARCHAR(50),
    area NUMERIC NOT NULL,
    perimeter NUMERIC NOT NULL,
    geom TEXT);

Importing CSV worked fine but now I can not ALTER column geom from TEXT to GEOMETRY.
I am probably missing something. Is there any idea?


texts: How to smooth discrete raster data with GDAL in C++?

texts:
I am using GDAL in C++ for upsampling land-cover raster data. When upsampling, I would like to smooth out the edges, so that I do not get aliased stairs but nice diagonal lines.

Essentially, the "After" image of "Results with gdalwarp cubic spline" here: Smoothing/reinterpolating raster with GDAL? is exactly what I want.

However, I cannot figure out how it was done. When I use cubic spline for interpolation, I don't get discrete values in the output - the algorithm blends between colors instead of sticking to the existing IDs.

I have also tried other interpolation methods. Nearest neighbor of course does stick with discrete values, but results in aliasing. Other options such as MODE, MIN, MAX don't seem to offer an improvement when upscaling.

Setting the color interpretation to GDALColorInterp::GCI_PaletteIndex didn't seem to change anything either - I assumed that might tell GDAL to handle it as discrete data. Does the raster data itself need to satisfy any specific requirements for this to work as intended?


texts: Calculating volume (Cubature) using QGIS

texts: I would like to use QGIS to do cubature calculations (volume of fill and cut) having as input data an MTN raster layer and a vector layer delimiting my area of interest. However I do not know the commands to perform this task.


texts: ArcMap blurry after update from 10.4 to 10.5

texts:
I had to recently update ArcGIS from 10.4 to 10.5 because of a new license.
In the new version everything looks a little "blurry".
All other programs (Word, Excel etc) look fine. Even in ArcMap the very top showing the project name (e.g. "New Project - Arc Map") looks fine. I guess thats from Windows.
Please see the picture, I hope the difference between the very top and the menu is notable. It is very annoying when working for hours in the program.

Nothing else was changed regarding monitors, resolution etc!


texts: Improving FLAASH atmospheric correction to accurately represent subtle features in a target's spectral profile?

texts:
I am attempting to use ERDAS target detection models to detect/differentiate a specific type of soil from a general background. We have gathered spectral signatures of the target soil in the field with a spectrometer.

The target soil has only slight, but very consistent, variation from the prevalent background signatures.

We have attempted to run target detection using the field derived spectrum  on a FLAASH corrected Hyperion image.

However, the FLAASH correction does not appear smooth enough to allow for the slight variation between target and background signatures to be observed.

We are considering using the atmospheric adjustment tool (Modified Flat Field approach) to improve our initial FLAASH atmospheric correction.

We would like to use our target signature as the reference for this atmospheric adjustment, so that the resulting adjusted image correctly displays the key spectral profile features of the target.

Would doing such an adjustment (using the same signature to adjust and then detect) be a circular process and therefore not viable? We believe this process may give us the best chance at detection by enhancing the accuracy around the subtle spectral features of our target.

We are concerned that the workflow might not be considered valid, or be seen as a unfair bias influencing our detection.


texts:
I am having trouble connecting to a PostgreSQL database hosed on my local host.  I have a Python script to connect and connected through the command line, but for the life of me can't connect to a the database from QGIS.  Here is the Python code I got to work:

import psycopg2
try:
    conn = psycopg2.connect("dbname='mb_sed_class' user='postgres' host='localhost' password='Daniel'")
except:
    print "I am unable to connect to the database"

print ("I connected to the database")
cur = conn.cursor()
cur.execute("select relname from pg_class where relkind='r' and relname !~ '^(pg_|sql_)';")
print cur.fetchall()

This connected to the database and returned the names tables.  And here is how I connected to it from the command line:

psql -d mb_sed_clsss -U postgres

The command line prompted me to input my password and it opened the psql interpreter.

A screen shot of my Create a New PostGIS Connection dialog can be found here.  When I try an connect with those inputs I get the error:

FATAL: pssword Authentication failed for user "postgres"

Any ideas on why this might be happening?

I am running QGIS 2.8.2 and PostgreSQL 9.4 on windows 8 64 bit machine.


texts:
This seemed simple on the face of it, but I am unable to figure out how to toggle the visibility of a marker feature using the Version 3 API of OpenLayers.

In my situation, I am adding features to a vector layer. Each feature is a marker icon denoting a place of interest. When I click on a checkbox somewhere else on the page, I'd like for the feature to appear of disappear (as the case may be). I am using JQuery in conjunction with OL3, but I don't care whether the solution is jquery or vanilla javascript.

Code snippets:

var vectorSource = new ol.source.Vector({
    projection: "EPSG:4326"
});
var vectorLayer = new ol.layer.Vector({
    source: vectorSource,
    style: fieldIconStyle
});

var map = new ol.Map({
    layers: [osm, digitalglobe, vectorLayer],//osm and digitalglobe exist in unquoted code
    target: 'map',
    controls: ol.control.defaults({
        attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
            collapsible: false
        })
    }).extend([mousePositionControl]),
    view: new ol.View({
        center: [0, 0],
        zoom: 2
    })
});

function checkedchanged(item)//item is the checkbox that was clicked
{
    //this function does get called successfully.
    //alert($(item).prop('checked'));
    var selected = $(item).prop('checked');
    var id = $(item).val();

    vectorSource.forEachFeature(function (item) {

        var props = item.getProperties();
        if (props.FieldId = id) {
            item.setStyle({visible: selected});//I have tried many different things here, all to no avail
        }
    });
}


texts: PostGIS 3D linestring validity with two different Z coordinates

texts:
Maybe I missed something in the docs, but why is this not a valid LINESTRING Z and is a POINT Z when calling st_makeValid?

select st_isvalid(st_geomfromtext('LINESTRING Z (0 0 0,0 0 10)'));

st_isvalid
---------------
f

select st_astext(st_makevalid(st_geomfromtext('LINESTRING Z (0 0 0,0 0 10)')));
st_astext
---------------
POINT Z (0 0 0)


texts: Create Multiple Feature Layer and Add to MXD

texts:
I am really stuck with this one and cannot seems to get the code to execute. Every time I do so, I get the error: Input Features: Dataset [u'Test1'.....] does not exist or is not supported. My guess is that it is the latter as I have tested the code with a arcpy.Exists command and the code executes but does not populate the data frame appropriately.

Code:

  import arcpy, os

  arcpy.env.workspace = r'c:\pathway to geodatabase'
  fcs = arcpy.ListFeatureClasses()

  mxd = arcpy.mapping.MapDocument(r'C:\pathway to mxd')
  DF = arcpy.mapping.ListDataFrames(mxd,'*')[0]

  for fc in fcs:
     inputlayer = fcs
     outlayer = os.path.join(*(fcs) + '.lyr')
     arcpy.MakeFeatureLayer_management(inputlayer,outlayer)

     layer = arcpy.mapping.Layer(fc)
     arcpy.mapping.AddLayer(DF,layer,"AUTO_ARRANGE")

When I print fcs, this produces a string with the 'u' with unicode preceding the actual value. I did try to convert it to ASCII and got the follow error: AttributeError: 'MapDocument' object has no attribute 'encode'

Where am I going wrong?


texts: How to merge self-created grids of areas and match it with county-level demographic information using tidycensus package in R

texts: I have manually created grids of 20 mile radius each, across USA. Additionally I have also downloaded the demographic information at the county-level from US Census using tidycensus package in R. I want to map the demographic information at the county level to the manually created geographic grids, I am unable to do so. I understand that the grids might span several counties, in that case I want to use the demographic information from the county with the maximum intersection with the grid. I am looking for a direction to help me merge these two datasets together- the manually created grids and the county level demographic information.


texts: Auto-increment id when adding a feature to a PostGIS layer in QGIS

texts:
When I enter edit mode of a PostGIS layer in QGIS 1.8 and add a feature, is it possible to auto-increment the ID?

I always have to look what last used ID was and manually enter a new one. I can't believe I'm the first one facing this problem.


texts: LAYERS param doesn't work with openlayers3 TileArcGISRest

texts:
Using https://openlayers.org/en/latest/apidoc/ol.source.TileArcGISRest.html

After creating a map source using TileArcGISRest the params are not passed to the Arcgis Rest server.

  const source = new ol.source.TileArcGISRest({
      url: 'https://gisservices.information.qld.gov.au/arcgis/rest/services/PlanningCadastre/LandParcelPropertyFramework/MapServer',
      params: {
            'LAYERS':"show:2,4"
        },
      });

  }
  const layer =  new ol.layer.Tile({
      extent: [15238742.701475, -3469504.213328, 17340271.619744, -1022026.482164],
      source: source
    });

All the layers are displayed, not just the selected layers.
Looking at the URL sent by the browser, "&LAYERS="
Expected to see "&LAYERS=2,4".


texts: Table to table script using Excel sheets (not workbooks) arcpy

texts:
So what I'm trying to do is to create feature classes from the sheets in an Excel table. I can get it to work if I save each excel sheet as its own workbook, however this isn't really what I want.
I an a complete newbie so I'm sure the answer is pretty obvious.
I think it is something to do with the $ in the table names, I can't work out how to strip it though. Any help would be much appreciated,
Thanks
Working code
fileList = arcpy.ListFiles("*.xlsx")
print 'Listing .xlsx files in workspace'

try:

# Loop through each file
    for file in fileList:
        print file
        arcpy.env.workspace = os.path.join(r"C:\\Users\\Jane\\Documents\\GIS Project\\BasicTest", file)

    # Use splitext to set the output name of the table
        dbfFile = os.path.splitext(file)[0] #+ ".xlsx"
        if arcpy.Exists(dbfFile+".dbf"):
        print "deleting"
        arcpy.Delete_management(dbfFile+".dbf")

        # Convert excel to DBF
        arcpy.TableToTable_conversion("Sheet1$", outPath, dbfFile+ ".dbf")

        print 'File conversion. Converted ' + file

Not working code:
tableList = arcpy.ListTables()
print 'Listing table files in sheet'

for table in tableList:
    print table
    arcpy.env.workspace = os.path.join(r"C:\\Users\\Jane\\Documents\\GIS Project", table)

    # Use splitext to set the output name of the table
    dbfFile = os.path.splitext(table)[0] #+ ".xlsx"
    if arcpy.Exists(dbfFile+".dbf"):
        print "deleting"
        arcpy.Delete_management(dbfFile+".dbf")

    # Convert excel to DBF
    arcpy.TableToTable_conversion(table, outPath, dbfFile+ ".dbf")

    print 'File conversion. Converted ' + table

Error:
Traceback (most recent call last):
  File "C:/Users/Jane/Documents/GIS Project/BasicTest/3rd Script.py", line 33, in <module>
  arcpy.TableToTable_conversion(table, outPath, dbfFile+ ".dbf")
  File "C:\Program Files (x86)\ArcGIS\Desktop10.1\arcpy\arcpy\conversion.py", line 1904, in TableToTable
  raise e
ExecuteError: ERROR 000354: The name contains invalid characters
Failed to execute (TableToTable).


texts: How to get road labels on Stamen Watercolor basemap in Cartodb

texts:
basic question here.  I want to use the Stamen Watercolor basemap on CartoDB, but want the road and locality labels displayed on it, as at http://openlayers.org/en/latest/examples/stamen.html?q=watercolor.

Could anyone talk me through how to get the road labels on there, from the Watercolor basemap or another source? The map will be of the UK.


texts:
I have a series of points I would like to connect into a polygon but it isn't drawing correctly, You'll see the problem.

Coordinate[] xyarray = xycoords.toCoordinateArray();

LinearRing shell = geomFactory.createLinearRing(xyarray);
Polygon poly = geomFactory.createPolygon(shell, new LinearRing[0]);

Geometry perimeterline = geomFactory.createPolygon(xyarray);
GeometryCollector xypoints = new GeometryCollector();
xypoints.add(poly);
GeometryCollection xygeoms = xypoints.collect();

File xyshp = new File("perimeterline.shp");
File xyshx = new File("perimeterline.shx");
FileOutputStream xysshp = new FileOutputStream(xyshp);
FileOutputStream xysshx = new FileOutputStream(xyshx);
ShapefileWriter xywriter = new ShapefileWriter(xysshp.getChannel(), xysshx.getChannel());
xywriter.write(xygeoms, ShapeType.POLYGON);


texts: How to filter ActiveList containing ui.Map.Layers in Google Earth Engine?

texts:
How do you filter an activeList of MapLayers in Google Earth Engine (js api)?
Context: in an app where users use a dateSlider to visually interpret imagery and assign classifications. Classifications assigned by placing points. Since it is possible for multiple layers to be present but hidden, I want the point to recognise only the top-most, non-hidden layer. Code and psuedocode below:

var roi = ee.Geometry.Point([-105.61, 41.14]);
var s2sr = ee.ImageCollection("COPERNICUS/S2_SR").filterBounds(roi)

// stacked images
var image1 = s2sr.filterDate('2021-01-01', '2021-01-07').first()
var image2 = s2sr.filterDate('2020-02-01', '2020-02-07').first()
var image3 = s2sr.filterDate('2020-03-01', '2020-03-07').first()

/**
 * In this toy example I am explicitly setting image3 to be hidden
 * In actual use case this will be in an app and the user can toggle layers on and off
 */
Map.addLayer(image1, {}, 'im1')
Map.addLayer(image2, {}, 'im2')
Map.addLayer(image3, {}, 'im3', false)
Map.centerObject(image3)

var layers = Map.layers()
print(layers)

/**
 * How to filter this ActiveList to return only the visible layers?
 *
 * Psuedocode:
 * var shownLayers = Map.layers().filter('shown', true)
 *
 *
 */

// Then get the top image of the *visible* layers
var topImage = shownLayers.get(shownLayers.length() - 1)
print(topImage) // should return image2

Is there a way to filter a ActiveList without resorting to for loops? I see in the docs I need to use the function getShown.
https://code.earthengine.google.com/?scriptPath=users%2Fcaseyengstrom%2Freprex%3AfilterActiveList


texts: OpenLayers 6 replace layer image in canvas

texts:
I have a single tile WMS layer and at some point I want to change it's image (which was rendered by some WMS service) with an image stored in a server. At a later point I will want to go back to rendering the layer images with WMS service again.
How to replace layer image with the one I can download from the server by using canvas or other means except by replacing layer's URL?


texts:
I have successfully installed the current version of the QGIS Server on a Ubuntu 16.04. WFS, WCS run fine, but in WMS no text is rendered in the map. In the legend you can see text. Does anyone have an idea what the problem might be?

I have already installed several fonts on the server and tried them out, unfortunately without any results.


texts: in python, srs.ExportToProj4() returns an empty string, why?

texts:
I have a shapefile with the following .prj file:

PROJCS["NAD_1927_Albers",GEOGCS["GCS_North_American_1927",DATUM["D_North_American_1927",SPHEROID["Clarke_1866",6378206.4,294.9786982]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-96.0],PARAMETER["Standard_Parallel_1",29.5],PARAMETER["Standard_Parallel_2",45.5],PARAMETER["Latitude_Of_Origin",23.0],UNIT["Meter",1.0]]

When I run the following python code:

    srs = osr.SpatialReference()
    if ( srs.ImportFromWkt( prjText ) != 0 ):
        return "error"

    srsProj4 = srs.ExportToProj4()
    sourceProjection = pyproj.Proj( srsProj4, preserve_units=True )

the variable srsProj4, as returned from srs.ExportToProj4(), is an empty string.

When I look here: http://www.gdal.org/ogr/classOGRSpatialReference.html

it says that ExportToProj4() returns an empty string in the case the srs is in a local (non-geo-referenced) coordinate system. But as far as I understand, the text in the .prj file (above) is a valid, regular geo projection.

This code works with other .prj files I've used. Can you tell what's special about this one that's making it fail?

Thanks.


texts: Is there a significant difference in results between working with QGIS vs. SNAP?

texts:
I need to work with Sentinel-2 data, and I have been having difficult with the ESA toolbox (SNAP), so I've decided to process the imagery with QGIS instead.

My question is, is there a significant difference in the quality of atmospherical correction results that would justify working with SNAP instead of QGIS?


texts: Looking for cloud hosting similar to QGIS cloud

texts:
I have about 6 or 7 large clients who each require some form of personalised online mapping service.

My aim is to produce a secure login required database for each client using my shapefiles and open source mapping.  In essence something like QGIS Cloud, but that i have full control over.

When i make a change to the shapefile it should update on the online map.

All the online map needs to do is have layer control, basic query, measure and print.  print composer will be standard with my company's logo on each print and theirs.

also there will be no editing function, and display style will be set by me.

QGIS Clouds limits are too constrictive.


texts: Calculate percentage of parcel area covered by wetland

texts:
Still a little new to Postgis. I'm trying to calculate the percentage of a wetland layer that intersects with a parcel layer. The desire is to eventually add "percent_wetland" to the parcel layer, but I'm having trouble working out the basic query. Both layers are polygons and have the same EPSG. My query below returns a value of ~300 whereas the correct value should be about 35(%).

SELECT (sum(st_area(st_intersection(a.geom,b.geom))/st_area(b.geom)))*100 percent_area, b.id

from hydrology.wetland a, boundaries.parcels as b

WHERE b.id=9801

GROUP BY b.id;

How does one calculate the percentage of area that intersects between two polygon layers?


texts:
I have two .las files derived from UAV photogrammetry. From there, in global mapper, I created a shapefile for each survey (one week apart), cropped to a shapefile.

Brought those two shapefiles into ArcMap 10.5, and used shapefile to TIN tool for each. So two shapefiles, two TINs.

Used TIN to RASTER tool to create two rasters.

Used Mimnus (3d analyst) tool to create new raster showing change. Changed classification of resultant raster to have 3 classes.

min to -2.9 (std dev of dataset)
-2.89 to 2.9 (std dev of dataset)
2.91 to max

This gave me areas of cut and fill adjusted for standard deviation. UAV data isn't always perfect so needed to do this to create most likely areas of change. Raster is 32-bit float.

What I want to do now, is to somehow derive the volumes from the resultant shapes that I have. This way, I have volumes of cut and fill on a pile by pile basis given a standard deviation.

I could not achieve this using the cut fill tool because I could not figure out how to create the same map and adjust my classifications accordingly. Because the data is not perfect, when I use the cut fill tool, I get no "same" data...

First photo is the first method I outlined and the second photo is the cut fill method.


texts: Use graphical modeler to loop through CSV columns

texts:
I'm looking for a way to loop through the columns of my CSV and implement this function that I made in the graphical modeler in QGIS.

I have two layers: (1) the map layer and (2) the delimited text (CSV) layer containing the coordinates and temperatures recorded by each station every 15 minutes.

I only know how to implement it manually for every feature in my CSV, but having a lot of features means it would be long and messy to do. Is there an easier way so that I wouldn't have to implement this manually in the graphical modeler for each feature in my CSV?


texts:
Is there a way to convert a raster Google Earth Super Overlay to TIFF?
My Google Earth source contains raster tiles.


texts: Loading WMS layer from external server in Leaflet?

texts:
I'm trying to use the WMS service documented here in a leaflet map. The documentation shows an example for openlayers:

var wms = new OpenLayers.Layer.WMS(
  "Population Density",
  "http://sedac.ciesin.columbia.edu/geoserver/gwc/service/wms",
  {layers: 'gpw-v3:gpw-v3-population-density_2000'}
);

but I want to use this with leaflet. My own WMS hosted layers work fine with the following syntax:

var wmsRivers = L.tileLayer.wms("http://zzz.zzz.zzz.zz:8080/geoserver/opengeo/wms", {
  layers: 'opengeo:rivers',
  format: 'image/png',
  transparent: true,
  version: '1.1.0',
  attribution: ""
}).addTo(map);

The following does not:

var wmsFootprint = new L.tileLayer.wms("http://sedac.ciesin.columbia.edu/geoserver/gwc/service/wms", {
  layers: 'gpw-v3:gpw-v3-population-density_2000',
  format: 'image/png',
  version: '1.1.0',
  transparent: true,
  attribution: ""
}).addTo(map);

After several minutes waiting for sedac.ciesen.colombia.edu, I get a 400 Failed to load resource: the server responded with a status of 400 (Bad Request)

Is there a way to ping the server to know it's functioning? What about version, I assume this refers to geoserver; how do I know what version they are running? Any other parameters I may be missing?


texts: Can sfcgal be Installed on Amazon Web Services

texts:
We're trying to set up a cloud-based repository using postgresql, postgis and sfcgal. While I have these installed and running on my laptop, it looks like AWS RDS does not support sfcgal.

Is this so?

If not, what approach is needed to add the sfcgal extension to postgresql on AWS?

Could it work on another cloud service?


texts: Obtaining map service url from within Server Object Extension (.NET)?

texts:
I'm having trouble figuring out how to obtain the full url to the map service a Server Object Extension is running on top of. I bascially want:

IMapServer4 mapServer = (IMapServer4)serverObjectHelper.ServerObject;
string fullUrl = mapServer.url

Which would yield: http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer

Any Ideas?


texts: Getting raw wcs-dem value with mapserver

texts:
I retrieve wcs-dem.
curl --trace -i  -H "Content-Type: application/image" -XGET "http://127.0.1.1/cgi-bin/mapserv?map=wcs1.map&SERVICE=WCS&VERSION=1.0.0&REQUEST=GetCoverage&coverage=dem&CRS=EPSG:4326&BBOX=35.670381,35.813051,44.81901235734796,42.106463&WIDTH=1600&HEIGHT=1066&FORMAT=GTiff" > dem.tif

But, it generates 3 bands without having any DEM value as:
(gdalinfo dem.tif)
Band 1 Block=1600x1 Type=Byte, ColorInterp=Red
Band 2 Block=1600x1 Type=Byte, ColorInterp=Green
Band 3 Block=1600x1 Type=Byte, ColorInterp=Blue

shp2img produces proper results:
Band 1 Block=2707x3 Type=Byte, ColorInterp=Gray

What am I doing possibly wrong?
What do I have to do to get raw wcs-dem value?


texts: Using histogram in ArcGIS 10 with dates and sum of values

texts:
I have a point feature layer in ArcGIS. I want to add a histogram which shows a histogram for selected points. This works perfectly. Two problems:

I have a datefield, which spans about three years. I would like the histogram to show totals by month and year. I bypassed the lack of option to do this by calculating year+month/12-1/12. It works, but it's hardly elegant. Also, the X-axis is dynamic, which I don't want. I would like the x-axis to show the whole period, not just months with observations
I want the graph to show the total for the values in an attribute for the selected features. With a bar graph this seems to work, but it behaves erraticaly.

I cannot imagine no-one has done something like this before, but searching Google did not help me out.


texts: If a Moran's I value is close to 1, then why is it necessary to report the p-value?

texts: For instance, if we get a Moran's I value of around 0.6, then we already know based on that Moran's I value that spatial autocorrelation is present. Why is it important to additionally report the p-value?


texts: Troubleshooting the use of OpenLayers Plugin layers with Midvatten Plugin in QGIS

texts:
I have been struggling to get a Google physical layer that has been loaded using the OpenLayers Plugin (Version 1.4.3) to work with Observation Points loaded using the Midvatten Plugin. The data points are located in East Anglia, but when I do manage to get the Google Physical layer to load it displays the data points located in the Gulf of Guinea off the West coast of Africa. I am new to GIS so expect that it is something quite trivial that I am getting wrong. I have followed the following steps to try to rectify this problem:

I converted the CRS of my Midvatten db from the original EPSG 4326 that the Midvatten tutorial recommended to EPSG 3857 that Google Physical uses (see Is it possible to reset a database's coordinate reference system in the QGIS Midvatten plugin?).

In the Midvatten obs_point attribute table I converted from using 12 figure grid references split between the East and North fields in the attribute table to longitude and latitude. The screen shot below shows the website that I used to do the conversion and the real locations of a few of my data points:

This conversion still results in data points located in the Gulf of Guinea (these are the letters located in the sea towards the bottom left of the map) In the screenshot below the obs_point attribute table is open showing the content of the East and North Columns :

It is likely I am making some novices mistake. The only other potential clue (I don't know if it is related or something else that needs fixing) is that when I load the Midvatten database then load default db-layers to QGIS I get a string of error messages:

Error executing query:
SELECT styleQML FROM layer_styles WHERE
f_table_catalog='EAQ_strat_EPSG_3857_2_midv_obsdb.sqlite'
AND f_table_schema=''
AND f_table_name='stratigraphy' (first 'stratigraphy', then for subsequent error messages iterates through: 'w_levels'  'w_flow'  'w_qual_lab'  'w_qual_field'  'comments'  'obs_lines'  'obs_points'  'obs_p_w_qual_field'  'obs_p_w_qual_lab'  'obs_p_w_lvl' 'obs_p_w_strat'  'w_lvls_last_geom' 'zz_staff' 'zz_flowtype'  'zz_meteoparam'  'zz_strat'  'zz_stratigraphy_plots' 'zz_capacity'  'zz_capacity_plots')
AND f_geometry_column=NULL (or by iteration, AND f_geometry_column='Geometry')
ORDER BY CASE WHEN useAsDefault
THEN 1 ELSE 2 END,update_time DESC LIMIT 1

What do I need to change to get my data points to display in the correct UK, East Anglia locations on a Google physical layer?

Following CSK's comment that my data points were being located at lat/long (0,0) because my geometry was null, I remembered having seen this post: Midvatten plugin used with qgis2threejs. There they suggest changing 'TOC-GS' and 'ground surface' from 'null' to '0'. I thought that maybe if the z coordinate was set to zero rather than null it might stop ignoring the x and y coordinates. So I tried first editing the obs_point attribute table. Then when this did not work, I tried deleting and reloading the data sets having first added two extra columns of zeros to the csv:

obsid;name;place;type;east;north;h_tocags;h_gs;com_onerow;
Bdat;Bdat;Beeston;datum;1.2255526;52.94407;0;0;;
BG;BG;Beeston;section;1.2263631;52.943958;0;0;16.5 metres East of datum Figure 18 West (1980)  Point id 19- Notebook 2-p57;

When I loaded the csv with the extra columns I still got the warning that I had loaded obs_points without geometry and the map location was still (0,0) in the Gulf of Guinea. So zeros instead of null in h_tocags and h_gs is not the fix I was looking for.


texts:
We are planning to write an application which have to track the user driving in his truck in the cities like New York city accurate upto which lane he was driving on. In the cities with those tall buildings, its not possible to get good GPS signal. So we are planning to use hardwares with accelerometers and magnetometers sensors to make up for the lost GPS signals. We tried with some Android tablets, but the sensors are not accurate enough. Right now we are going to try some hardwares from Trimble with geo position correction and motions sensors.

So any kind of suggestions on tracking a vehicle without a GPS device is welcome.


texts: Enter four coordinates and get a polygon in QGIS

texts:
Is it possible to enter four coordinates for getting a polygon?

I have to clip lots of exact rectangles and I was just wondering whether you know a plugin


texts:
I have a Map Services layer that covers the United States and I'd like it to be cached between the scales of say 18M and 288K, and then from 288K to 1K, I just want to draw dynamically (because it would take up too much space to cache it).

Can this be done, splitting it up like that?

I'm still on ArcGIS 10.1 for Server.


texts: Calculating percentage distribution for field in each polygon in ArcGIS Desktop?

texts:
I have grid data representing different values(1-4) and a polygon shapefile with different zones.

How do I calculate percentage distribution for all the values in each polygon in ArcGIS Desktop?


texts: Detect whether polygons are on one side or both sides of the road center line?

texts:
I have two tables in my PostgreSQL 9.5 database i.e., roads and polygons. The sample scenarios are as:

Scenario_1:

Scenario_2

In PostGIS, for each road how can I detect whether polygons are one side of the road center line or on both sides?


texts: QGIS Point Features and Labels Not Appearing in .KMZ/Garmin

texts:
I want to produce a Garmin custom map for use with my Etrex 20x.

I'm working with QGIS 2.14.3-Essen using the GarminCustomMap, version 1.1, plug-in to produce the output .KMZ on a Mac running OS X 10.11.

Issue: The single polygon feature layer appears properly in Google Earth and as a custom map on the Etrex 20x. The several point feature layers do not. None of the layers displays its labels.

Suggestions?


texts:
I have 2 decimal point in lat/lon. I want to divide the line drawn by lat/lon into parts each at a specified distance, lets say 'x' -- all except the last segment will be of length x -- and I need the lat/longs of the dividing points.

I tried searching but couldn't find anything involving 2 lat/longs.
Are they any libraries to do this, currently I am using JavaScript for my implementation.


texts: Only one field appears after converting .shp to raster to .asc, in QGIS

texts: I am a beginner in the GIS world. I tried to convert the .shp map to the raster .asc map. I did Raster-> Conversion-> Rasterize then as shown below there are only 1 of 4 fields appears. So I cannot convert the map based on the field that I want.


texts: How to set a fixed scale to a layer in ArcMap?

texts: I have a polygon layer in ArcMap. To full extent the scale is 1:35,000. It only fits in a 210cm x 160cm page. I want to fix the scale to 1:10,000 and make it fit to a 84.1cm x 59.4. Is there a way to do it in ArcGIS 10.1?


texts: Tomcat Server & Geoserver working under one profile but another

texts:
I am a really beginner with tomcat and geoserver and this is my first attempt at these programs.

I am having a problem getting geoserver to run under a different profile on my local machine.  I am running Tomcat 7.0.55 on a windows 7 system.  I installed tomcat and geoserver under the administrator profile and both work.  Now I want to get this working under my own profile and when I switched profiles I get the following error:

HTTP Status 404 - /geoserver/

type Status report

message /geoserver/

description The requested resource is not available.

When I hit start on the tomcat I get this error:

  FAIL - Application at context path /geoserver could not be started


texts: How to spatial subset (clip) TerraSAR-X SSC data (.cos) using vector files and one of the softwares (ENVI, PCI Geomatica, Erdas Imagine, etc)?

texts:
I have SSC data of San Francisco which I have extracted their extent as a KML file using:

  SARscape > Import Data > SAR Spaceborne > TerraSAR-X

Then through some operations in ArcGIS, I have extracted part of these shapefiles and then converted them to (evf/shp):

Now how can I subset TerraSAR-X data by these vector files using one of the softwares ENVI, PCI Geomatica, Erdas Imagine, ArcGIS, etc. without converting the TerraSAR-X image to the internal format of these softwares?

I don't know what should I add to explain more. please ask in the comments any more information you need


texts: Making XY To Line not give shortest distance in ArcMap

texts:
I am creating a very simple map through XY to Line in AcrGIS. However, since the destination is New Zealand and located at the bottom corner of global maps it creates the following.

Is there a way to make the lines on the left side of the map get connected to New Zealand similar to others seen on the map?

I have tried moving the New Zealand polygon to the center as its just for show but no luck. I hav tried diffeerent Line Types in the tool as well.


texts: MySQL 8.0 Error Code: 3617. Latitude is out of range in function st_geomfromtext

texts:
First I have a problem creating spatial index in MySQL 8.0. Here the description:

I have a collection of several thousand species range maps (polygon & multi-polygon) which is provided by IUCN as a single shapefile.
I opened this shapefile in QGIS 3.6 and performed geometry check (Vector/Geometry Tools/Check validity).
All valid range maps have been exported into a new shapefile.
I imported this new shapefile into MySQL 8.0 via command line tool ogr2ogr.
For the ogr2ogr import I had to use the option "-skipfailures". Reason: ogr2ogr considered some of the range maps as invalid.
The remaining maps were imported into a MySQL table. And it seems all ok, at least you can run queries successfully. But the queries are slow, because MySQL always reads the whole table.
So I decided to create a spatial index and for that you'll need to set a SRID. And here the problem starts:

  “03:10:32    UPDATE gis.all_reptiles_innodb SET SHAPE =
  ST_GeomFromText(ST_AsText(shape), 4326)   Error Code: 3617. Latitude
  124.241900 is out of range in function st_geomfromtext. It must be within [-90.000000, 90.000000].    0.000 sec”

I can't set a SRID because of problems with the latitude range.

A latitude of "124.241900" is obviously impossible, because latitude can only range from -90 and +90 degrees. It seems to happen quite often, that people mix up longitude (allowed range: -180 and +180 degrees) with latitude.

Additional information: QIS shows these properties for the shapefile:

“-181.5899672849999718,-54.0594466929999840 : 181.1581243180000911,71.1881355930000836”

Does somebody have an idea what went wrong and how I could prevent this error?

Something in the interaction between shapefile, QGIS, ogr2ogr and MySQL obviously caused problems. The map display in QGIS, however, seems to work fine.

I would like to import only valid maps into MySQL because I need the spatial data index. Without an index a single query takes >8 seconds and that is too slow.


texts: QGIS and QT library- code compilation problem

texts:
So, I am trying to workout an GIS standalone application using QGIS and QT C++ Libraries on linux(ubuntu 15.04).
I am following this tutorial: https://github.com/qgis/QGIS-Code-Examples
Taking the first tutorial as an example, I am not able to compile it using the directions provided in the tutorial.
I have installed QGIS by: apt-get install qgis
I am not able to get through the "cmake .." step as it is saying it cannot find QGIS

The steps are: -

svn co https://svn.osgeo.org/qgis/trunk/code_examples/1_hello_world_qgis_style
cd 1_hello_world_qgis_style

mkdir build
//optionally specify where your QGIS is installed (should work on all platforms)

//if your QGIS is installed to /usr or /usr/local you can leave this next step out

export LIB_DIR=/home/timlinux/apps

cmake ..

make

./timtut1

Please provide a solution.


texts: Creating a geoTIFF from PostGIS raster column

texts:
I am able to retrieve raw raster data from a PostGIS raster in a PostgreSQL database using SQL Alchmey. I can get the raw data directly from the database. Now I would like to create a geoTIFF file from the raw data. Here is the raw raster data from the database.

0100000100000000000000D03F000000000000D0BF0000000000804140000000000000F43F00000000000000000000000000000000E6100000010001004A003C1CC600000000

The above image is a screenshot of the database table that I am accessing through SQL Alchemy. Is there a way that I can create a geotiff from this raw data using gdal in python? I have looked for a similar workflow, but couldn't find any examples on creating a tiff directly from raw raster data.


texts: I am trying to use the python script from http://www.sparkgeo.com/labs/2010/07/07/gdal-clipping-hack/ to clip a raster based on many shapefiles. The script is using a mysql database an i would like to use it on a directory of shapefiles. I am not a programmer so I'am not sure how to make this work.


texts: cartodb: ssl version of the light_all basemap

texts:
Is there an ssl version for cartodb light_all basemap ?

I am currently using the following code via leaflet.js

    L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
        noWrap: true,
        detectRetina: true
    }).addTo(map);


texts: Export to CSV a list of addresses that fall within a shapefile?

texts:
I currently have a shapefile (KML, but I also have it in other formats as well) that outlines neighborhoods within a city.  I also have a list of vacant property addresses in CSV.

I'm currently importing the addresses into Google Earth (GE) over the shapefile, but I don't think GE will do what I want.

I would like to be able to add data fields from the neighborhood shapefile such to the imported addresses and be able to export all the addresses to a CSV file and include the neighborhood shapefile data for the neighborhood they are in based on the shapefile.

Here is a screenshot of the neighborhood shapefile info:

Here is a screenshot of the imported address info:


texts: Writing code expression in Calculate Value to find cell value or Minimum cell value?

texts:
I have a calculate value tool that I'm using to skip rasters without features/no data. I'm very new to python and do not know much about proper formatting and syntax. Right now, the tool works but gives false negatives(0 when the value is actually 1). I need those rasters that have no data to be skipped, not those whose values are 0 or larger. Here is what I have right now:

I think a better option may be to find the minimum or maximum cell value in each raster and use that to find the No Data rasters. However, I do not know how to write the code that would allow me to that.


texts: Getting coordinates in both decimal degrees and meters in ArcGIS attribute table?

texts: I have an attribute table of points and the coordinates are stated in decimal degrees. I would like to add two fields where the coordinates are also stated in meters or kilometers. I am using ArcGIS 10.2.


texts: Calculating distances between student homes and schools using QGIS?

texts:
I am using QGIS 2.16.

I have two different point layers:

points that represent students' homes
points that represent schools.

In both I have the school ID. I need to calculate the distance between students' homes and their schools, using school ID.

Any idea about a plugin or function that would enable to do this?


texts: Creating transfer edges in a multimodal network dataset

texts:
I have three feature classes: Bus Stops, Routes and Streets. The points are not coincident on vertices of either of the line feature classes - they are located next to the routes (red line):

The line feature classes are not coincident at end points - they were digitised as long lines mostly, intersecting each other. The routes were traced along the roads. At first I thought the line feature classes were going to be a problem, but according to this excellent blog post, setting my connectivity as Any Vertex during the creation of the network dataset will solve that problem by creating junctions where any of the lines intersect.

My problem is that I want to create a multimodal network dataset, with the Routes representing the routes the bus would travel, and Streets are where pedestrians would walk. Bus Stops represent the transfer points where the pedestrian could stop walking along the streets and start travelling on a bus route.

According to page 33 of the slides from the Network Analyst technical workshop at this year's ESRI conference, it says I will need to create transfer edges between the stop and the route, so that the two are 'connected'. How do I create these edges - is there a setting in the network dataset creation wizard where I have to specify this?


texts:
I have brewed python 2.7.3 onto my Mac (Lion), and installed shapely via pip install shapely. The Polygonizer plugin, however, does not find the shapely library. I see when QGIS loads a Python console, it loads 2.7.1.

Do I need to brew QGIS to get it to play nicely with my other python libraries?


texts: Are there only two methods of interpolation in QGIS?

texts: I did recently a map of maximum temperature for specific area in Quantum GIS 1.8.0 and its interpolation. However, I was wondering if there are only two method of interpolation, apart from ‘Triangulated Irregular Network (TIN)’ or ‘Inverse Distance Weighted (IDW)’. Maybe is there any extra plugin for that?


texts: Using GPS to field walk through a LiDAR scene

texts:
I am doing field surveying for archaeology using Lidar. If I attached a USB GPS to my laptop would it be possible to track where I am "in real time" on the Lidar as I am field walking?

I'm wanting to use GPS to pinpoint on a pre loaded Lidar image as we field walk an area. We have found a lot of interesting things on Lidar and it would help if we could identify them on the ground individually.


texts: MCARI vegetation index in ArcGIS raster calculator

texts:
I'm trying to write the equation for the MCARI vegetation index in raster calculator using WorldView-2 imagery, but can't get it right. Here is the original formula:

MCARI = [(RedEdge – Red) – 0.2 × (RedEdge - Green)] × (RedEdge ÷ Red)

Here is where I'm at:

[float((B6-B5)-0.2) * float(B6-B3)] * float(B6)/(B5)

The error I get is:

float() argument must be a string or a number (error 000539)

I'm thinking my float placement or parens placement is not correct.


texts: Some OSM tags in polygons and some in points - how to bring them together

texts:
Tagging objects in OSM can sometimes be done as polygon or as point. For example ruins or museum

So far so good, but finding a specific object in a osm-dataset makes it necessary to look into the points AND into the polygons table.

For example: I want to display all museums in a city map. Some museums are  tagged as points, some as polygon:

I could import the centroids of the polygons into the point table. That will sometimes result in duplicates. Is there also a better way to solve that?

I'm using GeoPackage (ogr2ogr) or PostGIS (osm2pgsql) with QGIS 3.6


texts: Microstation coordinates in Google Earth

texts:
I have got this x,y,z values of a cell(point feature) from microstation, I am trying to locate it in Google Earth. This is the location from London UTM zone 30U. I have tried it too.

  530563.1906, 178968.2347, 5.8100 (z value)


texts: Warning/Error message "The ) is expected" - Functional Attribute - GeoMedia Desktop

texts:
So the problem, is when I write my Expression on the Functional Attribute window in GeoMedia Pro, it gives me a warning message indicates that the ")" is expected;

The expression is : ROUND(AREA(Input.Shape, TrueMeas, SquareMile), 2)


texts: FeatureLayer creating in javascript ArcGIS API

texts:
I got the sample called "Feature Layer with ONDEMAND mode" in the ArcGIS for js resource center. This example just adds layer with rivers to the map.

I want to use my own features instead of using features from the featureService like in this example. In order to do this I need to use another constructor of FeatureLayer so I modified the code like this:

  function initOperationalLayer(map) {

    var featureCollection = {
        layerDefinition: {
          "geometryType": "esriGeometryPoint",
          "fields": [
          {
            "name": "OBJECTID",
            "type": "esriFieldTypeOID"
          },
          {
            "name": "text",
            "type": "esriFieldTypeString"
          },
          {
            "name": "address",
            "type": "esriFieldTypeString"
          },
          {
            "name": "Shape",
            "type": "esriFieldTypeGeometry"
          }
          ]
        },
        featureSet:
        [
        {   OBJECTID : 1,
            text : 'a',
            address : 'b',
            Shape :  new esri.geometry.Point(-80.12468662, 40.42756484, map.spatialReference)
        }
        ]
    };
    var featureLayer = new esri.layers.FeatureLayer(featureCollection, {
        mode: esri.layers.FeatureLayer.MODE_ONDEMAND
    });

    map.addLayer(featureLayer);
    map.infoWindow.resize(150,105);
    mapLayers.push(featureLayer);  //this client side map layer is the maps graphics layer
  }

Unfortunately, it doesn't work. I got errors like "TypeError: _19c is undefined in utils.xd.js(line 14)". It is obfuscated code so i can't understand what't the problem.
Any ideas?

The right code is the following one:

    var jsonFS = {
        "displayFieldName": "Name",
        "fieldAliases": {
            "Name": "Name"
        },
        "geometryType": "esriGeometryPoint",
        "spatialReference": {
            "wkid": 4326
        },
        "fields": [{
            "name": "Name",
            "type": "esriFieldTypeString",
            "alias": "Name",
            "length": 255
        }],
        "features": [{
            "attributes": {
                "Name": "CHINA: YUNNAN PROVINCE; VIETNAM: HANOI"
            },
            "geometry": {
                "x": -10602460.248958504,
                "y": 4716882.997019428
            }
        }]
    };
    var fs = new esri.tasks.FeatureSet(jsonFS);

    var featureCollection = {
        layerDefinition: {
          "geometryType": "esriGeometryPoint",
          "fields": [
          {
            "name": "Name",
            "type": "esriFieldTypeString",
            "alias": "Name"
          }
          ]
        },
        featureSet: fs
    };

var featureLayer = new esri.layers.FeatureLayer(featureCollection, {
        mode: esri.layers.FeatureLayer.MODE_ONDEMAND
    });


texts:
I am trying to setup a WMS service to pass basic authentication credentials within MapInfo (using a master username and password). The end result being a layer visible to the organisation where each person is not required to enter their authentication details.

I have setup the WMS service, and ensured my credentials work. I have researched and tried https://username:Password@remaining URl. But with no luck. I cannot seam to find something to assist me.

Usually my WMS services are free access, if someone can point me in the right direction that would be great.


texts: Layer names changed after reclassification of rasterstack, R

texts:
Following one of my previous questions about looping through a rasterstack (here), I now face a different issue. My initial rasterstack had dates as names (e.g. X2000_05_08.1) and I reclassified it in order to change specific values. After the reclassification though, I got a raster brick and the names changed from dates to layer.1, layer.2 and so on.

Can anyone help me to understand what I did wrong and how to fix this as I want to keep the dates?

Reclassify code:

m <- c(-1, 0,NA)
rclmat <- matrix(m, ncol=3, byrow=TRUE) # matrix with the value to reclass
new_rc <- reclassify(new, rclmat,right=FALSE) # reclassify my stack ("new")


texts: Why is PyShp unable to open my .dbf or .shp files?

texts:
Trying to learn to use Python to map some geographic data by following some tutorial and I can't seem to get them to work. I'm hoping this is just a simple error on my part.

First, the link(s) to the tutorials:

https://towardsdatascience.com/mapping-with-matplotlib-pandas-geopandas-and-basemap-in-python-d11b57ab5dac

https://towardsdatascience.com/mapping-geograph-data-in-python-610a963d2d7f

I am unable to get past the steps using code for the importing of the files.

My code is

import numpy as np
import pandas as pd
import shapefile as shp
import matplotlib.pyplot as plt
import seaborn as sns

sns.set(style="whitegrid", palette="pastel", color_codes=True)
sns.mpl.rc("figure", figsize=(10,6))

#opening the vector map
shp_path = "C:\\Users\\Jack\\.spyder-py3\\District_Boundary.shp"
#reading the shape file by using reader function of the shape lib
sf = shp.Reader(shp_path)

len(sf.shapes())

My error output is:

  File "C:\Users\Jack\Anaconda3\lib\site-packages\shapefile.py", line 646, in load
    raise ShapefileException("Unable to open %s.dbf or %s.shp." % (shapeName, shapeName))

ShapefileException: Unable to open C:\Users\Jack\.spyder-py3\District_Boundary.dbf or C:\Users\Jack\.spyder-py3\District_Boundary.shp.


texts: Vector length attribute not the same after convert to raster in QGIS

texts:
In QGIS I've successfully used GRASS v.to.rast to convert a SHP file to a raster and then raster>conversion>BMP. My output looks great.
The raster info says it is w = 3070, h = 8727. Unit is meters. However, when I looked at the vector attributes table, it says the length is 3435629 m. How can I make sure my raster is capturing the appropriate length? I don't understand how 3435629 is coming out as 8727 in the raster.


texts: Querying order with different polygons in Google Earth

texts:
I have different polygonal layers in Google Earth, on the same folder.

One layer should not be queryable, the other one yes. If the non queryable layer is visualized, I cannot query the queryable one (which is over the other one, covering the same area). I have tried to put each layer in different positions on the folder without success.

I am starting to think that I should convert the non-queryable polygon to lines. Should it be the only solution? there is no tag to say this is queryable layer or not?

And what if I want to overlay two queryable polygonal layers and query them separetely?


texts: Setting default dates for all records in an Attribute Table in QGIS 3.18.3

texts: I have a date field in my attribute table (which contains several layers). Is there a way to set a default past date (e.g. 15 days ago) in the date field which is the same for all records within that layer, without having to type the date in for each record?


texts:
I'm trying to communicate WMS server of ESRI. I following link below.

http://sampleserver1.arcgisonline.com/ArcGIS/services/Specialty/ESRI_StatesCitiesRivers_USA/MapServer/WMSServer?version=1.3.0&service=wms&request=GetMap&CRS=4326&bbox=19.416377,-125.192865,54.318281,-66.105824&width=750&height=360&layers=0&styles=default&format=image/png"

But it gives me only one zooom level image. I want to use my web map service all zoom layers.

Is it possible to make ? I think i should write some code in the link but i can't find anything for this problem.


texts: How to import a data with unknown coordinate system to a data with known coordinate system

texts:
I have recieved a Group of shape files with unknown coordinate System. The coordinates are like: 536605 , 5658923 and I can not find the corresponding projection/coordinate System. It looks like that the data has been from dxf to shp converted. I have tried to Change their coordinate to the one I need  (ETRS_1989_UTM_Zone_N32) in Arc Catalog. When I add them to the mxd for the data with coordinate System, still they would have shift and do not place correctly. I tried to change it now in a new mxd to UTM32N and it comes a bit closed but still is in another ocation. what other Options I have to correct this data?
I use ArcGIS 10.5 but the toolboxes of projection and Transformation are not available.


texts: Feature Class Geometry in Stored as 0 to 360 degrees, rather than -180 to 180 degrees

texts: My X coordinates for my geometries are all stored in 0-360.  ArcMap seems to handle it fine (i.e. knows that 260°=-100°) except when I use python geometry methods.  The geometry methods (intersect, contains, etc.) don't function properly against other geometries in the same CRS, but with 180-base coordinates.   What causes the 360-based coordinates?  Is it something in the feature class, CRS, or must the actual coordinate values be adjusted?


texts: Need to get the minimum cell size of collection of rasters

texts:
I have the following model in ModelBuilder:

Get Raster Properties looks like this . . .

I need to find the minimum cell size value to use as output.  Any ideas on what tool I should use to replace Cell Statistics?
Thanks,
Renee

As I said above, the reason I need to get the minimum value of the cell size is because I need to create an empty output raster dataset that has compatible characteristics with the input rasters to be mosaicked together.  However, I have another model that could get me around the above situation with having to create an output raster ahead of time.  In the following model, I use "Mosaic to New Raster" rather than "Mosaic".  This should work out well, but the output comes out crazy looking.  Here is the model and the output . . .


texts: maximum limit for plotting lat-long on google maps

texts: I want to highlight a route on google maps along with our network sites. I have successfully done it but when I load data in large proportion then my plugin becomes unresponsive. Can someone suggest me a way to avoid this error.


texts: Can ArcGIS 10.1 use SQL on Definition Query to select minimum value?

texts:
In ArcGIS 10.1 I am trying to do a Definition Query that will select the records that are the min values from a table.

I try a lot of type of query like and it still not working.
Name table is Polygone_Buffer_Output
Attribute : Air_Mil

"Air_Mil" = (SELECT MIN( "Air_Mil" ) FROM "Polygone_Buffer_Output"

[Air_Mil] = (SELECT MIN( [Air_Mil] ) FROM "Polygone_Buffer_Output"

[Air_Mil] = (SELECT MIN( [Air_Mil] ) FROM [Polygone_Buffer_Output]

"Air_Mil" in (SELECT MIN( "Air_Mil" ) FROM "Polygone_Buffer_Output"


texts: PyProj giving RuntimeError: b'argument not numerical or out of range'?

texts:
I have this string:

string = '+proj=lcc +a=6371200.0 +f=0.0 +pm=0.0 +x_0=5632642.22547 +y_0=4612545.65137 +lon_0=-107.0 +lat_1=50.0 +lat_2=50.0 +lat_0=50.0 +units=m +axis=enu +no_defs'

Then I do:

my_proj = pyproj.Proj(string)

It gives me this error:

  RuntimeError: b'argument not numerical or out of range'

Anyone can help me?

Python 3.7 with pyproj 1.9.5.1; but also tested on pyproj 1.9.6 (same error).


texts:
Does ArcGIS Online have a version or is it only referenced by Month/Year, which is all I see on What's new?

Is there a compatibility matrix that shows the ArcGIS Online releases with their compatible ArcGIS Desktop versions?


texts: Converting ArcGIS (*.mxd) file to QGIS (*.qgs) file?

texts:
I recently tried to use QGIS and I wondered if you can convert a draft ArcGIS map (*.mxd file) into a QGIS project (*.qgs file).

This would avoid thematize the entire project.


texts: Can ArcPublisher 10 publish backwards to an 9.3 PMF?

texts: It seems like a lot of other functions within ArcGIS are getting backwards compatibility (file geodb creation, MXD files).  I'll still need to publish 9.3 PMF files for a few months and I couldn't find anything in the Publisher settings that would allow me to publish to a previous version.  Is it possible?


texts:
When I try to perform a buffer of 10m on my imported gpxfile (geometry listed as points), the buffer covers more like 1000 km. I tried the same with a line vector file, which seems to work properly. I had no problem importing the GPX file into QGIS.

I've checked if the CRS was the same as the project's and
I've looked for a alternative way of transforming the gpx into a shapefile, which I didn't find.

I only have this data as an gpx file, and I really need to use it! I am a QGIS-beginner, so I hope it is an easy fix?


texts: Openlayers 2 getLonLatFromLayerPx() gives wrong coords after pan

texts:
I'm trying to display mouse position on external div (ExtJS based) using this code :

map.events.register("mousemove", map, function(e) {

        position = map.getLonLatFromLayerPx(this.events.getMousePosition(e));
        position = position.transform(new OpenLayers.Projection("EPSG:900913"), new OpenLayers.Projection("EPSG:4326"));
        Ext.fly(mouseposition.getEl()).update("Lat (N): " + position.lat.toFixed(4) + "   Long (E): " + position.lon.toFixed(4) );
    });

The problem is that when I pan the map than the coords I get are the original from before the pan , only if I zoom in/out than I get the correct coords from the mouse position.

How can I fix this ?

Here is example (look on the coords on the bottom of the map) :

Initial load over Israel , see the lat/lon of the mouse.

I pan over to europe , lat/lon stay around the same values of the original map extent

I zoom in and back out and the lat/lon update to the current map view extent range.


texts: Seeking open source software similiar to Esri City Engine?

texts:
I am looking for open source software similar to ESRI City Engine and currently going through open source software directory.

About ESRI City Engine (Quick introduction)

We want to make few historical places in 3D format & I heard that in some cases its difficult to integrate with other software (i.e. Esri City engine to Google earth and vice verse etc)

Most of the spatial data is in PostgreSQL/PostGIS . Hence looking for alternative so any open source software included 3 D editing facility  will be great.


texts: OSM data in QGIS: buildings have gaps (open and closed lines)

texts:
I'm trying to show all buildings of a certain region in Switzerland using the OSM integration tools for QGIS. Using this answer, I've downloaded and imported data to my project, choosing the attributes "building", "source" and some other, cf. screenshot below:

.

The tags are basically the same whether I chose polylines or polygons under "export type". However, when importing them, I get different results: for the polygons, a part of the buildings are simply missing, and I can get their contours when I import the polylines, as you can see from this screenshot:

.

I would like to have all buildings as polygons, and not as open lines, and am not sure if this can even be achieved. I have read through most similar forum articles but haven't found a reply concerning this very issue.


texts: Limit ESRI World Geocoding Service to a particular city using ArcGIS Desktop

texts:
I'm trying to limit ArcGIS World Geocoding Service to just the city I work in. I'm using it, in conjunction with another custom geocoder to refine the results of a composite geocoder (which is published to our ArcGIS Server). However, I don't want it returning results from neighbouring cities/towns. Does any know how to go about this?

These are the settings:


texts: openlayers add points to GeoJSON layer and store them to postgis

texts:
it should be a quite standard demand.

load data from a database (in this case PostGis)
add data to the layer (in this case points with attributes)
save new data back to database

I use this functionality with google maps api, but I wan't to move to Openlayers (3/4).
Does anyone know a good example, tutorial how i could implement this?


texts: Reading files with Japanese filenames with GeoPandas

texts:
I'm trying to read all shapefiles in a folder using this script:
import glob
import geopandas as gpd

infolder = r'E:/folder/test_input'
shapefiles = glob.iglob(infolder+'/*.shp')
gdfs = [gpd.read_file(file) for file in shapefiles]

All of the shapefiles have Chinese/Japanese characters in their names and I am getting this error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x92 in position 8: invalid start byte

It works fine with shapefiles of English names. How do I solve this issue?
EDIT: I am also getting this error:
UnboundLocalError: local variable 'crs_wkt' referenced before assignment

I'm not sure why as all shapefiles including English name ones are of the same coordinate system epsg:6668


texts: Locating Multiple Points on Mutlipes routes by a Unique ID

texts:
I'm trying to get a "MEASURE" for Points along a route.  I need ARCGIS10 Desktop Linear Referencing tools or other application to use a unique identifier to match the Lines in the route to points scattered offline.  I'm trying to avoid running the Linear Referencing Locate along route tool separately for over 80 unique Point/Routes.

I've Tried the following:

Buffer the Points to Intersect the line -> Run the Locate along route tool selecting the Parent ID for the Output - > In the Output Table and using Field Calculator, Set up an Python "If/Else" Statement:

def myCalc (ID1,ID1_Orig):
  if(ID1==ID1_Orig):
    return 1
  else:
    return 0

Codebook - Sort=
    myCalc(!ID1!,!ID1_Orig!)

Then Deleting all returns with "0" in the "Sort" column.


texts: How to replicate ArcGIS coordinate transformation with ogr2ogr?

texts:
I need to be able to replicate with ogr2ogr a coordinate transformation that was executed in ArcGIS for Desktop.

Both ArcGIS and ogr2ogr are based  on EPSG standard definition.

There's not only one way to transform data from a reference system A to a reference system B, but many transformations are possible (T1, T2 ... Tn).

After a lot of reading i understood that EPSG codes define, among many other things, CRS (coordinate reference systems, A and B in the previous example), and possible transformation between them (T1...Tn).

When in gis one performs a coordinate transformation ArcGIS prompts the user with the choice of a transformation.
On the other side ogr2ogr simply works specifying the source and destination CRS.

two questions then arise:

what kind of transformation does ogr2ogr performs? is it still based on the transformation defined within the epsg standard?
Is it possible to force ogr2ogr to use a transformation specified via an epsg code?

please keep in mind that my goal is to replicate a transformation executed in gis (thus identified by an epsg code), with a call to ogr2ogr.


texts: Splitting up a region into training data and validation data for Landsat7 classification

texts:
I am building a classifier for Landsat7 by using MODIS land cover classification.

My goal is to split up my region of interest into 80% being training data and 20% being validation data (with a randomization).

However, I do not know how to implement this in my code. In my current code, only the number of pixels can be adjusted but it is not specified which ones.

Of the following code, this is:

// Make a training dataset by sampling the stacked images.
var training = modisLandcover.addBands(landsatComposite).sample({
    region: geometry,
    scale: 30,
    numPixels: 5000,
    seed: 0
});

var validation = modisLandcover.addBands(landsatComposite).sample({
    region: geometry,
    scale: 30,
    numPixels: 1000,
    seed: 1
}).filter(ee.Filter.neq('B1', null));

Full code:

// Upsample MODIS landcover classification (250m) to Landsat
// resolution (30m) using a supervised classifier.

// Use the MCD12 land-cover as training data.
var modisLandcover = ee.Image('MODIS/051/MCD12Q1/2011_01_01')
  .select('Land_Cover_Type_1');

// A pallete to use for visualizing landcover images.
var landcoverPalette = [
    'aec3d4', // water
    '152106', '225129', '369b47', '30eb5b', '387242', // forest
    '6a2325', 'c3aa69', 'b76031', 'd9903d', '91af40',  // shrub, grass, savanah
    '111149', // wetlands
    '8dc33b', // croplands
    'cc0013', // urban
    '6ca80d', // crop mosaic
    'd7cdcc', // snow and ice
    'f7e084', // barren
    '6f6f6f'  // tundra
];

// A set of visualization parameters using the landcover palette.
var landcoverVisualization = {palette: landcoverPalette, min: 0, max: 17, format: 'png'};
// Center over our region of interest.
Map.centerObject(geometry, 9);
// Draw the MODIS landcover image.
Map.addLayer(modisLandcover, landcoverVisualization, 'MODIS landcover');

// Load and filter Landsat data.
var l7 = ee.ImageCollection('LANDSAT/LE07/C01/T1')
    .filterBounds(geometry)
    .filterDate('2011-01-01', '2012-01-01')
    .sort('CLOUD_COVER', false);            //sort by cloud cover ('false' indivcates descending )

// Draw the Landsat composite, visualizing true color bands.
var landsatComposite = ee.Algorithms.Landsat.simpleComposite({
  collection: l7,
  asFloat: true
});
Map.addLayer(landsatComposite, {min: 0, max: 0.3, bands: ['B3','B2','B1']}, 'Landsat composite');

// Make a training dataset by sampling the stacked images.
var training = modisLandcover.addBands(landsatComposite).sample({
  region: geometry,
  scale: 30,
  numPixels: 5000,
  seed: 0
});

// Train a classifier using the training data. USING CART() classifier
//var classifier = ee.Classifier.cart().train({
var classifier = ee.Classifier.randomForest(100).train({
  features: training,
  classProperty: 'Land_Cover_Type_1',
});

// Apply the classifier to the original composite.
var upsampled = landsatComposite.classify(classifier);

// Draw the upsampled landcover image.
Map.addLayer(upsampled, landcoverVisualization, 'Classified Image');

// Show the training area.
Map.addLayer(ee.Image().paint(geometry, 1, 2), null, 'Training region');

// Get the confusion matrix from the TRAINING features
var trainAccuracy = classifier.confusionMatrix();
print('Resubstitution error matrix: ', trainAccuracy);
print('Training overall accuracy: ', trainAccuracy.accuracy());

// make a vlidation datast by using a different seed and filter for null pixels
var validation = modisLandcover.addBands(landsatComposite).sample({
  region: geometry,
  scale: 30,
  numPixels: 1000,
  seed: 1
}).filter(ee.Filter.neq('B1', null));

// Classify the validation data.
var validated = validation.classify(classifier);

// Get a confusion matrix representing expected accuracy.
var testAccuracy = validated.errorMatrix('Land_Cover_Type_1', 'classification');
print('Validation error matrix: ', testAccuracy);
print('Validation overall accuracy: ', testAccuracy.accuracy());


texts: How to display nebulous boundaries between regions with indistinct edges?

texts:
I'm trying to map the boundaries between regions which don't necessarily have a hard edge.

For example, areas where languages predominate don't have a distinct edge, but instead have a degree of overlap - people don't suddenly stop speaking a language at a country border. How would you convey this in a map?

Here is an example I found showing tourist regions - I like how they've conveyed that you don't suddenly reach the boundary of a region, but that they are more nominal:

(I suspect that they used something like Adobe Illustrator to create this?)

How can I achieve a similar effect in ArcMap? For bonus points, I'd like a solution which will transfer to ArcGIS Server's JS API.

My starting point is a polygon layer which does contain hard edges - something like this:


texts: PyQGIS - save CSV layer to memory/temporary layer

texts:
In my QGIS project I have a point layer which is loaded from a CSV file. For my workflow I would like to save this layer as a temporary shapefile with PyQGIS so the script can run some calculations and edit the attributes of this layer. Finally the script saves the temporary layer as a new CSV file.
So is it possible to save a loaded CSV layer as temporary shapefile with PyQGIS?
If so, how can this be done?