How does pgAdmin show geo visualization? - postgis

I've started to add some geo-data to a table (postgis enabled database) and I just saw I can visualize the point on a integrated leaflet.
But how does it work ? Is pgAdmin querying an API or a webservice ? Is this leaflet integrated with the postgis setup ?
I'm just begining with postgis so I have no idea about this magic ^^

Once the different components are clearly defined and separated, the magic goes away....
Simplifying a bit, we have:
Postrgres, the database that contains your data.
PostGIS is an extension for Postgres that allows you to store (and work with) geometries.
PGAdmin is a viewer for Postgres that runs in a webbrowser.
Leaflet is a javascript library used to display spatial data.
OpenStreetMap is an open-source dataset that can be used as a basemap.
So, PGAdmin runs in the browser and can run any javascript code. It makes use of this to load the Leaflet library. When the geometry viewer is used, PGAdmin creates a Leaflet map, tells it to display the public OpenStreetMap basemap and overlay your data from your table.

Related

How to migrate page versions from once CQ instance to another?

I am working on Adobe CQ. I created 2-3 versions(1.2,1.2,1.3) for a particular page in my author instance. Now I tried to package my content page and installed it in another instance. I couldn't see the versions of the page which I installed in another instance.
Can anyone help me out doing this?? I want to migrate my content pages along with their versions from one CQ instance to another??
We are in the same situation. You can extract prior version details using the packaging approach, but you will be precluded from reloading them in due to the new Oak security model. The next issue is that you would need to extract and transform the data, and then reinsert due to the node ID's potentially differing, especially if you are using partial data sets to extract.
Where we have gotten to, and are proving now, is to use the new migration tool to move content from instance to instance, which purportedly has a version extract tool. I will update details here when we get our results back.
UPDATE:
We have tested the CRX2OAK migration tool, and it indeed does move versions across. Using the tool, you can specify filters to only migrate a subset of content, which will then drag the version details across as well.
It seems this approach works quite well for both single tenancy and multi tenancy approaches as it used to using a package for content.
Unfortunately, it can't be used as a portable backup system, as it is an instance to instance solution. It does, however, work well for blue/green deployment strategies.
Versions are stored by path '/jcr:system/jcr:versionStorage' in AEM.
To transfer pages with their versions just create a package with filters for content which you want to move and the version storage path as well, download package and install in other AEM.
If anyone comes across this question like me, here is the summarised answer:
You can use crx2oak utility available from link below to migrate pages and page version across instances:
https://repo.adobe.com/nexus/content/groups/public/com/adobe/granite/crx2oak/
This is a powerful utility with multiple uses (especially in upgrades) as documented in links below:
https://docs.adobe.com/docs/en/aem/6-2/deploy/upgrade/using-crx2oak.html
https://jackrabbit.apache.org/oak/docs/migration.html
The source and destination repositories need to be offline while running this utility so best to plan ahead for this type of migration.
HTH

Postgis - How to get the GUI to work?

I started working with PostGIS in Action. The book shows a bunch of neat graphics created from various queries, but there is no mention of how to get these graphics to show up. The queries are working fine.
All of the tutorials I have found online appear outdated, suggesting, for example, to install plugins that are no longer available. I know I'm missing something obvious, but I have no idea what it would be.
I'm using Windows 7, PostgreSQL 9.3, PostGIS 2.1.
UPDATE
Thanks a lot guys. I settled on QGIS and it works as promised. So hard to pick either answer as they are both brilliant and informative.
There is no built-in GUI for Postgis queries. You have a number of options:
Connect to Postgis directly from QGIS or other GIS package that supports direct connections.
Use ogr2ogr utility to convert to another format such as shp or kml and use ArcGIS, Google Earth, etc to visualize the results.
Write the results out as WKT (well-known text) or GeoJSON and load them into a web mapping library such as OpenLayers. There is an example of a WKT reader here: OpenLayers WKT example. GeoJSON is a format that has gained a lot of traction, as it is very amenable to manipulation in Javascript and hence mapping libraries such as OpenLayers or Leaflet.
If you decide to use the ogr2ogr route, here is a cheat sheet provided by the authors of the Postgis book: http://www.bostongis.com/PrinterFriendly.aspx?content_name=ogr_cheatsheet
I am sure there are other options, but these are the ones that sprung to mind.
PostGIS has no GUI, it's a database extension and so it's purely backend.
If you want graphicals you need a 3rd party gis application to do that. Some worth trying might be:
QGIS - probably the most popular FLOSS gis application
OpenJUMP - a much simpler although quite limited FLOSS
ArcGIS - most advanced and most expensive
Your book probably has a note explaining where the screenshots come from, try searching towards the back of the book.

