How to look up elevation data by lat/lng [closed] - ruby

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I am planning an app that will need the ability to look up the elevation of geographic points by lat/lng. Ideally I would like something that would work worldwide, but US-only would also suffice. I have looked at using the USGS Elevation Query Web Service, however it only allows you to query for one point at a time, and I will need to look up several hundred, and possibly up to several thousand. I also considered downloading & hosting the National Elevation Dataset myself, but it's almost 100 gigs, and apparently the USGS only allows you to download 1.5 gigs at a time.
Can anyone familiar with GIS recommend a good solution for me? I'm looking for something as lightweight & simple as possible. I am completely new to GIS, so I would really appreciate suggestions on where to get the data, how to store it, and how/what to use when working with it.
Thanks in advance.
EDIT: Just to clarify, the data points I need are not predetermined. They are arbitrary points chosen by the user (by interacting with a google maps mashup), so I do need to be able to query for any point, not just a small subset.
EDIT 2: If there is no lightweight or simple solution, I'll take whatever I can get =)

I'll give you one of the best "secrets" that I learned throughout the years after going through many different pains (leeching scripts, manual clicking, etc). It is an old-school trick... contact a real person there!
The best way do get the NED elevation dataset is to contact USGS's Eros group directly at bulkdatainfo_at_usgs.gov
You send them an external drive and after 4 to 8 weeks (usually much less than that) they will send you the entire dataset that you requested.
Then use GDAL to query your points in a way similar to this example. You may want to read the Affine Geotransform section of the GDAL Data Model

I recently stumbled in to this question while doing research. I don't have a complete simple answer either, but there are some other options not listed in the answers so far:
Google Elevation API: 25,000 requests/day, limited to Google Maps applications
Lat/Lon to Elevation: 2 points / second
GPSVisualizer: no published speed, but not intended for general DEM use
Shuttle Radar Topography: alternative to the NED, 7 gigabytes for the US.

The USGS Elevation Query Web Service only allows one query at a time, but it allows you to make requests with SOAP, HTTP GET, or HTTP POST. Choose your favorite language and write a script to generate requests for each of your data points.

I bought a GEOIP database and store every single post long lat data in mysql. After that i just implement the Google Map API by passing dynamic longlat data to the Google MAP. What I get is all my post shown in the Google Map and also display nearest post from a certain location
What you need is a GEOIP database, A query that calculate distance in miles base on given longlat, Google API, PHP Dynamic passing API variables.
example of my site : Matchimedia.com.

Related

