So I have a vectorised map that I would like to control using leaflet.
Say I have map.eps or map.pdf, how would I go about using this?
I'm very new to this. When I view the image I can zoom as much as I want and it scales due to it being a Vector?
From what I can see Leaflet uses .png or .jpg.
Any help would be appreciated!
Say I have map.eps or map.pdf, how would I go about using this?
You would not - you would take your EPS or PDF file and convert it into an raster image. If you need high resolution, a high-resolution raster image. EPS and PDF, great formats they kind of are, are not image formats that are supported on the web.
Related
Leaflet supports both image and tile server layers as a mapping layer (along with a few other raster layers). However, both of these seem to only work with "standard" image types, for example jpeg, png, etc. If I have an image in some higher dynamic range format - specifically, astronomical images in FITS format which have more than 8 bits per channel, is there any way to serve these using leaflet, or do they need to be converted into tiles or images in a more standard format?
As of now (early 2019), there are some Leaflet plugins for non-standard image formats, specifically Leaflet.TileLayer.IIP and Leaflet-IIIF. You might be able to transform your images from FITS to one of those formats.
If you're able to slice your image in small tiles, and then generate two (or more) .pngs or .jpgs per each of your FITS image (e.g. one .png per each original channel), then you might want to consider a more exotic solution: WebGL through Leaflet.TileLayer.GL. That Leaflet plugin will allow you to grab pixels from several images at once and combine them with a custom shader function. See Mapbox's Terrain-RGB tiles and the TileLayer.GL documentation&demos for more info.
As a side note: Leaflet supports displaying .webp tiles if your web browser supports .webp.
I want show large image in Matlab gui, but when show my image not clearly and not possible for read. for example show my image in Matlab in follow.
Any way show my image like this image?
I know can use zoom in and zoom out, but image in first should clearly.
You can use InitialMagnification to preview the image at your native resolution. If your concern is getting a nice looking zoomed-out image, you can try using reduce parameter of imshow to sub sample it.
How do I split the image into a mesh of small quadrangles in OpenGLES.
I need to split image in small parts and after that stretch only one part of the image, not the whole image.
Is it possible using OpenGL? I am new in OpenGL.
before editing in hair image like
and after editing hair image like
So the image stretches from any side and in any way.
Can you explain more detailed? What quadrangles would you like to use? Are they simple rectangles or squares? Or they are a bit more complicated like parallelogram, trapezoid, kite or rhombus?
Anyway it's easy to split an image into any quadrangles you want. You can get any quadrangle from your image by telling OpenGL about image coordinates: glTexCoord2f(x, y)
I forgot to mention that image in OpenGL is loaded with size (1.f, 1.f) and it doesn't matter what size your picture is you can split it in as many as you want quadrangles.
There is one very useful tutorial about texture mapping maybe there you get your answers more detailed. Also i recommend you to keep an eye on official OpenGL documentation.
Good luck.
I want to convert Raster Images (.bmp, .jpg, .png) into Vector Images (.svg) in iOS SDK.
Is there any API or SDK to convert Raster images into Vector.
How can I achieve this.
Thanks
There is no API in the standard sdk. You can try something like svgkit if you can find an algorithm for detecting geometric shapes in a bitmap image... seems like a lot of work. Do you care that it will be just a big box of pixels?
https://github.com/SVGKit/SVGKit
However remember a vector image is made of geometric objects and a bitmap is just pixels... So you really want to be going the other direction in terms of scaling.
I am developing a Map based iPhone application where I have to draw a map of any specific region depending upon the current location of that device.
Client is supplying me the .shapefile consisting of all the co-ordinates and data to draw the map.
We can store the shape file on the server and i think to draw the map on device with the data presented on .shapefile I need the tiles with different zoom level. So on the server side I have to convert the .shapefile into tile based file.
But I don't know how to do that conversion.
Can anyone please guide me?
Thanks in advance.
Ritz
Its a lot of work.
First, shapefiles only define the geometry - you need to decide what the features are going to look like. Are they points, lines, or polygons? Do you want them all in the same colour, or depending on their attributes?
Then get mapnik or TileMill and learn how to use that. Do you just want to present the shapefile, or do you want that on a base map? In which case you'll have to generate a transparent tile set and do raster image overlays in your application.
Is it the whole world? And to the same resolution as Google Maps zooms? Get a big bank of disk storage.
http://mapbox.com/tilemill/
http://mapnik.org/
Personally I'd look into converting the shapefile into a vector form that you could render on the client - GeoJSON perhaps. Then serve that.