How can I store more than 5MB data on a Phonegap HTML5 offline application?

I am working on an HTML5 application. This app must store data (lots of JSON & Base64 pictures) until the user synchronises it with our server. I must keep data stored on the device for a month after a sync.
I will use Phonegap for building the app. I know there is a limit of 5MB, so I'll certainly have to store my data in a different way. What are the best solutions? What would you recommend me?
Edit:
I forgot to say, but I will have physically all the devices used by my company for installing the application, so maybe there is a way to overpass the restriction by tricking the Android pad?
That stands for localStorage and the built in SQLite database. I would suggest you taking a look at the File API, which would allow you to store files in the device.
There's a neat SQLite plugin here I'm using in an iOS/Android Phonegap application. I've tested it and found it's methods to work well on both platforms.
As for syncing JSON data and Base64 images, I'm doing this same thing with a SQLite DB managed through this plugin. I only have a couple hundred smaller images I'm working with but I've found the SQLite DB to be pretty reliable for this purpose.
Thanks to the authors of that plugin.

Sybase Unwired Platform 2.0 for BlackBerry Development

I'm just wondering why I can't run the sample code in the Sybase documents for SUP 2.0. Is there any other resource or sample code to demonstrate Sybase Unwired Platform 2.0. I followed the steps in the document but I can't figure out what is wrong. By the way, I'm developing for BlackBerry devices.
I created the MBOs, then export the generated code, in my native IDE for blackberry, but unfortunately my BlackBerry simulator cannot retrieve the data in my MBOs.
Thanks in advance.
I think you are working SUP Workspace to create MBO's..
When you are creating and MBO there one screen this there which shows about data sync at place you have two options. 1.Composit, 2.Bidirectional.. there you have to select the Composit..
When you are creating the Blackberry application, you have to include .jar files of SUP and those are located at "C:\Sybase\UnwiredPlatform\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.tooling.api_2.0.0.201105030306\lib\client\RBS\BB"
UltraLiteJ.jar, sup_client_rim.jar
at the same location, you will find the .cod file copy those and paste at "C:\Sybase\UnwiredPlatform\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\net.rim.ejde.componentpack6.0.0_6.0.0.30\components\simulator "
At Sybase Control Center you have to check the connection templates for each MBO there is one connection. So there you have to provide the Connection parameters like: Database URL and Driver Class and UserName,password of Database.
To sync the data from database to Simulator is very sensitive task you should careful about the configuarations of MBO's and Mapping MBO's

Local data sources for GIS Map plugin?

I am developing an ASP.NET intranet application that needs to have an interactive map interface.
There are some pretty neat Silverlight mapping plugins that I think could work well, specifically:
ArcGIS Silverlight API: http://resources.esri.com/arcgisserver/apis/silverlight/
DeepEarth mapping framework: http://www.codeplex.com/deepearth
There are no doubt many more plugins out there that will allow easy interaction between ASP.NET and the mapping interface (please suggest some if I've missed the major players).
My major concern however is using these tools with local data sources. What is the best option here? All I need is some basic satellite imagery of moderate resolution and some overlays of cities and country borders. Can I download a dataset of these images? I dont really care if they are up to date or not, so long as the photos were taken in the last 20 years.
I want to be able to use local data sources because external internet connections could be very slow due to the nature of the organisation's work, Intranet communication will always be much faster.
To summarise:
1.) where can I find a dataset of moderate quality global satellite imagery?
2.) Which web based mapping plugin will allow me to plug into such a data source?
If I can get something like the DeepEarth demo (http://www.codeplex.com/deepearth) but grabbing the data from internal company servers I would be very happy.
You can check out the free geodata listing at:
- http://www.freegis.org/database/?cat=1
Or have a look at:
http://downloads.cloudmade.com/
where cloudmade provides downloadable openstreetmap data converted to shape files.

Resources