Tag Info

Hot answers tagged

11

Rasters are images, so the best format will be an image format (png/jpg/etc). Geojson is a good format for vectors. You will never see, say, your facebook profile pic be transported back as pure json. Of course, returning a url to an image as json is very very different :) As far as the jpeg vs png vs any other image format discussion, there are tons of ...


7

Download the source code from here http://www.osola.org.uk/elevations/index.htm SRTMGeoTIFFReader.php is the clever file the reads the GeoTiff and converts the elevation values (in meters) into Lat/Lng coordinates. I doubt this is exactly what you want but it does give you a solid base on understanding the process required to accomplish the task from your ...


7

No, that won't work. Geoserver is expecting an SLD, so it will fail parsing any PHP code you insert there. What you can do is generate the SLD outside of Geoserver and pass it over when requesting the map from Geoserver. In OpenLayers it works like this: var sld = '<StyledLayerDescriptor version ="1.0.0" ...> more xml here ...


7

You can store your data in a database (Fusion Tables is a quick solution). Google Maps has a tutorial that shows you how to do this with MySQL (but can be any database) http://code.google.com/apis/maps/articles/phpsqlajax_v3.html You can get as secure and obfuscated as you want using a database back-end. Looks like you geocode your data on the fly - you ...


5

Mehul, I work in the address verification industry with a company called SmartyStreets. There are lots of geocoding services out there, but only few will support batch processing with the volume you require. (Google and others don't permit bulk use of their API or storing/caching results.) If you go to your MySQL database and perform an export of your table ...


5

You make mistake in loadMarkers function: if(jsonData.markers[i].limpio == 0) var icon = new OpenLayers.Icon('redMarker.png',size,offset); if(jsonData.markers[i].limpio == 1) var icon = new OpenLayers.Icon('greenMarker.png',size,offset); After that icon variable is undefined. You should explode this variable before if statement var icon; ...


5

First you'll need to set up MapServer as a WMS, then you'll need a tile cache to produce the tiles and store them. This guide should get you started with that. Then only real catch is that Google think the Earth is round and made up their own projection so you'll need to serve your tiles in epsg:900913 but most (all?) the tile caches mentioned in the above ...


5

'n' is almost always used to denote the number of items in a dataset (ie the number of people who participated in a survey or the number of animals counted). I would venture to guess that in this case it represents the number of tiles present at a given zoom level. However, without more information about precisely what you are trying to accomplish it is ...


5

Your generated GeoJSON is valid JSON, no problem. But, it's not valid GeoJson, as you can see here: http://geojsonlint.com/ The problem seems to be that the features-array in your featurecollection contains three features, two with geometry:none and one with just geometry (which is also string-encoded). So, in short: Your OpenLayers-code seems fine, the ...


4

You won't be able to actually hide the contents of popup_content and address from the user, simply because anything that is sent to a web page is plainly visible to the end-user. Instead of dumping it all at load-time though, you can do an async request for it on a map click. In your click handler function you would want to make a request from the PHP page ...


4

If you like Python, you could use the GeoPy API, combined with the GDAL Python bindings or Fiona, and create a very basic script like this for converting the addresses to a point shapefile. This will geolocate a file named 'addresses_to_geocode', creating an output shapefile named 'my_output.shp': import os from geopy import geocoders from osgeo import ...


4

Try changing your Polygon WKT to this (note the extra parens): POLYGON((50.866753 5.686455, 50.859819 5.708942, 50.851475 5.722675, 50.841611 5.720615, 50.834023 5.708427, 50.840744 5.689373, 50.858735 5.673923, 50.866753 5.686455)) That's off the cuff and I haven't tried it yet, but well-formed WKT for Polygons has to support both the outer and inner ...


4

Mapserver has support for postgis rasters and directions for a basic setup are given here (item 9.9). In your case you would setup Mapserver to work as a WMS server so that it returns the Postgis rasters as normal WMS layers. It is then almost trivial to add the layers into your OpenLayers map by using a WMS layer object. This kind of solution is probably ...


4

This depends on what you want & need. Do you only need "dead" bitmaps, or do you need "alive" objects in your client? There are numerous solutions out there, depending on your needs. You need a client in your browser, OpenLayers is perhaps the most prefered open source solution. As for the service backends, e.g WMS and WFS, Geoserver and Mapserver ...


4

A quick solution to serve up shapefiles on a basemap in a webapp is through a free arcgis.com account. They allow you upload .shp files, symbolize, and lay them on a base map. The share tool allows provides a html script that can be copied. I served up some symbolized counties to my blogger page in a webmap. Note that ESRI is trying to monetize arcgis.com ...


4

If you want to make browser download the generated KML, an extra header is needed: header("Content-Disposition: attachment; filename=MY_KML_FILENAME.kml"); Otherwise, just ignore the message, it's harmless. Chrome doesn't recognize the KML-specific Content-Type, and expects ordinary text/xml or application/xml, but since it's all XML, it should be parsed ...


4

Since your search region is circular, it is perhaps best not to consider it to be a polygon, but as a point with a radius and to use the ST_DWithin() function: ST_DWithin — Returns true if the geometries are within the specified distance of one another. It should save you and the processor a lot of effort.


3

Unfortunately this is not documented in the api reference or samples. But here is the gist of it. First create the store: POST /rest/workspaces/<ws>/wmsstores <wmsStore> <name>wms</name> <capabilitiesURL>http://somehost/wms?</capabilitiesURL> <workspace>sf</workspace> </wmsStore> And then ...


3

Use your GDAL's Fusion Table driver to load your shapefiles into Google Fusion Tables. The GFT developer docs are pretty self explanatory. You can then use standard php code (even in your shared hosting environment) to write your webapp. If you want more functionality, you are going to have to move to something where you have more control of your ...


3

Here's the complete code for reading through SDF: <?php session_start(); require_once '<your path>/common.php'; try{ $args = ($_SERVER['REQUEST_METHOD'] == 'POST')? $_POST : $_GET; $sessionId = $args['SESSION']; $mapName = $args['MAPNAME']; MgInitializeWebTier ($webconfigFilePath); $userInfo = ...


3

George, I think your premises are a little confused. You say you want to build a "WMS file", but WMS isn't a file. WMS stands for "Web Map Service", which is any program that conforms to the WMS Specification. There are two pieces to the WMS: a client, and a server. The client requests images according to the specification, while the server sends the ...


3

Geoserver REST API can be constructed using Path GET (read) POST (create) PUT (update) DELETE (delete) http://geoserver.org/display/GEOS/User+Collaboration+REST+API for selecting a SLD you need to GET {yourserver} {port} {user} {password} /geoserver/rest/styles (exists already in rest api) This might help for you too ...


3

Do you know the extents of the image? If you know the bounding coordinates of the image you can us gdal_translate with the -a_srs (this assigns the projection) and -a_ullr (this is the bounding coordinates). I have used this to convert .jpg of sonar images from a low cost fishing sonar unit to geotiffs.


3

This is just a tile server, its purpose is just to serve tiles. You will need a mapping application to access the tiles, something like OpenLayers, Google Maps, LeafletJS. You then tell your mapping API to use tileserver.php to get tiles at the address described in the documentation at github. Github Readme You should never have to directly access ...


3

1) If you want to create a shapefile for download, you should be able to publish an async geoprocess that will return a link to the location of the generated shapefile on your ArcGIS Server. You call this service from the javascript API using esri.tasks.Geoprocessor. Take a look at the clip-and-ship example. It uses a file gdb, but you should be able to ...


