I have a database that keeps information for world map. When I export this to Quantum the map that is shown is not full. How can I solve that?
Sorry but your question is a little vague. What database are you using? How is the coordinates stored (can I assume decimal degrees, or are you using PostGIS and have a geometry column)? What geometry type are you trying to show?
If your DB is postgresql / postgis with a geom column, then you can select "Add Vector Layer" and check the "Database" radio button under "Source Type". You can then create a connection to that table and it will load the data just fine.
Alternatively, select the "Add PostGIS Layers" option and create a connection that way. You can follow the same steps if your database is MS Access etc and you can connect via ODBC.
If it doesn't then I think your issue will be in the database.
This part assumes you have point data:
If your database is excel, make sure your coordinate columns are the right data type and it is saved as .csv.
Select "Add Delimited Text Layer" in QGIS and you fill in the details for which are the X and Y coordinate columns. If you have a lot of columns it make things easier if your column headers are 'X' and 'Y' respectively.
Finally (again assuming point data) you could open the processing toolbox and search for 'Points Layer From Table'. If you don't see the processing button along the top of QGIS, then you've got to download it from the plugins manager (just search 'processing'). You need to state the layer, X field, Y field, and your CRS and that will create a new layer. NOTE the data is now separate from the database so any changes made to the layer are not reflected in the database. Unlike using PostGIS where the updates are live.
I hope this has helped, sorry if this has been a memory dump of all the ways I know without knowing a little more about your issue.
Related
Using MySQL Workbensh 6.3.7 on Windows 10, I am finding the search behavior strange.
There is an entry box that you could use to enter the name of the table, however, this does not work every time! I mean it sometimes finds the table and sometimes it does not! When it works, it is very good. I can enter 1 or more chars from start and the tool would highlight the table in the diagram, for some tables, even entering the full name, it does not find the table!
If I go to a specific table from the tree on the left-hand-side nav, and double click the table, it opens its properties, but it does not select it on the drawing area!
I have generated the DDL and searched it as text to find columns and relations then traced that back manually but this is difficult for large diagrams.
I want to be able to search for a table (even with wild card) and find it in the drawing surface - Also, what does the dot at the right side of the table name in the schema treeview mean?
The search behavior sounds like a bug to me. It should always select the table figures that match. When you file a bug report for that (http://bugs.mysql.com) it can be fixed.
The dot in the catalog treeview is just an indicator which db object has been placed already on the current diagram.
A tip: use layers to organize bigger diagrams. Use colors for different groups of db objects, like this:
You can change the colors on the Properties tab in the lower left corner, even for multiple figures in one step.
And don't forget you can increase the size of the diagram to fit more figures on it. See the menu Model -> Diagram Properties and Size....
I am following the standard steps to create date dimension in SSAS here-
The generate schema option fails! this is the message from schema generation wizard
create failed for table myusername.dimdate
I think the problem is that the table should be created for a different schema. If below is the selected option for schema generation -
Subject Area
Data source view: ABC PROJ
**Schema: ABC_PROJ(WXY1230)**
Data will be preserved
Time table will be populated
Shouldn't the Dimdate table be created ABC_PROF(WXY1230).Dimdate and not under myusername.DimDate?
Any idea what could be missing? I have been struggling with this for hours now.
Thanks for any help.
I think that is an unfortunate bug in the SSAS generated date dimension. When you generate the dimension you are using your Windows credentials and SSAS uses the default schema for the user context it was provided. I believe your user has a default schema of myusername on that database, which is what is causing the date dimesion to be created there.
If you create the dimension, you have the option to generate the schema now or generate it later. If you choose to generate it later and go through the Schema Generation Wizard, you eventually see a screen that shows the Owning Schema.
. There is no mechanism to change it even though you can see it (At least not in SSDT. I don't have BIDS on any of my machines). You are not the only person to run into this issue.
So you have a few options as a workaround:
Use a different account that has a default schema that is the correct schema where you want to place your date table.
Create the table under your default user and populate it. Then alter the table in SQL Server to move it to the correct schema. Then update your DSV.
Don't use SSAS to generate your date dimension. There are plenty of scripts out there that create great date dimensions. Here's an example. This means you will need to create the dimension and build the hierarchy yourself, but it's not that much work compared to the time you've spent trying to fix this issue.
I am working on a project where we are going to be looking at finding the shortest/fastest route from point A to point B. I've been looking at the tables generated by the osm2pgsql. And I'm wondering how would I represent a road obstructed after the osm has been loaded into our database. Our project will rely on osm to map out all of the roads we will also have an operator looking at live video footage of roads. At which point if the operator see's a road is obstructed we want to update the database to reflect this road obstructed say by a downed tree.
I've been looking at all of the columns and the only one that stands out in my head is barrier. I have been unable to find any documentation on what each column represents and how pg_route takes each into consideration when creating a route. What I'm looking for is a column that when pg_route looks in the database and sees a road it says oh that roads blocked skip it?
This is good question for gis.se...
First thing is pg_routing can't route via data generated by osm2pgsql - this data is not a network. You need data generated by osm2po or osm2pgrouting and this data is quite different.
Second thing is - there is no such column. In every pg_routing function you're passing sql which will select data for route search so you're deciding which edge will be in this dataset and which not - it's not a problem to add extra column to table with edges.
Here is link to pgrouting workshop it will guide you through all process from import of data to first generated route. It's using osm2pgroutin to import data, but I suggest you use osm2po instead.
So as Jendrusk mentioned, when you generate a route you will pass the function a SQL query to select the edges for the graph you want to solve, 'select * from edges where the_geom && <bbox>' You can model blockages using point and radius, lines, or polygons that you want the route to avoid by adding to the query above avoidance zones like:
'select * from edges where the_geom && <bbox> and not st_dwithin(the_geom, point, radius) and not stdwithin(the_geom, line_or_polygon, 0.0)'
If you have lots of these avoidances then put them in a table and do a join to eliminate the edges that are used to build the graph. If the edges are not there the route is forces to find a way around the avoidance.
I have a Crystal template that I am modifying in developer because we are changing the datasource from an Access file to our Oracle DB. I created a database field that accurately connects to Oracle and added a select statement that because pulls a field from a particular table
select s.field from table s;
On the right hand side, under database fields, I see my command and can right click and browse the data, which right now returns two values.
I also made a formula field using an Azalea barcode function that calls the values (I think, this is where stuff is going wrong, I guess)
The formula field is
BarcodeC39ASCII({Command.field})
So this should take the data and format it into the barcode, except when I use print preview or print out the report, no data is merged.
I've tested this by creating a new formula field with just the Command.field, and still no data is merged. I imagine there is something really obvious that I am missing and would appreciate any input.
So unless I misunderstood your question, you are changing your datasource from Access DB to Oracle DB, correct? Assuming that the database structure remains the same then all you should need to do is go into Database -> Set Datasource Location and set the datasource location from the Access DB to the Oracle DB and your existing report should work as it did. You might have to map some fields, but that should be the extend of it. Is that what you are trying to do?
Chris
We have imported an SQL View table into a dimension.
We already programmed a connector that talks with data cubes (MDX queries).
That said, the view we originally imported contains all the raw data we need to query.
Problem is, the MDX client requires to "select" measures only. We want to show the raw data, that means, we want to view the same columns\attributes as the initiale SQL View created.
Is this even possible ?
We know we can use Linq or whatever to talk with the SQL View Table but it will be better to talk in MDX cube-like mode to a "dumb" cube dimension's data.
Thanks.
I don't understand why you really want to use the cube and not your view, but anyway you've two solutions to extract dimension's members from a cube: through a DMV or through a standard MDX query.
The DMV named $system.MdSchema_members will return the members of your dimension. You should be able to retrieve the values you are looking for. http://msdn.microsoft.com/en-us/library/ms126046.aspx
The other solution is to create a dummy measure with a create measure statement above your MDX query. In your SQL statement, then put this dummy measure on axis 0 and all the attributes you're looking for on axis 1. This should return you a result close to the result returned by a select * from your view.