How to design a software workflow chart? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have been working for a while now but because of my earlier habits i never worked systematically.
I have never created a workflow chart for my software as how the software will work and instead of that i started working directly which in turn leads to many problems later.
Below is a small situation i currently need help with:-
NOTE:I have already created a software which does the following and i don't need any code for it, i just want to know how a workflow chart is created for such a situation.
1) Party List : This is where i would like to store all of the information of my customer.
2) Sales : Here i will sell my products to the customer.
There are 2 cases here, whenever the customer arrives we have an option to
either save it in the party list and select it from the list in the sales form
or type it manually and then save it
Now comes the checking part:-
If an entry was saved in Sales when the checkbox was ticked and the user selected a party, lets say "Akhmed" has been saved AND the user tries to delete the record of "Akhmed" from the Party List form then the software shouldn't allow it to do so as the entry of "Akhmed" already exist in Sales.
Can anyone show me how a workflow chart is created for such a situation?
EDIT
Here is a sample workflow i have made after reading some articles, please point out any improvements that can be made to it or is it completely wrong or anything.
First of all, great question. I wish all software engineers thought first before jumping to writing a code. Especially when it's about anything more serious than a couple of lines for fun.
I think your software flow can be expressed as Activity diagram. An example of activity diagram is expressed on this picture: https://www.tutorialspoint.com/uml/images/uml_activity_diagram.jpg
Basically, activity diagram is a combination of steps and transitions (arrows) connecting them. Step can be just something that happens in the flow, or it can be a logical operator (decision) which branches the flow execution into different directions.
If you need to also emphasize who needs to execute the step, besides just showing what the steps are, you can add swimlanes (horizontal or vertical columns showing the actor names) to the activity diagram. That's where it turns into a Flow Chart diagram. e.g. on this image you can see horizontal swimplanes explaining who does the step execution http://static1.creately.com/blog/wp-content/uploads/2011/11/Support-Process-Flowchart-Template-1024x613.png
Note that terminology can differ from person to person, but these are the names for these 2 kinds of diagrams I have mostly heard and used myself.
There are other kinds of diagrams too, but I think your specific case will be covered with the ones mentioned above. Although... use case diagram can be something you may be interested in, but that does not depict steps. That only will mention actors and what kind of actions they can do with your system. e.g. https://sourcemaking.com/files/sm/images/uml/img_32.jpg
You didn't ask for tools, but I usually prefer to use tools that are rigor (rather than loose like Visio), so I would recommend to use WhiteStarUML. It's free and does a great job. But as I said, it's strictly UML-based, so will require some familiarity with UML.
Finally, about your attached picture:
What you showed looks like an activity diagram with some illegal components on it (illegal from UML specification standpoint). Is it good or bad? - depends. If it's supposed to be a rigor UML diagram then it's bad. If it's just a sketch of an idea - not bad.
Your diagram mentions database sign (called "DB") and arrows connecting to it. That's illegal on an activity diagram UML. Instead, you can have a step which says "Data gets saved to Database", and remove the "DB". Also, you have a single step which says both "Party" and "Sales" on it - that's not a legal UML. I think you tried to express that there are 2 flows. In that case, just have 2 different activity diagrams instead of one.
Your question is quite broad but I'll give it a shot.
I think you want to reconsider your approach. I would suggest reading up on UML sequence diagrams. They are a kind of diagram that provides a way to represent how requests are made within code. UML, in general, can also be used to make class diagrams and other useful flow-like charts for representing code. Many tools, such as visual-paradigm, allow you to build UML diagrams (ex. class diagrams)that can be converted directly into code. This can be useful when getting you started on the program. There is a learning curve with using these tools as different kinds of arrows mean different things, but they can be very powerful. they can also be used to take existing code and convert it to a diagram, which is great when trying to explain how your program works.
here are some other links that might be useful:
lucidchart has an example of a pop-up window diagram like the one you described.
draw.io just allows for you to make the diagrams, not convert them to code, but it is an easy to use tool and integrates with google drive and git hub.
stackoverflow has some info on UML too.
If you are looking for a "professional workflow diagram" UML if a fine way to go, there are many ways they can be laid out and they can be quite professional, I learned about them in school and have used them at work to help plan out the flow of data through our system. There are many more UML tools out there, it might be worth looking into a tutorial to find what's best for you.
You seem to be on the right track, I have never added a database to my flow-charts but it is up to you on how detailed you want to get. You seem to be using the correct symbols!
Here is an awesome, free website that I use. https://www.draw.io/ it was created for making flow charts and other things.
I personally would remove the UI at the beginning of your chart. Try to stay away from the overly technical examples when starting out with flow-charts, hit up YouTube or Google images for some simple, but correct examples.
Good luck friend!

