I try to import mbtiles from openmaptiles.org in geoserver.
When I try to add a layer, I get the message:
"No enum constant org.geotools.mbtiles.MBTilesMetadata.t_format.PBF"
How can i resolve this problem.
Thanks in advance
GeoServer does not support serving of vector tiles stored in MBTiles now.
Use the free TileServer GL open-source project instead - as the map server software for serving the vector tiles available from OpenMapTiles.org.
TileServer GL will also provide you with raster tiles (PNG/JPEG tiles for use in Leaflet or other traditional viewers and old browsers) created on demand from vector tiles on your server - and it will deliver WMTS service, for openning the map layers in QGIS, ArcGIS, etc.
See: https://openmaptiles.org/docs/host/tileserver-gl/ and https://github.com/klokantech/tileserver-gl
Manual of TileServer GL is available at http://tileserver.readthedocs.io/
Disclaimer: we are authors of the OpenMapTiles.org project which you mention in your question, and you have probably downloaded the MBTiles file from our server.
We are also programmers behind the TileServer GL project. As such we are affiliated with the above-mentioned projects. The GeoServer developers may provide you with more details about a planned (or not?) support of vector tiles served from MBTiles format.
Related
Any ideas how to start with MapServer with NativeScript. I don't have necessary skills yet to make own plugin but I must try if nothing else is found.
Does anyone know any resources to get started implementing mapserver maps for nativescript. Plugin, code anything.
I assume you have an application using NativeScript framework and you want to include some map services from MapServer.
If that is the case, you may not need to write your own plugin but you still do some level of coding to achieve the goal.
My recommendation would be :
1) At your front end, choose a GIS map library such as Google maps API, Leaflet or OpenLayers API. The GIS library would handle a lot of critical tasks in the process such as handling communication with GIS server, user interface function etc. So that you don't have to reinvent the wheels again.
https://developers.google.com/maps/
2) Based on your system requirement, you may or may not need a GIS server such as MapServer. Data could come from directly from clients for example. But since you mentioned it i would think you may need a GIS server to publish some data for the application to consume the services.
MapServer services via OGC standard protocols are easy to integred with most of the popular GIS libraries mentioned earlier. So once you publish Map service (wms) for example, it would be as easy as add one layer in such GIS library point to the service endpoint you published via Http request and by passing some parameters you would be able to get the GIS contents.
This is the link about how to consume MapServer service on the client side:
http://mapserver.org/ogc/wms_client.html
I am building a new web application. I use google appengine , jsf2, primefaces , java technologies for building this web application. I have to build a dynamic image gallery within this web application. ie registered users should be able to load images to a gallery and then it should be available for viewing by the public.
My issue is that :
1) app engine allows only a maximum of 1mb file to be written to its blob store at a time.
2) app engine doesn't allow to write to the server file system.
3) Should I store each image as a blob to the gae database?. But if I do that the whole application will be damn slow as there can be a lot of images. So reading the images from the blob store can make it slow and will cost heaps of processing power.
Am really confused about a proper solution and couldn't find any proper recommendation in the web. I am pretty sure that there will be a descent solution available !
It would be a great help if some one with prior experience in building web application's which deals with a lot of image content could advice me a good solution.
The solution is to use upload URLs when users are uploading images, so that they get uploaded directly to the Blobstore:
https://developers.google.com/appengine/docs/java/blobstore/#Java_Uploading_a_blob
Then just reference the blobs directly via getServingUrl() rather than having your application try to read them into memory.
You really should use GCS (Google Cloud Storage), and not the blobstore. The call from a users browser to an image stored in GCS goes directly to there, and is not charged to your app.
We are working on a mobile portal using Worklight 5.0.6 with the Mobile Web environment.
While loading the application, all the resources like js, css, images etc.. are loaded together. Due to this it takes too much time to load the page. How can we restrict the resources (which are not required) to be loaded together with the application. And how can we force to load only the required resources?
Sounds like what you're asking is:
How to reduce the size of the application
How to reduce the network traffic produced by the application
Indeed, in Worklight 6.0.0.0 there is: the Minification and Concatenation feature as well as application cache (auto-manifest generation). Since you don't have that in 5.0.6, what you could do is:
Regardless of any feature, only keep in your app what you're actually using.
Remove images and libraries you're not using
Use png-crush to minimize the file size of images
Remove dead code
For network traffic:
Add a manifest file to your application and list in it all the resources you'd like to cache as opposed to always fetch. Application Cache is a web standard so you can simply follow articles on the web.
You could "manually" minify your application resources; you can accomplish this using Google Closure.
BE CAREFUL! If you choose this path, make sure to only use the WHITESPACE_ONLY or SIMPLE_OPTIMIZATION compilation levels. Do not use ADVANCED_OPTIMIZATIONS on the Worklight framework files - behavior will be unknown (it may work, it may not, it could suddenly fail at some parts - this is not supported by Worklight).
As for only loading what you want to, ala RequireJS, Worklight is not yet equipped to handle this, so this is not a viable option for you.
There is IMO not much to do in 5.0.6 about this; 6.0.0.0 took it a step forward and the upcoming 6.1.0 handles it better as well (the Mobile Web environment is much lighter in regards to its structure and number of files), but you cannot do moduler loading of resources just yet.
I'm planning to develop a standalone restful Image Server with the following functionality, but first would like to know if something similar already exists in the open source world (language not important):
restful (crud) on master image, e.g: /GET/asd983249as
possibly bulk-gets / LIST
support for metadata (Creative commons info, dimensions, etc.) that directly relates to the image (references from the domain to these images is NOT included)
restful lazy-get of different 'renditions' of an image. i.e if a rendition doesn't exist, it is created upon request. Obviously the original image needs to exist. Different operations are allowed (resize and crop to begin with)
e.g: /GET/asd983249as/100x100 (simple resize)
allowed dimensions are configurable, so not to get DoS'ed (not as quickly anyway)
Non functional:
Reasonable performant / Scalable / HA (yeah I know this doesn't say anything really)
Possibly in-mem caching
Thinking about going the Mongo GridFS route, getting MongoDb sharding and replication almost for free. Putting Nginx in front, perhaps (in part) directly using nginx-gridfs (see below) should allow for the rest-stuff and, with some config, some simple caching if gridfs can't handle that for itself (don't know)
Sources:
nginx-gridfs
http://www.coffeepowered.net/2010/02/17/serving-files-out-of-gridfs/
Idea of lazy-gets (and a simple implementation of what I'm looking for, although it seemed more hobbyish than an actively maintained project)
http://sumitbirla.com/2011/11/how-to-build-a-scalable-caching-resizing-image-server/
other stuff that comes close, but isn't an end solution
https://github.com/adamdbradley/foresight.js/wiki/Server-Resizing-Images
Anything that already does this?
I would recommend you this project:
https://github.com/imbo/imbo
Its easy to use, stable and used in big projects.
But I am still curious about alternatives.
I was looking for options for a project, and I found those two below. They are not a perfect match to your requirements but seem quite mature. I have no experience with them yet, though.
https://imageresizing.net/ Essential edition is open source. The more advanced solutions are not.
http://thumborize.me/ (with associated github) has many interesting features like face detection, new codecs, smart cropping.
I am trying to solve a problem for some days, and it is impossible for me even to find the reason of that behaviour of geoserver.
I have a web application that prints some map layers from my geoserver (version 2.1.3) through openlayers.
I have all the layers well configured in my geoserver application and these layers are well drawn by openlayers using the projection 900913.
The problem comes when I try to change from obtaining directly the layer images from my geoserver, to obtain the layers through the geowebcache included in the geoserver distribution (adding in the request the parameter "&tiled=true").
Then the layers are also obtained but some kilometres displaced from the original position.
Maybe it uses a different projection, but in the geoserver logs I saw it is calling the request with the 900913 projection.
I have also wiped the temp directory of the geowebcache where one can find the cache files, to force geowebcache to redraw the layer cache files. But it redraws them with the same problem.
Does somebody have had this problem or know what is the reason of this layer displacement when using the cache layers?
Thank you very much,
Aleix
EDIT: I see there is the same question in that following post in the GIS site of the StackExchange community, although it is neither answered... (http://gis.stackexchange.com/questions/4289/geowebcache-misalignment-of-tiles)
If you want to really use GWC please hit the GWC own WMS service, it will also tell you if the requests you are making are displaced compared to the cached grid:
http://localhost:8080/geoserver/gwc/service/wms?...