texts:
I want to using ArcGIS in Android Studio. I followed this Developing with the ArcGIS Runtime SDK for Android and Intellij IDEA blog.

This is my build.gradle file:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

android {
    compileSdkVersion 18
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}

dependencies {
    compile 'com.android.support:appcompat-v7:18.0.0'
    compile 'org.jsoup:jsoup:1.7.2'
    compile files('libs/ArcGIS_Android.jar')
    compile files('libs/jackson-core-lgpl-1.9.5.jar')
    compile files('libs/jackson-mapper-lgpl-1.9.5.jar')

}

And I added as a jar file to libs folder :
ArcGIS_Android
jackson-core-lgpl-1.9.5.jar
jackson-mapper-lgpl-1.9.5.jar

And I am getting this errors:
Gradle: package com.esri.android.map does not exist
Gradle: package com.esri.android.map.ags does not exist
Gradle: cannot find symbol class MapView
Gradle: cannot find symbol class ArcGISTiledMapServiceLayer

Arcgis jar is appear external libraries. And I am getting errors at run time not compile.


texts: QGIS format() function in expression Builder

texts:
Has anyone used the format() function in the expression builder?

The definition states it require arguments. just playing around with it but cant find too much on this function so i am not sure on its actual use/output/argument requirements.


texts: Area-weighted rasterising of polygon data

texts:
I'm looking for any GIS tool to do detailed rasterising of polygons. I've checked GDAL's gdal_rasterize command (and API), and ArcGIS's Polygon to Raster tool, but they only rasterise 1 attribute per cell, not an area-weighted aggregated attribute. Let me describe with an example. Consider that I need to rasterise values from polygons into a 100 m resolution raster. Here are three polygons contained in one pixel:

Where the areas for each class are 4000, 2500, and 3500 m², or a weighting of 0.4, 0.25 and 0.35. If the values of the attribute that I need to rasterise are 12, 42 and 8, then their weighted values are 4.8, 10.5 and 2.8. The sum of the weights, 18.1, is the value that I would like to rasterise, since it is representative for the whole pixel. Most other rasterisation routines I'm aware of will choose 12, since that is the value of one of the polygons that is either at the centre of the cell or has the maximum area. 12 is not acceptable for my analysis, since it will skew the mass-balance for the whole raster, which is unacceptable.

I'm looking to see if there are better tools for rasterising. My current approach is to perform a vector analysis at the pixel level, using the intersection of polygons and each pixel, then combine the results into a raster. This is a slow process, as I have 80275 rows (each pixel).


texts: Error while adding two values from two netcdf files

texts:
I was writing the following code to add two values from two different netcdf files.