3

The answer to your question is subjective (a matter of opinion) so it might be voted down (-1). Since your new to this site, I will go ahead and answer -- mapserver, open layers and postgis sql would be a very good combination for an open source solution. Geoserver is also an option instead of mapserver -- it is java based. There are also other javascript ...


3

I'm assuming that your 'rectangle' is in 2D, and not wrapped around the earth. Suppose you have the Center at x and y. And your Height & Width are h & w. In that case, simple arithmetic will give you: min_x=x-(w/2) min_y=y-(h/2) max_x=x+(w/2) max_y=y+(h/2) These four values will give you the four coordinates.


3

How do spatial algorithms help? There are many ways spatially based algorithms can improve upon traditional algorithms. Often, you can use spatial algorithms to drastically lower the amount of records you have to loop through, such as when using distance in your calculation. Give me an example! Let's use this question that was asked today as an example. ...


3

You could use TileMill to make tiles as MBTiles: https://www.mapbox.com/tilemill/ Then use something like python-mbtiles to serve it up: https://github.com/perrygeo/python-mbtiles.


2

There is no explicit documentation but you could explore the source code into the offcial plugin repository to know how it works. Note that, the plugin is for sf1.3 / 1.4 versions but it does not exist for sf 2. Mapfish uses REST, so you will find some valid documentation also on that page : http://trac.mapfish.org/trac/mapfish/wiki/MapFishProtocol (From ...



Only top voted, non community-wiki answers of a minimum length are eligible