Best application monitoring system with dashboard [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I have been playing with Graphite as application monitoring system but I'm wondering if there's something better out there for what I want.
Here are a few requirements I have in mind:
Dashboards (easy to create/change)
the items on the dashboard should be mostly charts but also colored "number boxes" (a la http://shopify.github.io/dashing/)
when a metrics goes below/beyond a certain value show some warnings on the screen (different frame/background) and potentially send an email
setting up a rule-to-warn (see above) should be simple to do and have many ways to specify a threshold (absolute value, +/- the min/max/avg over the past 30 days, percentile, etc...)
Clicking on one of the charts/boxes would redirect to a larger/more detailed chart or a "sub-dashboard"
I would prefer open-source but I'm open to commercial products especially cloud-based solutions.
Any suggestions?
Many thanks in advance.
I personally use the following combination:
Dashboard: Grafana. It is really good looking and makes easy to create and edit dashboards. Unfortunately it doesn't have colored "number boxes" but you can also look into using a wider-purpose one like Geckoboard or Ducksboard for this end.
Alerting system: Seyren. Lets you specify alerts when any metric trespasses a certain threshold and alerts via mail and dozen of other ways, readily integrated. However it doesn't ease in any way dealing with historical values, percentiles, etc. You have to do this manually via Graphite functions. Another popular option: Cabot. I use Seyren instead because it looks more active and is lighter to deploy.
Unfortunately there is not final "answer" to your question, only suggestions. You might find more appropriate forums for your question than Stackoverflow, like mailing lists or Reddit.
Hope it helps anyhow! :)
Your question states prefer open source, but if you’re really open to commercial option, I think the ZingChart JavaScript charting library meets your requirements.
1. Dashboards (easy to create/change): ZingChart uses a CSS-like syntax that is pretty easy to use and edit.
2. Dashboard items should be charts and number boxes: The library allows you to create widgets to display items like you've described. Here is a demo with number boxes -- http://www.zingchart.com/playground/presentation/51b21c1a3c8ae
3 . Warnings on screen: As you can see the in the demo above, rules have been set for the number boxes to display in green for increases and red for decreases. Similar rules can be set for a range of values. (Which addresses number 4).
You could even use multiple rules sets for a values that are close to reaching the threshold. http://zingchart.com/playground/run/5460f51991002 This example shows rules set to place a red marker on data points below the value of 200.
4 . Rule-to-warn: There are a variety of ways to use rules to replicate your desired warning. You can also combine rules with our API and create warnings as well as fire an event which can be used to trigger an email.
Its not mentioned in your question but if real time data is a consideration, ZingChart also provides the ability to transfer data via http or websocket protocols. I’m on the team at ZingChart so if you have any questions about the demo or the features described, please feel free to reach out.
If you have the right budget the best tool is splunk. It is not cloud based but it is the best when it comes to analyzing data and creating graphs and dashboards out of generated data by scripts and log files.
Splunk comes with a very flexible query language and the ability to create scheduled searches that can be used as a very robust monitoring solution. I still did not find any better product but the downside is the high price.

Creating a power-point file reader ( pptx ) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Closed 9 years ago.
Improve this question
I'm looking for an open-source pptx reader (preferred in C# ) to modify it and put it into a 3D engine ( customer request ), or at least a tutorial on the basics. I already searched on google but can't find any useful resources.
I know it's possible to create a new reader by reading the pptx files documentation ( ECMA ), but this seems to be a huge project anyway and I would prefer if I'm able to build this component on some existing code.
Your options
The best option to use really depends on the modifications you need to do. If you want to be able to heavily manipulate the PowerPoint presentation, draw new shapes, rotate shapes, add charts, add slides or master slides etc. you may find an abstraction layer like the Aspose.Slides library (proprietary) very useful.
If you do not want to pay for the library, the OpenXML formats are available to you in .NET. They allow you to manipulate every aspect of the PPTX document without the need for Interop/COM as they parse the XML inside the PPTX.
From personal experience, having used both, Aspose is a far easier solution but one that provides some overhead and of course has a cost. The OpenXML route is light to use, but requires some learning curve.
Last but not least, you can take a look at NetOffice which achieves something similar to Aspose, it is a little lighter and has reduced functionality. It also covers other formats and does not require Office installs on the machine.
To sum your options:
Aspose.Slides ($$)
OpenXML (curve, but flexibility)
NetOffice (limited functionality)
My advice
If you need to do some simple modifications (e.g. extract a slide, change a bit of text somewhere, replace an image) I would go with OpenXML.
If you want to draw slides in a bespoke manner, I would go with Aspose. I have used Aspose in a 50.000 LoC application to build hundreds of thousands of PowerPoint decks (up to a 100 slides at times) using WCF. Aspose has been drawing each slide and generating all the shapes. It takes about 4-5 seconds for a deck to be generated. The loading of Aspose and small issues with Aspose can be irritating (one can process a slide in around 200ms). Also Aspose presentations are not serializable, which is annoying if you want to cache the results in some form.
If you want to read the PPTX and somehow convert it to images, Aspose.Slides is a good candidate because it allows you to convert a PPTX slide to SVG which you can subsequently process. Note that there are some PPTX2SVG engines out there (XSLT) but the ones I know are written in Java (Apache).
Notes
The libraries I mentioned are all libraries for the .NET/C# environment. None of these libraries and techniques require office/interop/com installs.
Honestly, it is not an easy task. I tried to do this for a Presentation Designer and it there are not many solutions in the wild.
I used Office Open XML SDk 2.5. which is significantly better than crunching the XML by hand, but no picknick either.
If you have some money, you coukd use: http://www.aspose.com/.net/powerpoint-component.aspx
I don't know how good it is.
I know this is not good news, but Powerpoint recieves significantly less attention than Excel, so the resources a scarce.
You don't say if the application is going to have internet access, but assuming it is, you might think about using a public REST API to do the conversion of the PPTX into whatever format you need. There may be more, but here are a some that provide this functionality:
Aspose for Cloud Powerpoint API
Doxument
ConvertAPI
Some have free tier where you can do a certain amount of conversions per day without paying a usage fee. Aspose for Cloud has a .Net SDK, but with a REST API the language of the client shouldn't really matter.
As has been pointed out, there is no clean and simple solution for this. In my opinion you are limited to 2 choices:
Use Microsoft's own / VSTO. Also info here. This is likely to give you a lot of headaches, but may be the only thing that gives you access to the PowerPoint features you require.
Use Open XML. This has already been covered. In likelihood this will be easier to use, but may not provide access to the features you require.
Beyond that I'm afraid you'll have to create something a lot more 'manual'.

What kind of specs, documents, analysis do you get from superiors when starting a project? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I currently work in a small business (15-20 employees, 5 programmers) where most projects are custom built CMS and a few web applications products.
Since I started working there, I have worked on many projects, but specifications for each project vary a lot. Sometimes we get a little detail, a Word document telling what the client wants, and what we are suggesting (suggested form fields, a short description of display, etc.). Sometimes almost nothing except "do what you think is the best approach for this project/module/request".
My question to you guys, who might work in different kind of businesses, is: How (huge pile of paper? Word docs? Visios?) and what kind of information do you get from your superiors, managers, teamates when starting a project (plenty of analysis, drawings, etc.)? How much detail do you get on this?
Hope my question is clear enough, thank you.
Specs..that's kind of funny...how about never :(.
Seriously a lot of companies assume specs aren't needed, its absolutely unacceptable but this is how it is in a LOT of companies. They assume a one liner and the programmer knows what the program should do, the inputs / outputs and so on.
Unfortunately in my case I have to actually help write the specs..and Im the programmer :(.
I mostly get a lot of verbal direction and I use a voice recorder to record the conversation and transcribe it when I am done. I write my own specs from my customers' words.
Then, as a good consultant should, I take the writeup back to the customer and verify it, and get a signature and build it, and they live happily every after! (no they dont, they change their mind a 100 times)
It can vary depending on what group the work falls under:
Support request - If the change will take a short period of time and is fixing something broken, there is this group. This could be as simple as, "Add Bob to the list of authorized users for that ancient form" where the form is something written years ago and aside from adding and removing users, it isn't touched for fear of breaking things.
Service Advisory Committee request - Items that are up to a few days are in this group as these are kind of like mini-projects as the request may be to create a new form or portal for a group. This could be upgrading some 3rd party software where we have some customizations that make the upgrade not necessarily a simple thing for Operations to do.
Project - In this case there are usually a few Word documents and/or e-mail threads that help nail down requirements in terms of scope, budget, and time. These can take months though there is something to be said for having a prototype to change rather than creating the initial prototype to tell if requirements are really met or not. Course my current project is over a year old, still has a few more months to the timeline and already has a successor coming after it is done,i.e. there is a Phase II to go after Phase I.
Uber project - These merit their own group of documentation and are the million dollar, multiple company projects that usually try to document everything up front rarely works out well here. Thus, there is some adoptioon of agile for these but there are still some growing pains to go through as how we use agile matures. Think installing a dozen modules of some off-the-shelf software that requires both internal and external developers to customize the suite for our specific needs as the software is supposed to be very robust, flexible and help save lots of time and money on how people otherwise do their jobs generally. Think ERP or CRM for a couple of examples here.
We are a 16-person company that creates and supports customized software for small retail shop owners.
The projects we get fall into three general categories (as related to specs):
"Here, automate this form." A sales person explains that our customer only wants this form to appear where they can fill it out and print it to make it look professional to their customer. Our specs is a single piece of paper that looks something like an order form or report. This is always false; they want pop-up lookups, automatic updating from other sources, and "while you're at it" add-ons that more than double the time. These, we've learned to just live in the moment and let the project take its course. By the time we're done, the program doesn't look anything like their original form.
Small changes. Like a simple e-mail explaining that the background color is stale, or a request to sort a report by a different column. These, we just do as time allows.
Big company integrations, where we're tasked with making our software work with some big outfit like Intuit (QuickBook) or FedEx (shipping rates). These often have well thought out documentation and sample code. We get 100's of pages in word documents or pdfs. The problem with these is when their specs are wrong. We find out about inaccuracies when we try to test or certify our integration. In these instances, we usually take longer in certification than we did to originally develop the processes.
In all cases, the real trouble is when a sales person promises a solution to the customer before even asking a programmer what it would take. As recently as 2 weeks ago, a sales person got into real trouble and had to issue a refund (that person is no longer with the company).
None - at least not from management.
Instead, as a developer (and particularly one leading a software project right now), I'm expected to contact my users/customers/etc and work directly with them to come up with our specifications and requirements. The documentation I do request from my team is only what will be useful to the team. I am lucky in that management rarely requests a document that doesn't make sense or won't provide some use to our project.
I currently have a half-dozen or so specs each 60-80 pages. One of them is 80 pages with no table of contents. Good times.
Our Product Managers and senior engineers prepare three planning docs for our data management software projects.
High-level requirements: 1-to-3 sentence descriptions of hardware/software supported or specific feature for this project. (10-15 pages of Excel-like grids)
Technical details: Engineering implementation of each high-level requirements. Up to a page for each, depending on amount of detail. (30-40 pages of filled-in feature details)
Business agreement: Summary of 1 & 2 with engineering schedule and Product Mgmt's market analysis. Everyone signs off on this. (5 pages analysis, 20 technical)
I haven't seen work flows or other Visio-like details in our specs. The prioritized requirements and schedule prove critical, so we understand when to lop things off to save development and testing time.

Any good tool or library for recursive convert ANY files to tiff / images? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
We have to convert EVERYTHING to images for archiving purpose. DOC, HTML, email, ZIP, PDF, TXT and any document you can read/view on computer. In addition, it must recursive convent on all embed attachment and files in zip.
I know ImgMaker only. Is it the best or I can have something better?
My boss ask me to search that are there any alternative other then ImgMaker.
Any open source or profit suggestion are welcome.
There is a whole industry built around this type of function and numerous service providers that charge a fee per document to do this type of conversion. You are better off buying than building it on your own.
The idea of converting Everything is fundamentally a fool's errand as you would need a single program that could render every file type ever created (in essence recreating every piece of software that ever wrote a data file AND recreating every version of each). Also, not every file format has a format that has a direct rendered form. For example, what do you do with a database file, a DLL,an XML file, a WAV file?
If you are looking for something that does a reasonable job for a large number of formats, there are two main players with OEM toolkits, but both are extremely expensive and neither supports the Java platform directly. I use the former if you have any additional questions.
Stellent (now Oracle) OutsideIn: http://www.oracle.com/technologies/embedded/outside-in.html
Autonomy KeyView: http://www.autonomy.com/content/Products/idol-modules-keyview-viewing/index.en.html
Another possible option is an image print driver like Black Ice, but it has several issues including the need for a copy of every software application on the machine the code is running on, and an operator to dismiss all the inevitable dialogs that will come up when you open the files in the native application. Also, for things like Excel spreadsheets, you usually need some manual tweaking of the spreadsheet to make the printout look right (else you get 900 pages added to your tiff with that one extra column that wouldn't fit)
I don't know if this will help, because it sounds like you want something totally automated, but there are many pseudo-printer drivers that can create TIFF images as output. For example:
http://sourceforge.net/projects/pdfcreator/
Uh? How do you expect to convert a zip archive to an image? What should the pixels show? Should it be lossless, so you can convert back? If it's for archiving, I would guess that is a requirement, but it sounds weird.
What's going to happen to the tiff images afterwards? Assuming you want to manage them in some way, it seems to me you'd be better off looking for some complete documentation management product that can take these doc types as input and manage/archive the (presumably) large number of images that you'll have.
Otherwise you would seem to be re-inventing the wheel.
If you want open-source, something like Alfresco
Note the server based transformation feature below
Alfresco offers one integrated
repository to manage all formats of
content across image management,
document management, web content
management and email repositories. The
repository is a modern platform with:
One Repository for any Digital Asset
The industry’s most scalable, standards-based, JSR-170 content repository
Standards support for JSR-170, Web Services and REST
High-Availability, Fault Tolerance and Scalability – Auto failover and clustering
Secure Distributed Capture over Web Services, HTTP and HTTPS
Reuse of Alfresco Business Policy Rules
Server-based transformation between many formats including TIFF, JPEG, GIF, PNG, MS-Office, PDF and FLASH
Metadata Extraction and Management
Automatic Classification Framework
find to do the recursion in combination with convert from imagemagick tookit would get you pretty far. I guess to support all what you want, you'll need to write a script that calls the right program.
The question as asked cannot be answered sensibly. One obvious solution is to simply rename each file by attaching .tiff. E.g. you could get ringtone.mp3.tiff. Insane as it is, there are not many better ways to convert an .mp3 to a .tiff.
Note that this is not an IT problem. The business is assuming everything is an image, and music is the trivial example of something that isn't.
( To clarify - this was assuming an automated setting, e.g. to archive incoming email for legal reasons. If that's required, you MUST archive incoming MP3's too. If you've got humans in the loop, this question would not belong on a programming forum. )

Resources