import netCDF4 as nc
m1 = nc.Dataset('m1.nc')
m2 = nc.Dataset('m2.nc')
a = m1.variables(['pr'][364][100][100] + m2.variables(['pr'][364][100][100]
print a

This code gave me an parsing error - invalid syntax. I thought that since we can extract the values in these cells, I should be able to add them and assign them to a variable. Clearly, I am wrong, can someone explain why and how this mechanism works?


texts: "Grid" menu is missing from SAGA on my QGIS 2.18 setup

texts:
I am just a learner and learning through internet tutorials. I tried to learn about SAGA tools specially for "Grid" options, but I am unable to see any menu icon of Grid on SAGA toolbar.

I am wondering if anything wrong happened, or if QGIS 2.18 doesn't provide anything for Grid/Contour processing from SAGA?


texts:
I'm a user of QGIS with a very precarious understanding of it, and I've been looking for a way to move a couple of raster layers that have no coordinates and have been given some default ones placed at the origin, to some specific coordinates I know.
I've been trying to replicate some of the already existing solutions, but so far I've been out of luck.
What must I do to move this raster to some new coordinates?


texts: View number of edits made in an Enterprise GDB?

texts:
I would like to see the total number of edits made in my Default.SDE before the reconcile/post/compress process. I know you can view the number of edits made in versions with the Version Changes tool but it wont allow it for the Default.

The data does not have to be specific, just total number of created features/deleted/modified features (one number for all edits works).

For example, if I run my reconcile/post/compress script every Friday, I want to be able to see how many edits were made to this gdb before I start the process.

I'm sure there has to be an easy solution for this or something arcpy can handle (preferred method would be arcpy so I can add this to my reconcile/post/compress script to print the number of edits so I can catalog in my invoices. But I am not finding much on GeoNet.


texts: Show "Raise Notice" and "Raise Warning" in QGIS

texts:
Is there a way to catch "Raise Warning" and "Raise Notice" (while editing PostGIS-Layers) from a PostgreSQL/PostGIS-Trigger-Function within QGIS?
One example: I have a trigger that reacts to insert or update-events and sends back notices to the client.In QGIS i just get messages from raise exeption but not notices or warnings.

I found a old question ( How do I catch PostGIS/PostgreSQL RAISE messages in QGIS? ) but I can't imagine that QGIS is still not capable of catching these important "feedbacks" from the Database, especially as it has its origin in working together with PostGIS.
Does anyone know more about that?


texts: Autofill batch Processing output path for Split Vector Layer tool

texts:
The Split Vector Layer Batch Process Interface does not allow for setting output files like other processing algorithms do (i.e. Dissolve et al.)
Instead, you must set an Output Directory which does not seem to Autofill for the output files.

Anyone have suggestions for setting Output Directory/or output files in Batch Process Split Vector Layers?


texts: Using Search Cursor to calculate fields with records having a specific value

texts:
I'm a total beginner at programming and Python. I'm trying to select features by attributes and then field calculate in another field.

In VBA it might look like this:

    If [Z1COMM] = "R" then
    [Z1UNITS] = [Z1RUNTS] and
    [Z1SIZE] = [Z1RSIZE]
    ElseIf [Z1COMM] = "O" then
    [Z1UNITS] = [Z1OUNTS] and
    [Z1SIZE] = [Z1OSIZE]
    Else [Z1UNITS] = [Z1RUNTS] and
    [Z1SIZE] = [Z1SIZE]

    End If

I could probably do this pretty easily in VBA using the code block in the field calculator but I want to start grasping Python more. Here's what I got from trying to make a list of the values as a first step (taken and modified from http://support.esri.com/en/knowledgebase/techarticles/detail/41442):

    # Import modules

   import arcpy, os , sys, string

   # Create environmental variables

   arcpy.env.overwriteOutput = True
   arcpy.env.workspace = r"J:\CO_004"

    # Set variables

    input = "testfile.shp"
    lyr = "tst_layer"
    arcpy.MakeFeatureLayer_management(input,lyr)

    outFile = open(r"J:\CO_004\test.text", "w")

    # Build  search cursor
    fcSearch = arcpy.da.SearchCursor(lyr, ["Z1COMM"])
    for fcRow in fcSearch:
        # Process: Select by attributes
        arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", "Z1COMM" == 'O')

        txtSearch = arcpy.da.SearchCursor(lyr, ["Z1COMM"])
        outFile.write("Commodity: " + str(fcRow[0]) + "\n")
        for txtRow in txtSearch:
            zval = str(txtRow[0])
            outFile.write(zval + "\n")

    outFile.close() #This closes the text file
    del input, lyr, fcRow, txtRow, txtSearch, fcSearch, outFile, zval

And this is my latest error:
        ExecuteError: ERROR 000358: Invalid expression
        Failed to execute (SelectLayerByAttribute).

I originally tried to use a feature class for the input to avoid this part of the code:
        lyr = "tst_layer"
        arcpy.MakeFeatureLayer_management(input,lyr)

But got an error that feature classes could not be used. If I have to make a separate shapefile so be it but it's be more convenient to work straight from a feature class in a file GDB.

I'm mainly confused by this part:

    arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", "Z1COMM" == 'O')

where the last parameter I thought should be the selection criteria.

Also, this code just makes a txt file, it doesn't actually calculate anything but I thought once I figured this out I could take the next step.


texts: How to determine the bands from an aerial image?

texts:
I received a set of aerial images taken with a Canon camera, I don´t know which kind of lens it has, or if it has been modified.

After performing split image algorithm in Qgis, I get four new files: split_0, split_1, split_2 and split_3.

How many bands are in the original image, and how do I determine which file corresponds to which band?


texts: Rectangle polygons from single lines or point data?

texts:
I have point data for well locations that each have an associated bearing, which I used to create lines extending from the points:

Now I want to create rectangles the length of the lines, but of a defined width. Even better would be something that allowed me to extend a rectangle of defined width and length back from the point with the edge centered at the point, using the bearing data to determine the direction it extends back. I can't seem to find a tool to do this with either the line or point data and I don't have any experience with arcpy. Is there a straightforward way to do this?


texts: An illegal reflective access operation has occurred: Problem trying to merge changefile with .pbf data

texts:
After downloading a changefile (525.osc.gz) and a planet file (planet-latest.osm.pbf) I am trying to merge the changes with the following command:

osmosis --read-xml-change file="525.osc.gz" --read-pbf file="planet-latest.osm.pbf" --apply-change --write-pbf file="updated.osm.pbf"

However, I am receiving the following error:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.protobuf.UnsafeUtil
(file:/home/jovyan/osmosis/lib/default/protobuf-java-3.6.1.jar) to
fieldjava.nio.Buffer.address
WARNING: Please consider reporting this to the maintainers of
com.google.protobuf.UnsafeUtil
WARNING: Use --illegal-access=warn to enable warnings of further
illegal reflective access operations
WARNING: All illegal access operations will be denied in a future
release
Aug 12, 2019 9:04:08 PM
org.openstreetmap.osmosis.core.pipeline.common.ActiveTaskManager
waitForCompletion
SEVERE: Thread for task 1-read-xml-change failed
org.openstreetmap.osmosis.core.OsmosisRuntimeException: Pipeline
entities are not sorted or contain multiple versions of a single
entity, previous entity type=Node, id=386274, version=15 current
entity type=Node, id=386274, version=16.

Which goes on and on.

How do I debug this?


texts: Client-side to server-side in Google Earth Engine

texts:
I'm having trouble with turning a client-side object into a server-side object. Below I have adapted an excerpt of my script to illustrate my problem. I want to make the end of my filter selection depend on the values of DOYend and DOYstart. Printing yearAdd and yearStr returns what I expect, but filterSelectEnd returns something I don't understand.

var DOYend = 10
var DOYstart = 13
var yearSelected = ee.String('2014')

    if(DOYend <= DOYstart) {
      var yearNum = ee.Number.parse(yearSelected)
      var yearAdd = yearNum.add(1)
      var yearStr = ee.String((yearAdd))
      var filterSelectEnd = ee.Algorithms.String(yearAdd + '-12-31')
    }

print('yearAdd',yearAdd)
print('yearStr',yearStr)
print('conditionResult',filterSelectEnd)

Output:

conditionResult
ee.Number({
  "type": "Invocation",
  "arguments": {
    "left": {
      "type": "Invocation",
      "arguments": {
        "input": "2015"
      },
      "functionName": "Number.parse"
    },
    "right": 1
  },
  "functionName": "Number.add"
})-12-31


texts: Restricting duplicate attribute values in file geodatabase feature class?

texts:
I have created a File Geodatabase with around 9 feature datasets, and each of those have their own feature classes. So for one of the point feature classes in my GDB, I want to restrict the entering of duplicate values in only some of the fields in this particular feature class.

For example: I capture a point, now I need to fill out the following attributes for that point: 'Force_Number', 'Weekday', and 'Neighborhood'.
I want the 'Force_Number' field to restrict me from entering any values that I have entered for previously captured points in this feature class, and I don't want them to auto increment. But I still want 'Weekday' and 'Neighborhood' to accept duplicate values.

Any Suggestion? :-)


texts:
I've been reading this, I wonder if there are config.yaml nice examples available to take a look at them.

Can some web links for the examples or output images be provided for this?


texts: ArcGIS 5km buffer output is very small and square?

texts:
This is part of a task for an intro to ArcGIS class, and I'm super stuck.
I need to create buffers of 5, 10, 15, 20km from a centrepoint, to investigate vegetation changes over different years.

In the buffer panel, I input the centrepoint.shp from the dropdown list, and chose a linear distance of 5000m. When I apply it, the buffer is created but I can't see it. Using 'zoom to layer' the scale become 1:1.49, and my buffer appears as a square shape instead of a round one. My features are all set to WGS_1984_UTM_Zone_38N if that helps.

Here is an image gallery of some of my data and how the buffer layer is appearing: https://imgur.com/a/bJoFXvx

Update: My professor tried to recreate this on his own software and was unable, and said that based on the data in my layers this issue shouldn't have been occurring and it may be an issue in my software itself. I have a new download link from IT and will try again on fresh software.


texts: Using nested loops for raster calculation in ArcPy?

texts:
I am trying to figure out a way to input corresponding raster datasets from two separate folders into an equation using arcpy.

I think it requires some sort of nested loop but I can't figure out how to do this so that only corresponding rasters are inputted into the equation.

For the sake of this example lets say I have two folders with rasters listed in them as follows:

Folder 1        Folder 2
WC_top_2008     WC_int_2008
WC_top_2009     WC_int_2009
WC_top_2010     WC_int_2010
WC_top_2011     WC_int_2011
WC_top_2012     WC_int_2012

If I wanted to multiply the corresponding years in each dataset by one another (i.e. WC_top_2008 * WC_int_2008, WC_top_2009 * WC_int_2009 etc.).

How would I do this in arcpy?

I am using ArcGIS 10 with spatial analyst.


texts: How to update shapefile data source in multiple dataframes and mxds using lyr.replaceDataSource and Python dictionary?

texts:
After reorganizing the file structure for some of our GIS base data files I need a script to update the data sources for ~ 100 shapefiles in about 50 mxd files. Some of the mxds have multiple data frames. I have a list of the shapefile names and their new file paths that I'd like to use in a dictionary to define the workspace_path parameter in the lyr.replaceDataSource method.

After researching on this forum and others, I put together the code below, which runs smoothly (i.e., no errors and returns the "Workspace path is updated" print statement for each of the 3 layers in each dataframe) but the datasources are not actually updated when I open the map.

I'm relatively new to Python so maybe I'm missing something obvious here. Any insights or suggestions would be greatly appreciated.

#Select map
map_path = r'C:\Test\0102HomeRangeCopy.mxd'

#define dictionary

PathDict = {
    "SouthCarolina_SMA_geoN83_line": r"R:\Data\GIS\ManagedAreas\SMA",
    "SEUS_SMA_Offshore_line_geo": r"R:\Data\GIS\ManagedAreas\SMA",
    "LocalPorts_Alb": r"R:\Data\GIS\Shipping\Ports"}

import arcpy

mxd = arcpy.mapping.MapDocument(map_path)

for df in arcpy.mapping.ListDataFrames(mxd):
    for lyr in arcpy.mapping.ListLayers(mxd,"",df):
        layername = lyr.datasetName
        if layername in PathDict.keys():
            new_path = PathDict[layername]
            lyr.replaceDataSource(new_path,"SHAPEFILE_WORKSPACE", str(lyr.datasetName))
            if lyr.workspacePath == new_path:
                print "Workspace path for " + layername + " is updated."
            else:
               print "Path not updated for " + lyr.datasetName

mxd.save()
print "Map Saved"
del mxd

Here are some additional notes:

If I run the lyr.replaceDataSource method on its own for an individual file in the Python window as in the ArcGIS resources example, the datasource is updated as expected. It seems as though the issue might be with using the dictionary to define the parameters for different shapefiles or with iterating through the dataframes and layers
I've tested the the layers to ensure that the DATASOURCE and WORKSPACEPATH features are supported
The files are on a network and I've tried using UNC file paths, but this does not make a difference
none of the shapefile names have been changed
I'd like to avoid using lyr.findAndReplaceWorkspacePath so that I don't have to define the old path names in addition to the new path names for each shapefile
I'm working in Arc 10.0 service pack 4 on a Windows 7 64-bit machine

Thanks for your suggestions everyone!

After seeing that @blah238 could run the script in 10.1, I tried updating to service pack 5 and that solved the problem.


texts: How to Spatially Join Polygon IDs to Points in R

texts:
I am trying to assign a region ID to each record within a point shapefile. Each point would be assigned the Region ID of the region it falls within. The point feature is called "deciles" and the region/polygon feature is "regions".  I keep getting this error:

Error in UseMethod("inner_join") :
  no applicable method for 'inner_join' applied to an object of class "c('SpatialPointsDataFrame', 'SpatialPoints', 'Spatial')"

require(rgdal)
library(dplyr)
library(sf)
deciles<- readOGR("C:\\filepath", "deciles")
regions<- readOGR("C:\\filepath", "regions")
#Assign each bsu to a region with a spatial join
bsu_regions_join <- inner_join(deciles, regions, by = region_ID)

I've also tried these variants and I still get the same error:

bsu_regions_join <- st_join(deciles, left = FALSE, regions["region_ID"])
bsu_regions_join <- st_join(deciles, left = FALSE, regions)
bsu_regions_join <- st_join(regions, deciles, left = FALSE)


texts: QGIS PDF Export Atlas only Raster, no selectable Text

texts:
i have a huge QGIS Project with loads of WFS, WMS and all sorts of shapes. In the layout, there are also Pictures and a Logo included (.jpeg). Also there are a lot of legends and text fields. I am using the atlas function. In some of the text fields I have links.
Now when i export to PDF via the Atlas export OR the normal Export, all the layers in the Atlas file are exported as rasters, including all texts. Now since I have links in there, i would like to have at least the text fields selectable (copy past the link into your browser).
When I set up a new file the export is working as expected and i can select the text and different layers. Is there another - hidden - setting that i can somehow change? I tried both of the most recent version (stable / experimental).
I have already tried a lot of things, maybe someone can help me out?


texts:
I have a map portion PNG and its associated PRJ file. I want to convert the PNG to a GeoTIFF.

I know how to convert a PNG to a GeoTiff if the bounding box is available:

gdal_translate -of Gtiff -a_ullr LEFT_LON UPPER_LAT RIGHT_LON LOWER_LAT -a_srs EPSG_PROJ INPUT_PNG_FILE OUTPUT_GTIFF_FILE.

But in this case, I don't have bounding box lat lons specifically. How do I proceed?

My PNG is: NA 10H-N.png and Its gdalinfo says:

Driver: PNG/Portable Network Graphics
Files: NA 10H-N.png
Size is 11575, 4961
Coordinate System is `'
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 4961.0)
Upper Right (11575.0,    0.0)
Lower Right (11575.0, 4961.0)
Center      ( 5787.5, 2480.5)
Band 1 Block=11575x1 Type=Byte, ColorInterp=Palette
  Color Table (RGB with 18 entries...

The associated PRJ file reads;

PROJCS["PROJ",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG","4326"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",45],PARAMETER["standard_parallel_2",30],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-80],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]


texts: Manually adding spatial reference information for FEWS rainfall data using QGIS?

texts:
I am trying to match rainfall data from USGS/FEWS to coordinate locations of survey households in Ethiopia, so I will need to be able to project the rainfall data. So far, I downloaded the dekadal RFE 2.0 files for East Africa (bulk by year), and for each dekadal, there are five files: .bil, .blw, .clr, .hdr, and .stx. I first added the data (the .bil file) to QGIS, using Africa Albers Equal Area Conic as Projected Coordinate Systems. And then, I opened CSV data of village latitude and longitude and saved it to Africa Albers Equal Area Conic.They looked fine and I could extract point values using point sampling tool.

However, there was wide dispersion from the precipitation data provided by survey. The survey uses the same USGS/FEWS rainfall data as I did, but uses household location rather than village location information. Since dispersion is so wide, I suspect that dispersion came from CRS I chose, rather than household/village level difference. From the USGS/FEWS website, I know following projection information:

 Coordinates for corners:

 Lower left lat : -42.243 deg
 Lower left lon : -23.490 deg
 Upper left lat : 43.711 deg
 Upper left lon : -24.600 deg
 Lower right lat : -42.242 deg
 Lower right lon : 63.414 deg
 Upper right lat : 43.712 deg
 Upper right lon : 64.523 deg

 Image size : 1152 rows x 1152 cols
 Center lat,lon : 1.000000, 20.000000
 Pixel size h x w : 8.000000 km x 8.000000 km
 Origin of latitudes : 1.000000 deg
 Central meridian : 20.000000 deg
 First std parallel : -19.000000 deg
 Second std parallel : 21.000000 deg
 Projection = ALBERS Conical Equal-area projection uses the clarke 1866 spheroid

Using this information, I am trying to custom projection as follows:

+proj=aea +lat_1=-19 +lat_2=21 +lat_0=1 +lon_0=20 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs +ellps=clrk66

Can anybody confirm whether this projection is correct? I am beginner of QGIS user and only know the following basic parameters.

lat_1 : First std parallel
lat_2 : 2nd std paralell
lat_0 : Origin of latitudes
lon_0 : Central meridian

But I am not sure about +datum and +units.

@Spacedman, thank you very much for exploring actual data. I hope what I did is fine.

I re-did all the process using projection I made above:

Add dekadal rainfall data as raster layer using projection I customed.
Add Ethiopia administrative data as vector layer. I downloaded it from the website of Global Administrative Areas. This layer appeared as a small point on QGIS screen because Ethiopia administrative data is provided as WGS84 projection.
Save Ethiopia administrative data to the projection I customed.
Add village longitude and latitude csv data as delimited text layer using WGS84.
Save village longitude and latitude data as ESRI shapefile to the projection I customed.
Extract rainfall data using point sampling tool. Save the newly created layer as csv.

And I got exactly the same attribute table I got with Africa Albers Equal Area Conic projection. So, I do not know why the rainfall data I extracted do not match the survey rainfall data. Is my entire procedure correct?

Below is the table I made with survey data and extracted rainfall data; h2011_tot (annual total rainfall of 2011 from the survey) and total2011 (sum of all the 36 dekadal data I extracted as above). The survey data contain 2011's annual total rainfall as well as village level longitude and latitude information which I used above. I wanted to produce 2012's annual total rainfall but I first made 2011's annual total rainfall to confirm it matches with survey rainfall data. And I found they do not match each other.

As we can see below, there is wide dispersion between h2011_tot and total2011, although their means and standard deviations seem very close to each other. Do you have any idea why h2011_tot and total2011 look so different?


texts: Laspy outfile gives zero decimal points in coordinates

texts:
Im detecting trees and want to create a .las file to be able to display it in Cloud Compare. I can not wrap my head around why this is not working. The scale should allow for 6 decimal points but it is rounded to the nearest int each time.
    outFile = File("trees.las", mode="w", header=ransac.dataFile.header)

    print(trees[:, 0])
    print(type(trees[:, 0]))
    print(outFile.header.scale)

    outFile.X = trees[:, 0]

    print(outFile.X)

    outFile.Y = trees[:, 1]
    outFile.Z = trees[:, 2]
    outFile.close()

This is the printed values
[77.679703 77.6772   77.675003 ... 78.716003 78.696198 78.674599]
<class 'numpy.ndarray'>
[1e-06, 1e-06, 1e-06]
[77 77 77 ... 78 78 78]

All help will be appriciated!


texts: how to parse a XML Document file associated with the shapefile into a PostGIS/PostgreSQL table

texts:
I have a shapefile, and information on its attributes is stored in a XML Document format. For example, the attribute of COUNTY is stored as follows:

-<attr>
     <attrlabl>COUNTY</attrlabl>
     <attrdef>County abbreviation</attrdef>
     <attrtype>Text</attrtype>
     <attwidth>1</attwidth>
     <atnumdec>0</atnumdec>
    -<attrdomv>
        -<edom>
            <edomv>C</edomv>
            <edomvd>Clackamas County</edomvd>
            <edomvds/>
         </edom>
        -<edom>
            <edomv>M</edomv>
            <edomvd>Multnomah County</edomvd>
            <edomvds/>
         </edom>
        -<edom>
            <edomv>W</edomv>
            <edomvd>Washington County</edomvd>
            <edomvds/>
         </edom>
     </attrdomv>
 </attr>

When converting the shapefile to a PostGIS/PostgreSQL table, I also want to create a PostgreSQL/PostGIS table that will describe information on the attributes. So, the new table includes these columns: attribute(attrlabl), definition(attrdef), type(attrtype), width(attwidth), and categories(attrdomv).

I appreciate any suggestions.


texts: Right min/max values in single band color of an asc file and resulted profile

texts:
I'm using some asc files that covered the surface of an island; every file, when it's been imported, has a different min/max values in the single band color, which is the right? How can I understand it? I think it isn't normal that colors changes like in the following image in two subsequent images

Then I have another problem. I get the profile with differnt tool, but in any case the result is different (20 m) from the profile got from google earth... can it depend from the band colors?


texts:
I'm trying to extract the layer DEPARE from an S-57 datafile and convert it into a shapefile. I'm using ogr2ogr from OpenGeo Suite 4.5 (GDAL 1.11.1) on Windows 7 64 bit.

The problem is that when I issue ogr2ogr -f "ESRI shapefile" depare.shp US6RI26M.000 DEPARE I get an error FAILURE: Couldn't fetch requested layer 'DEPARE'!.

This seems odd because when I load the same s-57 file into QGis I can choose the layer DEPARE among all other layers. I've tried calling ogrinfo -ro -summary US6RI26M.000 which returns the follwing:

INFO: Open of `US6RI26M.000'
      using driver `S57' successful.
1: DSID (None)
2: Point (Point)
3: Line (Line String)
4: Area (Polygon)
5: Meta (None)

I struggle to understand why I don't see the same layers that I get when opening the file in QGis - DISD, BRIDGE, BUISGL, BUAARE, CTNARE, DEPARE... Is the DEPARE layer part of a higher-level layer 4: Area (Polygon) as shown by ogrinfo?

Question: How can I extract the DEPARE layer from an S-57 file and convert it into a shapefile using the ogr2ogr tool?

I'm clearly missing something. I've searched for related q&a but none I've found so far solves my problem.


texts:
I'm connected to the QGIS plugins repository, using QGIS 1.8.0 on Windows 8.... and although I can see a total of 119 available plugins, I can't see Sextante anywhere in the browser.

I tried downloading the .zip file from https://github.com/jj0hns0n/sextante and unzipping it into the plugins directory, but then the browser just reports a "broken plugin"....

Does anyone have any ideas?


texts: How to change the image size (column and row number) into the same size

texts:
I’m using IDL program. But I have a question how to convert different row and column number (row/col) to the same size of column and row number of 36 time series NDVI images. These images grouped into three different column and row numbers. When I do the subset I used the same shapefile and Geographic Lat/long (WGS 84) projection for all of them. So I’d like to ask why col/row numbers of these images is different. Second how to correct their size into the same size (col/row number)?

Thanks for your help


texts: Create interactive customized HTML Maps in QGIS 3?

texts:
I am planning to create this as an html page using QGIS. What is the best approach to go about the same?

****Specific details required - How to create Bubbles of varying size based on attribute?**** For example Increase bubble size based on increasing Total Loss


texts:
Continually to Changing part of text element using ArcPy? ,when i use this code in order to delete text element (the words "Land Use"):

import arcpy
from arcpy import env

env.workspace = r"G:\desktop\Project"
for mxdname in arcpy.ListFiles("*.mxd"):
    print mxdname
    mxd = arcpy.mapping.MapDocument(r"G:\desktop\Project\\" + mxdname)
    for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):
        elm.text = elm.text.replace('Land Use', '')
        print 'done'
    mxd.save()
del mxd

i get this result:

>>>
Project.mxd
done
done
done
>>>

The code delete the words "Land Use", but i don't understand:

Why it printed three times the word "done", while i wanted to print it just one time, after it finished?
Why the other words in the title "for residence" didn't jump to the top like that:


texts: I am starting to learn Julia and I am wondering how to read a shapefile? Is it as straightforward as with other languages (e.g. Python or R)?


texts: Overwriting geodatabase that has joined features in ArcGIS Pro for ArcGIS Online?

texts:
The project is for an outreach program that does outreach either onsite (point), onsite/outreach by 1 - 3 mile radius (point with buffer), zip outreach by zipcode (polygon), and block navigation (polygon).

These are all of the steps I took:

Geocode the onsite layer and the onsite/ outreach by 1-3 mile radius layer. These layers had specific addresses so I was able to geocode them.
Created/ Traced polygon features for the zip outreach layer. There are about 15 polygon features that are separate agencies, but I have them as one feature class.
Created/ Traced polygon features for the block navigation layer. This is similar to the zip outreach layer because it consists of about 15 separate polygons that are under one feature class.
The two polygon layers (zip outreach and block navigation) are drawn in feature classes so there is no data attached to them. I joined a CSV to each of them by a UniqueID.
(The last 4 steps were done in ArcGIS Pro)
The finished map needs to be uploaded onto ArcGIS Online and converted into a web mapping application for the end users.
When I add my zipped geodatabase into 'My Content' the joined files don't transfer. Neither polygon layer has any of the data joined from the CSV.

Work Around (that didn't work):

So I just decided to join the layers through ArcGIS Online's analysis tools. They are limited on tools, but they have the basics so I decided to join my tables to my layers through web map.
That worked fine for the time, especially because I had to get a finished product for some presentations.
A week later I received a new dataset from a colleague.
The new dataset had more point features to add (onsite, onsite/ outreach by 1-3 miles)
It also had new polygon features to add (zip outreach only)
So I went to 'My Content' on ArcGIS Online and went to my geodatabase (hosted feature layer) so I could overwrite it with my new set of data.
All the schema was structured the same and the geodatabase updated properly, except for my polygon layer.
Since I joined the layer through online the layer is only pointing back to its feature layer that was created from the analysis. In the web map when I click on 'Item Details' on the layer, it brings me back to the feature layer. The layer should be pointing towards the geodatabase.

The main problem is when I overwrite my geodatabase; the updated information is added to each layer successfully, but the new feature classes I add don't transfer to the web map or web application. So every time I overwrite the geodatabase, I have to create a new web map and web mapping application. This is very time consuming because I have to redo the symbology and queries every time I overwrite my geodatabase. I know schema changes can affect a geodatabase and its updates, but the schema of the table has remained the same.

Is there an easier solution to keeping my geodatabase updated?


texts: ModelBuilder - Data dependencies within model

texts: I have a "parent" model with two nested submodels.  Submodel A creates a gdb & FC's.  These FC's are output and exposed as model parameters to the input of Submodel B which exports them to CAD.  When I validate the parent model, submodel B does not validate.  I'm guessing this is because its input has not yet been created from Submodel A?  When I run the parent model, I get error 000732 that the input features do not exist.  I'm guessing this error is caused by the same reason.  How do I get around this error?


texts:
I'm working on a study on gentrification using ArcGIS, and I want to see which areas in my city have seen major increases or decreases in property value over the last few years (and map that to changes in demographics, but that comes later). Each year's property appraisal data has shapefiles for the boundaries of each lot and a table with the value of each lot (which I've managed to join, though a few lots in the shapefile have no entries in the table for whatever reason; I'm talking to the appraisal people about that). However, the lot boundaries aren't always consistent (due to properties being subdivided or combined), and I'm not sure if IDs for a given property are always the same between years.

I want to create a layer that shows changes in value from 2009 to 2010, 2010 to 2011, etc, as well as total change from 2009 to 2014. I'm not sure how to deal with changes in property boundaries; maybe if a property is divided during that period, also apply the division to previous years and divide the value either by the area (which assumes that property value is uniform) or proportionally based on the newly divided lots' values (which might result in the effects of later development being applied ahistorically). How would I do all this?


texts: Map tips showing only path instead of pictures in QGIS?

texts: My map tips are not showing images and instead show only paths in QGIS.


texts: How to draw border for a group of division in a GeoJSON file in python?

texts:
I use following code to  read a geoJSON file and which is working. GeoJSONN file contains multiple divisions of the map and each of them have a group name in  the file.

I could add gray border  to each of these  divisions. Now I want to add another red color border to groups of divisions which has the same group name, and show the group name in the middle of group. How can I do this?

import matplotlib.pyplot as plt
from descartes import PolygonPatch
import simplejson as json

json_data = []
with open('LKA_adm2-2.json') as f:
    json_data = json.load(f)

fig = plt.figure(figsize=(3.841, 7.195), dpi=100)
ax = fig.gca()

for section in json_data["features"]:

#multiple sections will have same group_name.
#based on this name I want to create a collection of sections and draw a border for it.

    group_name = section["properties"]["NAME"]
    ax.add_patch(PolygonPatch(section["geometry"], fc="#ffffff", ec='#9C9C9C', alpha=1, zorder=2, lw=0.2 ))

plt.show()

PS: Groups are always adjacent


texts: Loading features from QGIS project layer to PostGIS table

texts:
I am in the process of populating a PostGIS database from a bunch of shapefiles loaded in a QGIS project. The field names of the shapefiles don't match those in the database so it is not possible to use the built-in loader. So I was trying to use an INSERT query in the DB Manager to do so. However, it seems that the DB manager has either a DB scope or a virtual layer scope, and it does not seem possible to copy from a project file to a database table by mapping the field names to each other.
I used a query that goes along this form:
INSERT INTO public.table (field1, field2, geom)
SELECT field_one, field_two, geometry FROM project_layer

Is there a workaround that allows using a SQL query in the DB manager to INSERT features from a project layer into a PostGIS table?


texts: Is there a faster process to update one column for all features?

texts:
I have written a python script in QGIS which estimates the amount of residents for each building polygon by using census block data and building polygons (about 500 000 buildings in an area of about 900 km2).

The relevant data from the census blocks was merged to the building layer, so only the building layer is used in the script to collect the data. It has the following fields:

| A_building | id_census | pop_census_block |

The steps of the script are:

Sort buildings by id_census
Sum all building footprint areas for each census block
Calculate the areal share and from that the amount of residents for each footprint.
Update 2 attributes of the feature (layer.updateFeature(feat[share, residents]))

The 3rd and 4th step happen in a loop, that iterates over each building polygon. This loop takes two days, which seems to me too long for such a simple operation. Is there a faster way to update the features of a layer, like sending the calculated data as a list?

Here is the relevant section in the script:

# feats is a python list:
feats = [feat for feat in layer.getFeatures(QgsFeatureRequest().setFlags(QgsFeatureRequest.NoGeometry).setSubsetOfAttributes(limit_cols))
]

# sort feats
feats.sort(key=itemgetter(col_census_id))

...

# Get unique census ids
census_ids = []
areas = dict()
for feat in feats:
    census_id = feat[col_census_id]
    if census_id not in census_ids:
        census_ids.append(census_id)
        areas[census_id] = 0

# Sum building area per census block
for i in range(len(feats)):
    # Sum area
    census_id = feats[i][col_census_id]
    areas[census_id] += feats[i][col_bldg_area]

# Start an undo block
layer.beginEditCommand('Calculate share of area')
i, j, k = 0, 0, 0
layer.startEditing()
for feat in feats:
    # Share of area
    share = feat[col_bldg_area] / float(areas[feat[col_census_id]])
    # Add share to feature
    feat[col_share] = share
    # Building population
    feat[col_bldg_pop] = int(feat[col_pop] * feat[col_share])

    layer.updateFeature(feat)

    ...

# End the undo block
layer.endEditCommand()

# Comit changes
layer.commitChanges()
return layer


texts: Do integer values in a Confidence Raster correspond with a specific probability %?

texts:
I have been using the Maximum Likelihood Tool (Spatial Analyst extension, ArcMap 10.3.1) to classify a number of rasters into "Vegetation" and "Bare Ground" classes. I'd like to have some sort of quantitative measure for how reliable each of my classifications are (to report along with my data), so I've been generating a Confidence Raster for each image.

I understand that the Confidence Raster assigns each pixel an integer value (1-14, highest-to-lowest) that corresponds with the certainty of that pixel's class assignment. But do these integer certainties correspond to a specific probability/percentage?

In the example image discussed in the Desktop Help documentation, it says that "Value 1 has a 100 percent chance of being correct," "Value 5 has a 95 percent chance of being correct," but pixels with Value 14 "have a 0.005 percent chance of being correct." This scale doesn't make sense to me, so I doubt that each Level indicates a discrete 1% drop in likelihood. Also, I haven't seen these statements supported in any other journals or forums I've found online, so I'm hesitant to assume that's the end of it.


texts: Selecting a Graphic Element on button click using IGraphicContainerSelect

texts:
I am having trouble type casting and using the right interfaces. I have a function that loops through all text elements with a specific property set. Once a match is found, I want to be able to select this text element or make it active or highlighted or whatever on the map. Code below.

protected override void OnClick(Item item)
{
IMxDocument pDoc = ValidateInterface.GetMxDocument();
IActiveView pLayout = (IActiveView)pDoc.PageLayout;
IGraphicsContainer pGraphicsCont = (IGraphicsContainer)pDoc.PageLayout;
pGraphicsCont.Reset();

            IElementProperties _ElemProps = null;
            while ((_ElemProps = (IElementProperties)pGraphicsCont.Next()) != null)
            {
                if (_ElemProps.CustomProperty is IPropertySet2)
                {
                    ITextElement _textElement = (ITextElement)_ElemProps;
                    IPropertySet2 _propertySet = (IPropertySet2)_ElemProps.CustomProperty;
                    MessageBox.Show("Before I compare item to string");
                    if (item.Caption == Convert.ToString(_propertySet.GetProperty(NAME_STRING)))
                    {
                        //Problems start here
                        MessageBox.Show("Inside the IF statement");
                        IGraphicsContainerSelect _SelectMyElement = null;   // = (IGraphicsContainerSelect)pGraphicsCont;
                        ITextElement _newTextElement = (ITextElement)pGraphicsCont;
                        IElement TestElement = _newTextElement as IElement;

                        _SelectMyElement.SelectElement(TestElement);
                    }
                }
            }
}

Nothing is being selected though on my map. I'm looping through each graphic element (IGraphicContainer) on the map. Once I find a match, I want to select that Graphic Element. I am trying to utilize IGraphicContainerSelect to do this. It takes an IElement variable type as a parameter, thus why I'm trying to cast it. But again, noting is being selected. This all happens when I click a button.


texts: Projected coordinate system buffer producing incorrect buffers using GeoPandas

texts:
I am still new to GeoPandas.
The issue I'm running into this time is although I have projected my gdf, the buffers created still are much too large. I've run this with a number of different projections (https://spatialreference.org/ref/?search=california) for Zone 2 and I still wind up with the following output:

Here is my code:
latlon = (points['y'].iloc[0],points['x'].iloc[0])
cnode = ox.get_nearest_node(sacroads, latlon)
subgraph = nx.ego_graph(sacroads, cnode, radius=trip_time, distance="time")
node_points = [Point((data["x"], data["y"])) for node, data in subgraph.nodes(data=True)]
nodes_gdf = gp.GeoDataFrame({"id": list(subgraph.nodes)}, geometry=node_points)
nodes_gdf = nodes_gdf.set_index("id")
edge_lines = []
for n_fr, n_to in subgraph.edges():
    f = nodes_gdf.loc[n_fr].geometry
    t = nodes_gdf.loc[n_to].geometry
    edge_lookup = sacroads.get_edge_data(n_fr, n_to)[0].get("geometry", LineString([f, t]))
    edge_lines.append(edge_lookup)
elines = gp.GeoDataFrame(gp.GeoSeries(edge_lines))
elines.columns = ['geometry']
elines = elines.set_geometry('geometry')
elines = elines.set_crs(epsg=3491)
elines['geometry'] = elines.geometry.buffer(10)


texts: Create a grid point layer from a text file in QGIS?

texts:
I have an ASCII file (.txt) with the following columns:

ID, long, lati, value

Where long, lati are the coordinates (long/lat) of the cell centres of a LAT/LON grid with resolution of 30 arc seconds.

How can I create a shapefile with the grid points using the above text file?


texts: 'setExtent' on vector layer not working?

texts:
As pre my requirement I want to set layer extent after drawing all the features. May some feature not visible after applying setExtent() function(this is my requirement). But it's not working. It's working fine with Tiles layer. Here is my code snippet.

 var cellLayer = new ol.layer.Vector({
            name: LAYER_NAME_CELL,
            extent:[12568355.379388269, 3268309.784291403, 12582419.792592742, 3275590.4112355663],
            source: new ol.source.Vector({features: []})
        });


texts: How do I retrieve a single image from an ImageMosaic in GeoServer?

texts:
If I have an ImageMosaic in GeoServer containing several raster images that overlap, is there a way to retrieve/display one of the original images?  Could I use CQL or WCS to get them by fileName or ID or some other attribute?

Do I need to worry about the Image Mosaic JDBC plugin or can I do what I want using just the default ImageMosaic plugin?

Can someone point me to the closest documentation or tutorial online to get me started?


texts: Changing coordinates of shapefile using ArcGIS Desktop?

texts:
I have a shapefile that has meters as coordinates, and these do not reference world datums or projections.

Is there a way to assign completely new coordinates to the shapefile so that they align with normal WGS1984 datums and I can open this file along with other maps?

The file I am using is one of the layers from the map on this link:
https://www.arcgis.com/home/item.html?id=103b63dcc9f448acbd63f22b728b1a02


texts: Aggregate points to polygon as attribute field in polygon dataset

texts:
I am quite new to GIS and have the following question.

I have these two datasets
- Polygon of around 100 administrative units of my city.
- Point data of a feature of interest.

I want to add a field to the attribute table of the polygon dataset, including a count value of how many point features are within each administrative unit.

Which tool in ArcGIS is appropriate for this?

The figure illustrates my problem, the numbers should then be in the attribute table of the polygon dataset.


texts: Invalid data source issue when trying to use lyr.replaceDataSource

texts:
When I run the following code in an open mapdocument, it executes and does what I want it to, replace the datasource of the Indianacounty_shp layer with the County_Boundary feature class.

import arcpy, os, datetime
mxd = arcpy.mapping.MapDocument("CURRENT")
        lyr = arcpy.mapping.Layer('Indianacounty_shp')
        lyr.replaceDataSource(r"N:\3_PLANNING\6_GIS\GIS Data\Indiana_County_Database_201201.gdb", "FILEGDB_WORKSPACE", 'County_Boundary', True)
        mxd.save()

I'm attempting to write a script the have it run through a list of mxd's in a folder, and do the same thing for all of them. When I run the following script, i get a "Runtime error : Object: CreateObject Layer invalid data source"

import arcpy
import arcpy.mapping
import os
import sys
from arcpy import env
import string

env.workspace = r"N:\3_PLANNING\6_GIS\GIS Projects\CompPlanMaps\test"
for mxd in arcpy.ListFiles("*.mxd"):
    mapdoc = arcpy.mapping.MapDocument("N:/3_PLANNING/6_GIS/GIS Projects/CompPlanMaps/test/" + mxd)
    lyr = arcpy.mapping.Layer('Indianacounty_shp')
    lyr.replaceDataSource("N:/3_PLANNING/6_GIS/GIS Data/Indiana_County_Database_201201.gdb", "FILEGDB_WORKSPACE", 'County_Boundary', True)
    mxd.save()
del mxd, addLayer, mapdoc

I've tried with  both / or \ in the file names, and with and without the r in front. Any ideas what I'm doing wrong?


texts: Coordinate system for map downloaded Digimap?

texts:
I have download a 1: 25000 map from Digimap. It came as a tif file along with a tfw file. When I try to import the tif file as a raster layer, I get the following message: 'this layer appears to have no projection specification. By default, this layer will now have its projection set to that of the project, but you may override this by selecting a different projection below'. I then need to pick a projection.

The message suggests that the tif isnt georeferenced. How can I georeference the image to a WGS84 projection?


texts: Download only country and city data from OSM

texts:
I want to download a list of all countries on this planet from OSM.
Also, for selected countries, I would like to have states and cities.

How can this easily be achieved? There must be an easier way that to download the whole planet and iterate through all nodes, ways and relation, checking for each whether it maches my criteria, I hope...


texts:
I've been using QGIS 2.x LTR version for quite some time now (mostly for Lizmap webclient because 3.x didn't perform as well), but today as I wanted to install QGIS on another PC, I realized I couldn't find QGIS 2.X LTR on their website anymore.

Does anyone know, will the new QGIS 3.4.5 LTR replace the 2.X LTR version for ever, causing me to upgrade and test on a newer version? Or is this just a temporary decision?


texts:
I have data about some monuments (date of construction, and other historical information), and I would like to build a sort of visual database to be put online, in which a series of markers should show up on a base map, each corresponding to a given monument. When users click on a given marker, a window should pup up providing info about the monument.
While I am familiar with databasing, I have no experience with the described type of database. Is there a way to accomplish what I am after?


texts: QGIS dividing a raster by a polygons layer

texts:
I've got a raster image and I want to divide that raster by a polygon layer. There are just 7 polygons in the layer so i need to obtain 7 raster images as output.
How can this done in QGIS?


texts: Can't get two shapefiles to plot together

texts:
I have two shapefiles that I am trying to plot in R together with no luck.  I believe both shapefiles have the same projection based on the following information:

Shapefile 1 - sams

proj4string(sams)
[1] "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"

Shapefile 2 - y_17s

proj4string(y_17s)
[1] "+init=epsg:4326 +proj=longlat +datum=WGS84 +no_defs +ellps=WGS84 +towgs84=0,0,0"

Both shapefiles have similar bounding boxes:

sams@bbox
        min       max
x -68.49947 -66.33404
y  40.39582  41.50014

  y_17s@bbox

                  min       max
    beglong -67.33030 -66.37333
    beglat   40.62744  41.49482

But when I plot the sams shapefile and use degAxis to label the axis the values for longitude are displayed like 499640 E

while the y_17s longitude axis is displayed like 68 W

To me this makes me think the projections for both shapefiles are no the same even though they look like they are.

Does anyone have a suggestion?


texts: How To Add A Watermark on Mapping/WMS Services 10.3?

texts: In Geoserver you can add a watermark to your service. Any thoughts on how I can do this on a mapping or WMS service via ArcServer 10.3?


texts:
i try to add google map on my own wms and wfs layer. everything works but when i create point, i intersect point geometry and my geojson data. So without googlemap it was run. But when add google map, points cordinates will be different and intersect result is wrong.you can see picture what i said. when i click on africa, intersect results is correct but i must click on my overlays layers.

http://i.hizliresim.com/xVyDJj.png

WFS_LAYER

 wfs_layer = new OpenLayers.Layer.Vector("Point Layer",
        {

            styleMap: new OpenLayers.StyleMap({
                "default": new OpenLayers.Style({
                    pointRadius: 10, // sized according to type attribute
                    fillColor: "#00FFFF",
                    strokeColor: "#33CCCC",
                    strokeWidth: 3,
                    graphicZIndex: 1
                }),
            }),

            strategies: [new OpenLayers.Strategy.BBOX(), saveStrategy],

            protocol: new OpenLayers.Protocol.WFS({
                version: version,//1.1.0
                // loading data through localhost url path
                url: wfsUrl,
                featureNS: featureNS,
                visibility: true,
                // layer name
                featureType: featureType,
                // geometry column name
                srsName: "EPSG:900913",
                geometryName: geometryName,
                schema: schema,

            })
        });

point intersect :

 function mahalleBul(request) {

            var geojson_format = new OpenLayers.Format.GeoJSON({
                internalProjection: new OpenLayers.Projection("EPSG:900913"),
                externalProjection: new OpenLayers.Projection("EPSG:4326")
            });
            var getMahalle = geojson_format.read(request.responseText);
            if (getMahalle.length > 0) {
                mahalleadi = getMahalle[0].attributes.ADI;
                mahallegisID = getMahalle[0].attributes.GIS_ID;
            }
}
 var request = OpenLayers.Request.GET({
            url: rootURL + "ows?service=WFS&version=1.0.0&request=GetFeature&typeName=Kaski:ADRES_MAHALLE&outputFormat=json&cql_filter=INTERSECTS(the_geom," + feature.geometry + ")",

            callback: mahalleBul
        });


texts: Converting hundreds of georeferenced JPG files to GeoTIFF using QGIS

texts:
I've to convert hundreds of georeferenced JPEG files (.jpg + .jpw) in the GeoTIFF (.tif) format. The coordinates of the world file (.jpw) should not get lost and the file size should not increase. Is there a way to do this as a batch process in QGIS?

EDIT:

Based on Steven's answer I've created a for loop that can be used in th QGIS Python console (Ubuntu):

import os
os.system("""
for f in /home/user/*.jpg;
    do gdal_translate -of GTiff -co COMPRESS=JPEG -co JPEG_QUALITY=90 -co PHOTOMETRIC=YCBCR -a_srs EPSG:3857 $f ${f%.*}.tif
done
""")


texts: how to get json from describe feature type

texts:
i m using geoserver 2.1.3 i want to get the fields of layer from database
http://[localhost]/geoserver/wfs?request=describeFeatureType&typename=topp:states
this reurns me output in xml format how can i get it in json


texts:
I am editing a layer's (Z) attribute table. I made some columns, used the field calculator to fill them up, made some more, went back and deleted some and then tried to save the edits and got the error message: "Could not commit changes to layer Z. Errors: ERROR: 3 attributes not deleted. Success 2 attributes added Success: 10 attribute values changed" Then I closed the error box and the layer remains in edit mode and one can't save it. I tried to save the Z layer and got the same "Could not ..." but also with "OGR error deleting field 3: Invalid field address"
I saved the project and then reloaded the project to find that all the columns in layer Z had been wiped out except an ID layer. The layer Z is ruined. v 1.8.0.
What is going on?  - thanks.


texts: Uploaded layers are not displayed in QGIS Cloud

texts: I have a free account to QGIS cloud. I tried to upload a project with 3 layers(1 line and 2 polygons). During the process, the plugin shows that all the layers are uploading, but in the end when the uploading ends and i save the project, the 2 polygon layers are missing. You can see their titles in the legend, but not on screen,same thing in the QGIS and in the QGIS cloud map viewer. What can be done?


texts: Loading format other than shapefile with ArcGIS runtime 100

texts:
I know how to load a feature table for ArcGIS runtime 100 in C#

ShapefileFeatureTable myShapefile = await
ShapefileFeatureTable.OpenAsync(Path);
FeatureLayer fl= new FeatureLayer(myShapefile);

But how would I do this for another format like SQLite.


texts:
I am trying to read and parse the ESRI ST_Geometry which is an oracle user defined type in java manually, and I follow this instructions, and it said that:

  .... Points: Contains the byte stream of the point coordinates that
  define the geometry

Now even I read the points(Blob in databse) to byte[], I have no idea how to transfer them to the coordinates.

Is this possible?

We have other data in the database which is not produced by ESRI product, if we use ESRI java SDE to access the Spatial data, and get other data from database, I think this is not a good idea. So we use Arcgis SDE to push the spatial data to the database, and try to access the data through jdbc.

And why I do not use the st_astext function to get the data is that we are using Hibernate in the application, and I am creating a custom Dialect to register the St_Geometry column type and read/write the struct. That's why I have to parse the data manually.

And I am inspired by the Hibernate Spatial project, which make the SDGeometry column type mappable.


texts: Using command line gdal to open and convert OSM file to feature class

texts:
I have an file that is in the format .osm.pbf. It's about 8GB. I want to convert it to a feature class and place it in a file geodatabase. From what I can see, the simplest way to do that is using gdal and ogr2ogr. I had both installed with my OSGeo/QGIS. The gdal and ogr2ogr package files and executables are in my C:\OSGeo4W64\bin folder. Initially, I tried converting to a shapefile but ran into problems. I tried running the following command:

ogr2ogr -f "ESRI Shapefile" mydata.shp mydata.osm.pbf

I immediately got the following error messages:

Warning 1: Cannot find osmconf.ini configuration file
ERROR 1: Could not parse configuration file for OSM import
FAILURE:Unable to open datasource `na_test.osm.pbf' with the following drivers.
  -> `JP2ECW'
  -> `OCI'
  ...
  -> `OSM'

I see that I have an 'OSM' driver, but it seems that either a) I don't have osmconf.ini or its in the wrong spot, or b) I need to configure something in osmconf.ini so that it can open a .osm.pbf file. I do have a osmconf.ini, but its in my C:\OSGeo4W64\share folder. I tried copying it and placing it in 'binbut that didn't seem to do any good. My system variable path is pointing to 'C:\OSGeo4W64\bin. In addition to this, I realized that there is no way I am converting 8GB +  osm files into a shapefile and I need to convert them to feature classes or geojson if possible. Help, is there a way to do this? Is ther something wrong with my gdal configuration?

Side Note: I do have gdal and ogr2ogr working in a Python 3.x environment with Pandas/Geopandas.


texts: Dynamically Reload OpenLayers Marker Layer based on user input

texts:
Not really sure how to ask this, so I'll outline the scenario.

We have a database with locations in it. There are various types of cars at each location and each car has a problem of varying importance associated with it.

Some Sample Scenarios

Location A - has a Mercedes - With a Level 3 problem
Location A - has a Ford - With a Level 1 problem.
Location A - has a Toyota - With a Level 2 problem.
Location B - has a Nissan - With a Level 3 problem.

Level 1 problems are the most severe, they get a red marker icon.
Level 2 problems are severe but less so, an orange marker icon.
Level 3 problems are not that bad, a yellow marker icon.

Marker icons for a location are selected by the highest priority problem at the location.
i.e. Location A would have a red icon because the ford has a Level 1 problem. Location B would  have a yellow icon because it only has a problem 3 there.

We have managers who are responsible for types. i.e. Manager 1 is responsible for Mercedes and Nissan vehicles.

So Manager 1 would like to select Mercedes and Nissan and see a Yellow icon at Location A and a Yellow icon at location B.

Manager 2 might select Ford and Toyota. He should see Red at location A and there shouldn't even be a marker at location B.

I'm using a simple OSM tile map and marker layers. I have a one marker layer for each type of car and that marker color is based on the highest priority, it works fine as long as they only select one layer at a time, if there's 2 selected, the icon for one type gets drawn over the icon for the previous type and the icon color is only representative of one type, not the highest priority of the types selected.

Currently, the data is loaded and the layers built via an AJAX call, what I would like to do is change the application to only have 1 marker layer but allow the user to select types and rebuilt it via AJAX call each time. Is there a way to do this? Ideally it would still work like the LayerSwitcher control. Is there a better way to go about solving this?


texts: I have created a layer and using the category option have created lots of 'sub layers' is there a way to convert these to real layers so I can export each layer to a PDF?


texts: Building a rule engine for report generation in QGIS composer manager atlas generator; using metadata from non-coverage layers for expressions

texts:
I am working on a site-specific automated report generation system using a template built in the QGIS composer manager, based on the atlas generator. The coverage layer is a 'Site Boundary', effectively polygons defining individual properties in the UK. For each property, I need to be able to build rules based on the attribute values of the features of different layers (e.g layer 1, layer 2, layer 3 etc... not the same as the coverage layer) beneath each Site Boundary, which I will then use to populate the template (using labels). An example of this may be:

If the attribute value of layer 1 beneath the Site Boundary is w, and the attribute value of layer 2 beneath the Site Boundary is x, display y, if not display z. This would need to be done for each Site within the atlas, using the unique attributes beneath each Site Boundary.

So far I have been able to build the atlas based off the Site Boundary layer and add the attribute tables of other layers to the template. I then filtered the results so that only the features that intersect with the Site Boundary are displayed for each Site Boundary within the atlas. However, I can only seem to build expressions based off the coverage layer. I need to be able to build expressions based off the feature attribute values of each layer for each Site Boundary within the Atlas. Is there some way of doing this?


texts: PyQGIS algorithm qgis:joinattributesbynearest not found

texts:
After re-installing Windows and QGIS 3.14 it seems like some PyQGIS algorithms are not working. For example:
processing.run("qgis:joinattributesbynearest", options)

gives
core.QgsProcessingException: Error: Algorithm qgis:joinattributesbynearest not found
I checked the algorithm ID in the latest docs, and it is correct.
For troubleshooting, I created a list of all available algorithms using
for alg in QgsApplication.processingRegistry().algorithms():
    print(alg.id(), "->", alg.displayName())

This results in quite a long file to share here but nowhere in the file I can find the algorithm name or identifier.
Note that the algorithm is available via the Processing Toolbox in the GUI, so I wonder where the PyQGIS version is hiding.


texts: Adding leaders to point symbols if they overlap using ArcGIS Desktop?

texts:
I've added symbols to one of my point shapefiles, but for several datapoints this has resulted in  symbols stacked on top of each other because there are multiple sample types for one sample location (i.e. water, sediment, and benthic samples collected at one station). The result is a cluttered mess! Can I bring a few of my symbols away from the location and have leaders point to the sampling station?

I'm working with ArcView so I can't use the "Disperse Markers" tool. If I download QGIS and deal with my markers in that environment, will my changes "stick" if I bring the layer back into ArcView? (I haven't used QGIS before; is this even possible?)

The Maplex extension suggestion doesn't seem to apply to my situation as I am attempting to remove overlap from symbols, not text. I am tring to determine if I can bring some of my symbols (I have 20 different symbols in the layer in question) out on leaders to aviod clutter. Is this even possible? I don't mind putting in a extra time to "fiddle" with my symbols.


texts: Imported Excel Spreadsheet Creates Null Values

texts:
I've imported an Excel spreadsheet into ArcMap 10.5 and one of the columns entirely populates with NULL values. That column is just "reference numbers" so its just numbers from 1-180 in increasing value.

Does anyone know why this is happening and a possible workaround?


texts: Differentiating a building from a road on a map?

texts:
This question was originally asked here by Steven and I felt the question was better asked here.
Steven would also like to know the sources Google buys it maps from. I remember seeing a post about it on this forum, but couldn't find it when I searched. Please do help...


texts: Where can I get aerial images for commercial use?

texts:
Related question: Free aerial map images for commercial use - Alternatives to Google maps

I'm looking for a service that will allow me to download images at up to 1 meter resolution. Currently our system is based around the Mercator projection (pardon me if my terminology is incorrect) documented here. On this scale, we need imagery up to zoom level 17, which works out to be 1.2 meters per pixel.

The only quote online that I could find was from Google Maps API for Business, which is $10,000 at the time of this writing. From what I can tell, the license doesn't allow images to be downloaded. Our system doesn't guarantee connection to the internet, so images will be pre-loaded.

Currently I'm using MapQuest Open Aerial Tiles, but I need a little more coverage that that service provides.

If it matters, we don't charge for the images, but we do charge for the software that uses the images. Images are only a small part of the overall software, so we consider it to be a free service provided with the product.

What services exist that meet these requirements? I am willing to pay a license fee, provided it isn't ridiculous (<20,000 or so per year).


texts: can't read attribute from map file (.kml) using OpenLayers2

texts:
I want to create thematic maps using OpenLayers with KML map. But when I run the code, color and label thematic maps of the polygon can't show up. instead writing out undefined. what's the cause? are attributes of the map can not be read?

here is the code :

-->IDKAB is attribute codes in the map file

-->and its the result :


texts:
I am bringing a parcels shapefile and buildings shapefile into ArcScene.

They come in okay and look fine as 2D features.

When I extrude the building outlines based on height they look as if they are 20+ miles tall and they do not seems to be proportional.

Is there a way to set units when I extrude?


texts: Creating distributive flow line map showing movement of passengers from bus terminal to several destinations?

texts:
I'm writing my final year B.Sc thesis on transportation (pattern of passenger flow from a bus terminal to several destinations).

I intend to use a distributive flow line method of spatial movement analysis in ArcMap, now that I have the software and flowline tool all ready. I also have a raster map showing the defined source region and defined destination regions of passengers. I was able to add a point to signify the source point and several other points to signify the destination points.

I also have a record of number of passengers moving to all the various destinations from the defined source point.

What I don't know is how to make flow lines of different widths to link the source point to the several destination points. I want to make the width of the lines to be defined by the number of passengers moving through them (i.e the higher the number of passengers, the thicker the lines and vice-versa).


texts: Converting DEM units using Map Algebra and Python

texts:
I am trying to write a bit of code that combines a bunch of DEMs that match up perfectly and convert the elevation values of the pixel cells from meters to feet. This is all using Pyscripter and Python 2.7.

I found some code on stack exchange (Add two rasters in python using map algebra) that I tried to translate using my own variables, but cannot get it to work. I can create the mosaic fine, but once it gets to the Map Algebra part it crashes on the expression.

Here is my code. I pretty much took what the post had and translated using my own variables. I also tried putting the expression in eval() and it still crashed. Putting '"' + .... + '"' didn't work either.

#Convert DEM values to feet.
dem_input = str(mos_wrk) + "\\" + str(mos_name)
demft = dem_input*3.28084
demft.save(str(mos_wrk)+"\\"+str(demft)+"_ft")


texts: Converting ArcSDE point data from image to MSSQL geometry

texts:
I have a bunch of points in an SDE table which is currently stored in an MSSQL database.

The full entry is below, while the data i'm trying to convert from binary to geometry is: 0x0B000000000100008AA1D6D50F8DC091D80600

Inside the SQL table the data is stored as an 'image' datatype.

I'm chasing the correct way to convert this data into a geometry type so I can see its components.

I've tried 2 general methods methods, both have failed.  I've now retiring as not knowing what i'm doing.. help?

declare @binary VARBINARY(MAX) = cast((select top 1 points
                                       from networks.networks.f43) as varbinary(MAX))
declare @geo geometry = cast(@binary as geometry)

select convert(geometry,0x0B000000000100008AA1D6D50F8DC091D80600,0)
select cast(0x0B000000000100008AA1D6D50F8DC091D80600 as geometry)

These all return the same error, with an unexpected version??

  A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry":
  System.FormatException: 24210: Geometry type with an unexpected version of 0 received; only versions up to 2 are accepted.
  System.FormatException:
     at Microsoft.SqlServer.Types.GeoData.Read(BinaryReader r, SerializationVersion maxVersion, String strUnexpectedVersion, Boolean isGeography)
     at Microsoft.SqlServer.Types.SqlGeometry.Read(BinaryReader r)
     at SqlGeometry::.DeserializeValidate(IntPtr , Int32 , CClrLobContext* )

declare @g geometry = geometry::STGeomFromWKB(0x0B000000000100008AA1D6D50F8DC091D80600, 0);

Returns this error:

  A .NET Framework error occurred during execution of user-defined routine or aggregate "geometry":
  System.FormatException: 24115: The well-known binary (WKB) input is not valid.
  System.FormatException:
     at Microsoft.SqlServer.Types.WellKnownBinaryReader.ParseWkb(OpenGisType type)
     at Microsoft.SqlServer.Types.WellKnownBinaryReader.Read(OpenGisType type, Int32 srid)
     at Microsoft.SqlServer.Types.SqlGeometry.GeometryFromBinary(OpenGisType type, SqlBytes binary, Int32 srid)


texts: Can't upgrade PostGIS on Ubuntu with Postgres 10?

texts:
I am running Postgres 10.5 (I think) on Ubuntu 14.04. I want to upgrade to PostGIS 2.2+ so I can use ST_Subdivide. I've done:

apt install postgresql-10-postgis-2.4

But when I try to upgrade PostGIS from the psql interface, it won't let me:

 # ALTER EXTENSION postgis UPDATE;
 NOTICE:  version "2.1.4" of extension "postgis" is already installed
 ALTER EXTENSION

What do I need to do to update?

Other useful info from the command line:

~# psql --version
psql (PostgreSQL) 10.5 (Ubuntu 10.5-2.pgdg14.04+1)
~# pg_config --libdir
/usr/lib/x86_64-linux-gnu
# pg_config --pkglibdir
/usr/lib/postgresql/11/lib

And inside Postgres (NB I'm actually confused about which version of Postgres I'm running, since SELECT version() suggest 9.3 but the command line output above suggests 10.5):

# SELECT version();
                                                   version
--------------------------------------------------------------------------------------------------------------
 PostgreSQL 9.3.24 on x86_64-unknown-linux-gnu, compiled by gcc (Ubuntu 4.8.4-2ubuntu1~14.04.4) 4.8.4, 64-bit
(1 row)

# SELECT PostGIS_full_version();
 POSTGIS="2.1.4 r12966" GEOS="3.4.2-CAPI-1.8.2 r3921" PROJ="Rel. 4.8.0, 6 March 2012" GDAL="GDAL 1.11.2, released 2015/02/10" LIBXML="2.9.1" LIBJSON="UNKNOWN" TOPOLOGY RASTER


texts: Use current date of ArcGIS time slider as date input in query builder

texts:
I'm trying to formulate a query in ArcGIS query builder, returning only Features present in a certain year. The year should be definable by the user by setting the date in the time slider.

My Problem is that I should do this for 5 different layers. Layer 1 showing the Features of the current year set in the time slider, layer 2 showing the Features of the current year (time slider) + 1, layer 3 showing the Features of the current year (time slider) +2 etc.

I managed to do so using sysdate (code for the current year (sysdate) + 1):

SELECT *
FROM FC
WHERE:
trunc(START_DATE, 'YEAR') <=  trunc(sysdate, 'YEAR') + INTERVAL '1' year
AND
trunc(END_DATE, 'YEAR') >= trunc(sysdate, 'YEAR') + INTERVAL '1' year

But now I should find a solution to get the time slider date instead of the sysdate.
Is this possible? Or are there more elegant approaches to solve this Problem?

I'm using ArcGIS 10.6 Desktop and Database is Oracle.


texts: How to change decimal places when using graduated renderer?

texts: The classifications given when I use the graduated renderer on QGIS under 'Layer Properties' are to 4 decimal places, and I would like none. I know I can use the rule based style and create my own classifications, but I have many of these to create.


texts: How to do a custom, ad hoc, affine transformation?

texts:
I have a data set of unknown origin (probably CAD) and I have determined that the correct transformation for this data into the projection that I want is as follows:

(4x + 2205432),  (30y + 1254781)

However, The "Custom Projection" tool is a bit vexing and there is no obvious way for me to enter parameters like this in.  I would call this an affine transformation but I don't see that option available.

I've never done this before, can someone tell me how it's done?


texts: CategoryList attribute for predefined color ramp in pyQgs

texts:
I am trying to style my vector layer in QGIS using the following python code:

layer = iface.activeLayer()
myStyle = QgsStyleV2().defaultStyle()
defaultColorRampNames = myStyle.colorRampNames()
ramp = myStyle.colorRamp(defaultColorRampNames[1])
field='count'
renderer = QgsCategorizedSymbolRendererV2(field,[])
renderer.setSourceColorRamp(ramp)

layer.setRendererV2(renderer)
if iface.mapCanvas().isCachingEnabled():
    layer.setCacheImage(None)
else:
    iface.mapCanvas().refresh()
layer.triggerRepaint()

But on executing this code , all features get coloured white.Now i know this is because i am passing an empty second  argument to QgsCategorizedSymbolRendererV2(field,[]).The problem is that i am not able to figure out what to pass as the second argument if i want to use the default color ramp.


texts: Not rendering new data after second import?

texts:
Trying to create a slippy map using apache2, renderd, and postgresql.

I started with just one state and used osm2pgsql to import it. I got everything working great and decided to scale up to North America.

I ran the same import command but with a different PBF and let it run all night. It finished this morning I started everything back up to find I am still only rendering the state.

I followed these instructions to get a slippy map working. I used only the Ohio PBF instead of the whole planet because it was taking a while to download. I got it all up and working great so I wanted to scale up to all of North America.

I downloaded the file and here is where I think I messed up: instead of using the --append flag I used the same osm2pgsql --slim --hstore -d gis -C 30000 -S openstreetmap-carto-2.41.0/openstreetmap-carto.style north-america-latest.pbf it ran for a little over a day and probably used 150GB of disk space.

It seemed to finish just fine but when I checked the map it was not rendering any of the new data. I now can't reimport the data because I'm getting an error:

  failed: ERROR:  duplicate key value violates unique constraint
  "planet_osm_ways_pkey"

I feel like there should just be another command I can run on the database to patch everything up to use all the data. I'm really hoping to not have to spend another day starting from scratch. Does anyone know the magic fix?


texts: QGIS equivalent to FME Change Detector for vector data

texts:
Is there a Vector change detection tool for qgis that works similar to http://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/Transformers/changedetector.htm
It's OK if there's two tools -one spatial and one attributional. Before I go down the line of trying to create one? I have searched online and in the plugins but can't find anything.

Spatial change - has the boundary changed at all, example a parcel split or merged, a new area added etc .
I am mostly interested in polygon changes. Points and lines are easier to handle with existing spatial tools.

Attribute change - ability to select the attributes to review and then see if there are changes for a given unique key between the 2 datasets. The output should be a table which has the old and new values next to each other (FME doesn't do this -it just has a port for all changes)

So


texts: Cannot save KML polygon after modification

texts:
I am a new QGIS user.
I have layer containing few polygons, imported from a .KML file (I have created them with Google Earth). I need to adjust the vertex, so I right click on the layer and select "enable modifications" (not sure how is the English label in the menu, I have Italian localized installation). Then I click on the "vertex tool (all vectors)" and I am able to move the vertex I need. When I want to save the changes I made, I click on the "save vector modification" icon, but I get this error message: "OGR error to set element 1: Failed to open C:/PROGRA-1/apps/qgis/./resources/data/world_map.gpkg: Permission denied". If I keep trying, I get a different error message: "OGR error to set element 1".
Any suggestions?


texts: Using marker.cluster plugin with the ajax plugin of Leaflet?

texts:
I want to use both the marker cluster plugin and the ajax plugin together, but I cannot seem to make it work.
My geoJSON data are point geometries.

I was able to successfully use the ajax plugin of leaflet like this:

// Style function for thegeojson layer
function getColor(status) {
    if (status =='active'){return "#FF006F" }
    else if (status =='closed'){return "#20679A" }
    else if (status == "under construction"){return "#0FB248"}
    else {return "#FCFF15"}
}
//loading the geojson for the power plants
var geojsonAjax = new L.GeoJSON.AJAX("geojson/geojson.geojson",{
    style: function(feature) {
        return {
            radius:6,
            fillColor: getColor(feature.properties.Status),
            color: getColor(feature.properties.Status),
            weight: 1,
            opacity: 1,
            fillOpacity: 0.7
        }
    },
    pointToLayer: function (feature, latlng) {
        return L.circleMarker(latlng)}});

I was also able to use the markercluster plugin:

//loading the geojson using a js variable
var markers = new L.MarkerClusterGroup({
    showCoverageOnHover: false,
    maxClusterRadius: 80});
markers.addLayer(L.geoJson(geojsonJS));
map.addLayer(markers);

But when I want to replace the geojsonJS variable with the content I get from the AJAX plugin, it does not work.

// THIS DOES NOT WORK
 markers.addLayer(L.geoJson(geojsonAJAX));

I do not get any error in the console - and the map is just empty.

Any idea what the problem might be?

EDIT

The solution I accepted worked perfectly. However, the clustering functionality was not working because I had MultiPoint geometries. Transforming them into Point geometries was the final trick to make the whole thing work.


texts:
I've been using the great Shapely/Fiona combo successfully on Linux, but now i need to create a kind of production environment on windows and theres only one problem. When i try to import fiona, i get the following error:

if i try to check dependancies of the ogrext.pdy using dependancy walker, it seems it is trying to load GDAL version 1.10 dll and fails. Strangely though, i have GDAL 1.9.2 installed and it seems to import into python without a problem (from osgeo import gdal). So maybe its not even related to the fiona import issue. Also, im 100% i downloaded the fiona installer for python 2.7 since i know issues can arise if you use .pyd files intended for a different version of python.

Note, im using a standalone installation of python 2.7.5, without using osgeo4w installer.


texts:
I was given a shapefile at work with the information that it is in Lambert Azimuth Equal Area (LAEA) projection (EPSG 9820). After some research on the web, I found out that EPSG 9820 is a generic EPSG for all LAEA projections [1].
The *.prj like this:

 PROJCS["LAR_LambertAzimuthalEqualArea",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-75.0],PARAMETER["Latitude_Of_Origin",-10.0],UNIT["Meter",1.0]]

Is there a way how I can figure out the EPSG code based on the *.prj file with open source tools?

[1] http://www.osgeo.org/pipermail/gdal-dev/2008-January/015519.html


texts: Creating regions (set of lat, lng) on map using other than ArcMap?

texts:
I'm writing a project for school and as a part of the project I need to tell if a certain point is within a given region (which is a polygon made of lat, lng tuples).

So far I was working with http://www.doogal.co.uk/polylines.php but unfortunately this isn't enough when I want to draw 50 areas, name them and keep them organized.

What's the easiest way to achieve what I need? I tried using ArcGIS's ArcMap but that seemed like a total overkill, it would take me too much time to learn how to work with this program and I don't need 99% of the features it provides.


texts: LiDAR Feature extraction specifications/standards

texts:
I have vector data representing forests/trees/buildings that have been automatically extracted from LiDAR data.  I am looking for specification/guidance for LiDAR derived products, or any standard for defining these features.  For example, a forest is only a forest if it is larger than x square meters, or a tree is not a tree unless it is x meters tall, etc.  The automatic process has created detailed features, and as a result very large datasets.  I would like to find a standard definition so that I can thin the datasets.  Ideally, I would like to know if there are standards developed/adhered to by the USGS, USDA, NGA, NFS, etc.  Does anyone know of such standards/specifications?  Thanks in advance.

EDIT: Process is similar to this.


texts: Need to calculate values for a cell based on surrounding landscape

texts:
I have a raster file with the urban development of a county mapped out (values: 1=urban 0=not urban). I also have a raster file with several blocks of forested land, each block of land has its own numeric identifier and 2-1000 cells per block. The 2 rasters have the same cell size.

I need to calculate, for each individual cell in the forested lands layer, what percentage of the land within 4km is covered by urban development.

I'm using ArcGIS 10.1

Thanks in advance!


texts: Mapping of small water bodies in desert environments

texts:
I am trying to map small surface water bodies in a desert.
My issue is: water pixels don't cover full extent water bodies (see screenshot attached).
What threshold values would I need so that water bodies are mapped according to their shapes/full contours/full extent?
Is it possible to play with thresholds with a slider or using some other method such as a histogram?

The code can be found here.
More about the Gond methodology (taken from Herndon et.al. 2020) here:

Gond and colleagues developed a simple decision tree method using the
VEGETATION instrument for identifying water bodies in the Sahel. This method was developed
speciﬁcally to address the wide range of water body types and the variation in the surrounding
landscape associated with seasonal changes in the region.
First, the difference between NDVI and
the normalized difference moisture index (NDMI) is calculated and the average is computed using
a moving window of 45 pixels-squared. Next, the difference between this average and the original
difference is calculated and pixels with a value greater than 0.08 are kept as potential water bodies.
Then, a moving average of 45 pixels-squared is calculated for SWIR1 and the difference between the
average and the original SWIR1 band is calculated. Pixels with a value of 0.05 or greater are kept as
potential water bodies. Finally, the two outputs are combined using an “AND” function, and any
pixels that satisfy both are classiﬁed as water. One potential source of error identiﬁed in the original
paper is confusion of clouds for water; the authors suggest using a separate cloud mask to address
this issue. Additionally, they suggest that this method may not work on water bodies that are large
enough to impact the regional average of the moving window average. The Gond simple decision
tree does not perform well in areas with dense or moist vegetation because the contrast with water is
diminished. This method was developed explicitly for dryland surface water detection.


texts: Shapefile in leaflet shifted North 0.25°

texts:
I have the following problem:

I render a bunch of weather maps as PNG overlays with grads and then reproject them from EPSG:4326 to EPSG:3857 to display them in leaflet as follows:

gdal_translate -of "GTIFF" -a_srs EPSG:4326 -gcp 0 0 -40.0 80.0 -gcp 4800 0 80.0 80.0 -gcp 2400 1000 20.0 55.0 -gcp 0 2000 -40.0 30.0 -gcp 4800 2000 80.0 30.0 ${INFILE} /tmp/SK_L_referenced.tif
gdalwarp -overwrite -setci -t_srs EPSG:3857 /tmp/SK_L_referenced.tif /tmp/SK_L_warped.tif
gdal_translate -of PNG /tmp/SK_L_warped.tif /tmp/SK_L_warped.png

Those reprojected PNG in leaflet match the maps that grads produces itself, i.e. they should be correct.
Additionally, I reproject some shapefiles which I also produce with grads as follows:

ogr2ogr -f "ESRI Shapefile" output.shp input.shp -s_srs EPSG:4326 -t_srs EPSG:3857 -overwrite'

Those files appear in leaftlet shifted ~0.25° to the North. I have no clue whatsoever what could be the problem here. It's a total mystery to me.


texts:
I want to develop a plot of delayed moving average. The code for this in MATLAB is:

nr_pontos = 36;
coefs_filtro = ones(1, nr_pontos)/nr_pontos;
data_dma = filter(coefs_filtro, 1, data);
figure,plot(data)
hold on,plot(data_dma,'r')
hold off

But I want to develop this in python using numpy or scipy.
I found the convolve function of numpy, but I think the results were not what I expected. Can you help me?


texts: How to bulk import ESRI projections into Postgis

texts: Where can I get a file that would allow me to bulk upload all of the ESRI projections into the spatial_ref_sys table of postgis. I know that you can get insert statements on spatialreference.org; however one must look these up one by one --and I would rather just load them all at once.


texts: Exporting "pennLC" object stored in R as a shapefile

texts:
I need to export the pennLC object from package:SpatialEpi as a shapefile. pennLC  contains different components of lung cancer dataset for Pennsylvania state such as:

$geo, a data frame
$data, a data frame
$smoking, a data frame
$spatial.polygon, SpatialPolygons.

The problem is, pennLC has a number of components which won't be linked together when I try to export them as different tables and shapefiles using writeOGR or writeSpatialShape commands.

I need pennLC object exported out of R as a shapefile in a way that its datasets/components are tied together.


texts:
I have a script that iterates through the double fields in a shapefile and then creates a raster using TopoToRaster but I keep getting an error at the moment it begins with the "Enero" field, this is the code

import arcpy
from arcpy import env
from arcpy.sa import *
arcpy.env.overwriteOutput = True
arcpy.env.extent = r'C:\Users\g-aka\Desktop\Tua\Limite\LimiteTua.shp'

capa = r'C:\Users\g-aka\Desktop\Tua\Precipitacion\EstacionesCopy.shp'
fieldList = []

for field in arcpy.ListFields(capa,"","Double"):
    fieldList.append(field.name)

for i in fieldList:
    Result= TopoToRaster ( TopoPointElevation([[capa, i]]),
                      "10",arcpy.env.extent,"20", "",
                       "","ENFORCE_WITH_SINK","SPOT")
    rasters= r"C:\Users\g-aka\Desktop\Tua\Preci3.gdb\%s" %i
    Result.save(rasters)
    print rasters
print "finalizado"

it does great when the pixel size es 100 but the moment it is 10 I get an error in Enero but not in Anual, this is the error. I think the reason is the low values of Enero field

these are the values

the error:

Traceback (most recent call last):
File "D:\Luis\scrips_py\arcgis\Clima\toporaster.py", line 22, in <module>
"20", "", "","ENFORCE_WITH_SINK","SPOT")

File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\sa\Functions.py", line 2926, in TopoToRaster
out_contour_error_feature)

File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\sa\Utils.py", line 53, in swapper
result = wrapper(*args, **kwargs)

File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\sa\Functions.py", line 2902, in Wrapper
out_contour_error_feature)

File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\_base.py", line 506, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
ExecuteError: ERROR 010235: Returned error from Topo_To_Raster.
ERROR 010067: Error in executing grid expression.
Failed to execute (TopoToRaster).


texts:
I have a bunch of linestring features on a vector layer. Some of them overlap. If I trigger the hover event on those features, I want them be in front.
I did find some functions to set the z-index of layers, but nothing for manipulation individual features. I tried using the individual style maps, but that doesn't work. What am I doing wrong?

    // Add vectory layer
    this.vector = new OpenLayers.Layer.Vector("Track", {
        renderers: ['Canvas', 'SVG', 'VML'],
        rendererOptions: { zIndexing: true },
        styleMap: myStyle
    });
    tbMap.map.addLayer(this.vector);

In a loop various lines are added like so:

        //make the new tracksegment
        myTrack = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.LineString(path), {hash: hash});

        // Draw vector on the layer
        this.vector.addFeatures([myTrack]);

And the stylemap:

var myStyle = new OpenLayers.StyleMap({
    "default": new OpenLayers.Style({
        pointRadius: config.pointRadius,
        strokeColor: config.strokeColor,
        fillColor: config.fillColor,
        fillOpacity: config.fillOpacity,
        strokeWeigth: config.strokeWeigth,
        strokeWidth: config.trackWeight,
        strokeOpacity: config.strokeOpacity,
        fontColor: config.fontColor,
        fontSize: config.fontSize,
        fontFamily: config.fontFamily,
        graphicZIndex: 0
    }),
    "select": new OpenLayers.Style({
        pointRadius: config.pointRadius,
        strokeColor: config.strokeColor_selected,
        fillColor: config.fillColor,
        fillOpacity: config.fillOpacity,
        strokeWeigth: config.strokeWeigth,
        strokeOpacity: config.strokeOpacity,
        fontColor: config.fontColor,
        fontSize: config.fontSize,
        fontFamily: config.fontFamily,
        graphicZIndex: 100
    }),
    "hover": new OpenLayers.Style({
        pointRadius: config.pointRadius,
        strokeColor: config.strokeColor_hover,
        fillColor: config.fillColor,
        fillOpacity: config.fillOpacity,
        strokeWeigth: config.strokeWeigth,
        strokeWidth: config.trackWeight,
        strokeOpacity: config.strokeOpacity,
        fontColor: config.fontColor,
        fontSize: config.fontSize,
        fontFamily: config.fontFamily,
        graphicZIndex: 100
    })
 })


texts:
I have a map containing multiple data frames, the continental US, Alaska, Hawaii, PR, and Guam.

These data frames contain different symbology which I would like displayed in a legend.

Currently, the legend only shows the symbology from the active data frame, continental US in this instance.

Is there anyway to combine data frames so the legend displays the symbols from all data frames while maintaining the extent of the continental US?


texts:
I've got a PyQGIS 3 project up and running with a .sqlite database, with which I'm adding layers to with a QgsVectorFileWriter, without too many issues so far.

However I've noticed that once a Vector- or Raster layer has been removed from the scene (using QgsProject.instance().removeMapLayers(ids)) the layer is removed properly, but its data in the database remains unchanged.

Is there any way to get the database to delete the table associated with the layer that's being removed?

I see the QgsVectorFileWriter has a deleteShapeFile() method for removing layers in .shp files, and a CanDeleteLayer option in the ActionOnExistingFile enumerator, but it's not at all obvious how these should be used.

I have not found an option in the data provider to force the driver to remove the sqlite tables.


texts:
I have a bunch of DXF files to import into ArcGIS 10 but they are all in mm. However I need to change the unit to Meter and to do this I have to open AutoCAD to do it each time.
Can anyone help to write a script in Python to batch convert the unit of DXF from mm to m without going through openning AutoCAD? Then they can be added in Arcmap to create shapefiles out of them.


texts: QGIS and Ubuntu 'browse' dialogue causing crashing

texts:
Below is an image of 'the suspect dialogue' in Ubuntu that when you encounter it in QGIS  you are most definitely going to crash the application.

http://ow.ly/i/ZGNc/original

You find this particular dialogue - which doesn't appear with every menu - when you use:
-  polygon centroids
- raster extraction / projection
- create new shapefile (from desktop when you browse to location of new file)

ubuntu 12.04
qgis 1.8


texts: Re-ordering fields in an Attribute table in ArcGIS Online

texts:
Im trying to rearrange the order of the fields in an attribute table layer in ArcGIS Online.

Ive read that i must hold down the left key and drag the field header left or right. I tried but that didnt work.

Does this work for anyone?
Can someone help me.


texts:
I have a pdf of a street map which is many different colors depending on land use.

I need to import it into ArcMap and then digitize it. Obviously I could manually create each feature but that would take days. I've done some reading and it appears that I can use the ArcScan method to automatically create vectors from the pdf.

I have converted it to a tif image and then imported it into ArcMap. I understand it needs to be two colors only in order to get ArcScan to work. I try reclassifying the raster with just two classes to make it two colors but when I do this I lose a whole bunchof the streets. This seems to be because they fall into certain landuses which are colored specifically (purple, blue orange and green). I have tried manually assigning the breaks, but it seems that all of these colors are lumped into one group right at the end of the distribution graph in the classification, so there's seemingly no way to separate them which results in me losing all this data.

Does anyone know a way around this, or a better way to quickly digitize street map data from a pdf in arcmap?


texts: QGIS: Disabled UI elements still showing up

texts:
I came across a problem while customizing a (simplified) QGIS UI for usage on a windows tablet.
I managed to turn off all unwanted toolbars, toolbar elements etc. However, when I disable certain elements of the QgsGpsInformationWidgetBase, they still seem to show up in the widget. Might be, that I'm just interpreting the customization options for that widget wrong.
Is it possible, do disable all options except the "connect" and the "add feature" buttons?


texts: Geotools writing shapefiles without geometries

texts:
When I am writing a shapefile according to CSV2SHP tutorial, it contains features without geometries. I use version 10-SNAPSHOT.

For example the result of ogrinfo looks like below:

D:\>ogrinfo locations1.shp locations1
INFO: Open of `locations1.shp'
      using driver `ESRI Shapefile' successful.

Layer name: locations1
Geometry: Point
Feature Count: 9
Extent: (0.000000, 0.000000) - (-1.000000, -1.000000)
Layer SRS WKT:
GEOGCS["WGS84(DD)",
    DATUM["WGS84",
        SPHEROID["WGS84",6378137.0,298.257223563]],
    PRIMEM["Greenwich",0.0],
    UNIT["degree",0.017453292519943295],
    AXIS["Geodetic longitude",EAST],
    AXIS["Geodetic latitude",NORTH]]
Name: String (15.0)
Number: Real (15.13)
OGRFeature(locations1):0
  Name (String) = Trento
  Number (Real) = 140.0000000000000

OGRFeature(locations1):1
  Name (String) = St Paul
  Number (Real) = 125.0000000000000

OGRFeature(locations1):2
  Name (String) = Bangkok
  Number (Real) = 150.0000000000000

OGRFeature(locations1):3
  Name (String) = Ottawa
  Number (Real) = 200.0000000000000

OGRFeature(locations1):4
  Name (String) = Minneapolis
  Number (Real) = 350.0000000000000

OGRFeature(locations1):5
  Name (String) = Lausanne
  Number (Real) = 560.0000000000000

OGRFeature(locations1):6
  Name (String) = Victoria
  Number (Real) = 721.0000000000000

OGRFeature(locations1):7
  Name (String) = Cape Town
  Number (Real) = 550.0000000000000

OGRFeature(locations1):8
  Name (String) = Sydney
  Number (Real) = 436.0000000000000

Where could be the problem?